From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19751 invoked by alias); 3 Oct 2016 11:55:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39546 Received: (qmail 1665 invoked from network); 3 Oct 2016 11:55:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f196.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.196):SA:0(0.0/5.0):. Processed in 0.336377 secs); 03 Oct 2016 11:55:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.196 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nkWPwx3tzgkJ6IHzCP6uLWUbnu8ENpveJdazZo4kxMo=; b=xfG5wGd7c/VwPN+kLgqGiHOzbjxeFjoobWXjQ0O7v4IxxVxAeUnJZlAGKKzH0pCDYf hxpZ8yRk8YyEm9hGg4jmCzWJSVYIdDuwV1sB9w27rNFMb+Y3FjykQyTegNK+I7iJEVYb REAEX2+ZGCa76OcK9mWG8lz/115J/o2U8IGIU2n5bqSr7RIzXSRL2A/ZH3Y8trueTI/R EqQ/gIQbS9OuvXDmFH1Hbeu6K3oqSPISnKTFhSqxmI7udrM/iD9dWS5kO858PmWY2Q6N d5dtplducJPIvrkeLbCfWrVgvMa+JIa2XKf/KmYB4sjST+iO53Qk1wt6dWpSrJe3e4rM Ee8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nkWPwx3tzgkJ6IHzCP6uLWUbnu8ENpveJdazZo4kxMo=; b=M5rBcvKHeuf2w8iwgUgfPsA9p8St1HEVotPeMBK80kdxCtSjmySBxu1afGOTO1Mi8s U21O36DxqWZNnw/x+9kkxGIVkdwmeJr2AMEuMQwjJEz6Gmq4jZXjfenvtAbUr8uqKArx /ZIMt3IMu/cY4PljQnXYaVwqQwGGqeRDZHjNC06hVwLLMpsN6Q7CIuiSyPDjdCDWFWzM h4/V/9FBLxkIWM+boHkTCDGwjC7XTZw/lI9bXjrnbsA956C1owYwlfG672r1A+QBDTnQ UAp4/99YTJiY3ELlHrmMychHVSGFUJEjXCMGnjMlqBaTo21kwyEEUeWmh4C1QWXIvgF3 xNsQ== X-Gm-Message-State: AA6/9Rmq9K1br6WiY6wMk8KRRaeaFWGhFTO0ssAuxRcXgWCSQv5UbgN0eAMEpxOr7mup5y6qGyIIm4UTas0z9A== X-Received: by 10.237.51.101 with SMTP id u92mr19873963qtd.125.1475495751969; Mon, 03 Oct 2016 04:55:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20161003111840.3e5081f0@pwslap01u.europe.root.pri> References: <161002162145.ZM22574@torch.brasslantern.com> <20161003111840.3e5081f0@pwslap01u.europe.root.pri> From: Sebastian Gniazdowski Date: Mon, 3 Oct 2016 13:55:31 +0200 Message-ID: Subject: Re: [BUG] queueing_enabled grows infinitely when in .recursive-edit To: Peter Stephenson Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 Thanks for the patch I've devoted much time to this. I've tested the patch and it works. Noted one thing. Initial calc_timeout() in raw_getbyte() can return with ZTM_NONE while there are scheduled functions, often after Ctrl-C in .recursive-edit. Added debug prints: } else if (diff > 0) { exp100ths = diff * 100; if (tmoutp->tp != ZTM_KEY || exp100ths < tmoutp->exp100ths) { tmoutp->exp100ths = exp100ths; tmoutp->tp = ZTM_FUNC; } else { // MY DEBUG _F = fopen("/tmp/recursive.txt", "a+"); fprintf( _F, "-- calc_timeout ZTM_FUNC condition not meet" " tmoutp->tp[%d], exp100ths[%d] < tmoutp->exp100ths[%d]\n", tmoutp->tp, exp100ths, tmoutp->exp100ths); fclose(_F); } } else { _F = fopen("/tmp/recursive.txt", "a+"); fprintf( _F, "-- calc_timeout diff[%d] > 0 condition not meet\n", diff); fclose(_F); } And obtain following logs: raw_getbyte() - queueing_enabled (0) -- calc_timeout do_keytmout[0], keytimeout[40] -- calc_timeout timedfns != NULL -- calc_timeout diff[0] > 0 condition not meet -- ^^^ INIT calc_timeout tmout.tp(0) ZTM_NONE(0) ZTM_KEY(1) / BEGIN RAW_GETBYTE() zle_main.c It looks like calc_timeout handles diff < 0 and diff > 0 but not diff == 0? in the "INIT" log "tmout.tp(0)" is the value (0 == ZTM_NONE) returned from ^^^ up calc_timeout(), and it's not ZTM_FUNC like it rather should be (timedfns != NULL). Best regards, Sebastian Gniazdowski