1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

core: fix paste detection (problem with end of lines)

This commit is contained in:
Sebastien Helleu
2011-09-27 21:35:13 +02:00
parent a8c22c11fc
commit d0f41efeb7
3 changed files with 18 additions and 5 deletions
+7 -1
View File
@@ -509,7 +509,13 @@ gui_key_read_cb (void *data, int fd)
for (i = 0; i < ret; i++)
{
gui_key_buffer_add (buffer[i]);
/* add all chars (ignore a '\n' after a '\r') */
if ((i == 0)
|| (buffer[i] != '\n')
|| (buffer[i - 1] != '\r'))
{
gui_key_buffer_add (buffer[i]);
}
}
text_added_to_buffer = 1;