summaryrefslogtreecommitdiff
path: root/src/gui/curses
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/curses')
-rw-r--r--src/gui/curses/gui-curses-key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c
index eeedbb27b..8eea1bb7f 100644
--- a/src/gui/curses/gui-curses-key.c
+++ b/src/gui/curses/gui-curses-key.c
@@ -396,12 +396,13 @@ gui_key_flush (int paste)
* or if the mouse code is valid UTF-8 (do not send partial mouse
* code which is not UTF-8 valid)
*/
- if (!paste
+ if (!paste && i > gui_key_last_key_pressed_sent
&& (!gui_mouse_event_pending
|| utf8_is_valid (key_str, -1, NULL)))
{
(void) hook_signal_send ("key_pressed",
WEECHAT_HOOK_SIGNAL_STRING, key_str);
+ gui_key_last_key_pressed_sent = i;
}
if (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED)