zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Cc: Ray Andrews <rayandrews@eastlink.ca>
Subject: [PATCH] zcurses mouse delay
Date: Sat, 13 Jan 2024 21:07:16 -0800	[thread overview]
Message-ID: <CAH+w=7by87KukFEWi-BLYMpxKPsxx4m+ZFzkLwpM45q-7P74uQ@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7agEbfr0JnSpSqf=x-8Ji+edqYXMSbwDEQO6BtaJx6suA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

On Sat, Jan 13, 2024 at 9:03 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> The test for successful read of a number is wrong, and there's also a
> typo in the call to print an error message in the event of an
> unrecognized mouse subcommand.

Nobody uses zcurses for mouse interaction, I guess.

[-- Attachment #2: zcurses-mouse-delay.txt --]
[-- Type: text/plain, Size: 758 bytes --]

diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index ad17ed65f..8950cc153 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -1302,7 +1302,7 @@ zccmd_mouse(const char *nam, char **args)
 	    zlong delay;
 
 	    if (!*++args ||
-		((delay = zstrtol(*args, &eptr, 10)), eptr != NULL)) {
+		((delay = zstrtol(*args, &eptr, 10)), *eptr != '\0')) {
 		zwarnnam(nam, "mouse delay requires an integer argument");
 		return 1;
 	    }
@@ -1326,7 +1326,7 @@ zccmd_mouse(const char *nam, char **args)
 		if (old_mask != zcurses_mouse_mask)
 		    zcurses_flags |= ZCF_MOUSE_MASK_CHANGED;
 	    } else {
-		zwarnnam(nam, "unrecognised mouse command: %s", *arg);
+		zwarnnam(nam, "unrecognised mouse command: %s", arg);
 		return 1;
 	    }
 	}

       reply	other threads:[~2024-01-14  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ca1761f1-6d8f-452a-b16d-2bfce9076e25@eastlink.ca>
     [not found] ` <CAH+w=7ZJsr7hGRvD8f-wUogPcGt0DMOcPyiYMpcwCsbBNkRwuQ@mail.gmail.com>
     [not found]   ` <CAA=-s3zc5a+PA7draaA=FmXtwU9K8RrHbb70HbQN8MhmuXTYrQ@mail.gmail.com>
     [not found]     ` <CAH+w=7bAWOF-v36hdNjaxBB-5rhjsp97mAtyESyR2OcojcEFUQ@mail.gmail.com>
     [not found]       ` <205735b2-11e1-4b5e-baa2-7418753f591f@eastlink.ca>
     [not found]         ` <CAH+w=7Y5_oQL20z7mkMUGSLnsdc9ceJ3=QqdAHVRF9jDZ_hZoQ@mail.gmail.com>
     [not found]           ` <CAA=-s3x4nkLST56mhpWqb9OXUQR8081ew63p+5sEsyw5QmMdpw@mail.gmail.com>
     [not found]             ` <CAH+w=7Yi+M1vthseF3Awp9JJh5KuFoCbFjLa--a22BGJgEJK_g@mail.gmail.com>
     [not found]               ` <CAN=4vMpexntEq=hZcmsiXySy-2ptXMvBKunJ1knDkkS+4sYYLA@mail.gmail.com>
     [not found]                 ` <CAH+w=7aT-gbt7PRo=uvPK5=+rR3X-PE7nEssOkh+=fxwdeG_7w@mail.gmail.com>
     [not found]                   ` <86efd9d3-c994-4551-ae1b-1358dcc86283@eastlink.ca>
     [not found]                     ` <CAH+w=7agEbfr0JnSpSqf=x-8Ji+edqYXMSbwDEQO6BtaJx6suA@mail.gmail.com>
2024-01-14  5:07                       ` Bart Schaefer [this message]
2024-01-14  5:41                         ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7by87KukFEWi-BLYMpxKPsxx4m+ZFzkLwpM45q-7P74uQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).