summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2003-11-23 12:17:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2003-11-23 12:17:16 +0000
commitc074f551bf0efb92851ecbc1ba3df463d83ba7d4 (patch)
tree0a27f95c303046e2bc9a228cd405e5a166e9ead4
parent0f225617770e11786ff8a4fe1ddd80b6b391915c (diff)
downloadirssi-c074f551bf0efb92851ecbc1ba3df463d83ba7d4.zip
Don't count linefeeds in paste detection to avoid it going on when holding
enter key down git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3182 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-text/gui-readline.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index bcda4701..f87c6583 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -380,13 +380,14 @@ static void sig_gui_key_pressed(gpointer keyp)
gui_entry_insert_char(active_entry, key);
}
- if (ret != 0) {
- /* some key create multiple characters - we're in the middle
- of one. try to detect the keycombo as a single keypress
- rather than multiple small onces to avoid incorrect
- paste detection. */
+ /* ret = 0 : some key create multiple characters - we're in the middle
+ of one. try to detect the keycombo as a single keypress rather than
+ multiple small onces to avoid incorrect paste detection.
+
+ CR/LF : don't count them to avoid paste detection when you're
+ holding enter key down */
+ if (ret != 0 && key != '\r' && key != '\n')
last_keypress = now;
- }
}
static void key_send_line(void)