1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

Ignore empty lines when pasting.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4466 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2007-04-28 10:55:57 +00:00 committed by exg
parent 2f86e39e84
commit 39d15501c8

View File

@ -415,7 +415,8 @@ static int check_pasting(unichar key, int diff)
}
g_array_append_val(paste_buffer, key);
if (key == '\r' || key == '\n') {
if ((key == '\r' || key == '\n') &&
(prev_key != '\r' && prev_key != '\n')) {
if (paste_state == 1 &&
paste_keycount < paste_detect_keycount) {
/* not enough keypresses to determine if this is
@ -467,6 +468,7 @@ static void sig_gui_key_pressed(gpointer keyp)
if (check_pasting(key, diff)) {
last_keypress = now;
prev_key = key;
return;
}