Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zcurses mouse delay
- X-seq: zsh-workers 52477
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Cc: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: [PATCH] zcurses mouse delay
- Date: Sat, 13 Jan 2024 21:07:16 -0800
- Archived-at: <https://zsh.org/workers/52477>
- In-reply-to: <CAH+w=7agEbfr0JnSpSqf=x-8Ji+edqYXMSbwDEQO6BtaJx6suA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <ca1761f1-6d8f-452a-b16d-2bfce9076e25@eastlink.ca> <CAH+w=7ZJsr7hGRvD8f-wUogPcGt0DMOcPyiYMpcwCsbBNkRwuQ@mail.gmail.com> <CAA=-s3zc5a+PA7draaA=FmXtwU9K8RrHbb70HbQN8MhmuXTYrQ@mail.gmail.com> <CAH+w=7bAWOF-v36hdNjaxBB-5rhjsp97mAtyESyR2OcojcEFUQ@mail.gmail.com> <205735b2-11e1-4b5e-baa2-7418753f591f@eastlink.ca> <CAH+w=7Y5_oQL20z7mkMUGSLnsdc9ceJ3=QqdAHVRF9jDZ_hZoQ@mail.gmail.com> <CAA=-s3x4nkLST56mhpWqb9OXUQR8081ew63p+5sEsyw5QmMdpw@mail.gmail.com> <CAH+w=7Yi+M1vthseF3Awp9JJh5KuFoCbFjLa--a22BGJgEJK_g@mail.gmail.com> <CAN=4vMpexntEq=hZcmsiXySy-2ptXMvBKunJ1knDkkS+4sYYLA@mail.gmail.com> <CAH+w=7aT-gbt7PRo=uvPK5=+rR3X-PE7nEssOkh+=fxwdeG_7w@mail.gmail.com> <86efd9d3-c994-4551-ae1b-1358dcc86283@eastlink.ca> <CAH+w=7agEbfr0JnSpSqf=x-8Ji+edqYXMSbwDEQO6BtaJx6suA@mail.gmail.com>
On Sat, Jan 13, 2024 at 9:03 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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.
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;
}
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author