From 83c178c16924b1ee868fe827ee7a9061a4ddd9aa Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sat, 28 Apr 2007 11:45:34 +0000 Subject: [PATCH] Increment paste_keycount when the key before the one that starts a possible pasting is not a '\r' or '\n'. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4467 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-readline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index cefa3d06..ef2b533f 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -398,8 +398,10 @@ static int check_pasting(unichar key, int diff) paste_line_count = 0; paste_keycount = 0; g_array_set_size(paste_buffer, 0); - if (prev_key != '\r' && prev_key != '\n') + if (prev_key != '\r' && prev_key != '\n') { + paste_keycount++; g_array_append_val(paste_buffer, prev_key); + } } else if (paste_state > 0 && diff > paste_detect_time && paste_line_count == 0) { /* reset paste state */