summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2007-04-28 11:45:34 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-04-28 11:45:34 +0000
commit83c178c16924b1ee868fe827ee7a9061a4ddd9aa (patch)
tree01767a4c72209a74deb55e0e1301a8f8c0172d4d /src
parent39d15501c8b55f47f17147aca37faf743b52efcd (diff)
downloadirssi-83c178c16924b1ee868fe827ee7a9061a4ddd9aa.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-readline.c4
1 files changed, 3 insertions, 1 deletions
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 */