hirc

IRC client
Log | Files | Refs

commit f72b677c770d9b9a1cc670f89fc6b0ee1b57ab52
parent 85737371ec5a69f3795e6ba354625a8af5e13a95
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  9 Dec 2021 18:07:11 +0000

ui.c: input must match entire binding

Diffstat:
Mui.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui.c b/ui.c @@ -341,7 +341,8 @@ ui_read(void) { * trigger one. */ if (input.counter != savecounter) { for (kp = keybinds; kp; kp = kp->next) { - if (strncmp(kp->binding, &input.string[savecounter], (input.counter - savecounter)) == 0) { + if ((input.counter - savecounter) == strlen(kp->binding) && + strncmp(kp->binding, &input.string[savecounter], (input.counter - savecounter)) == 0) { command_eval(kp->cmd); memmove(&input.string[savecounter], &input.string[input.counter],