summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/gui/curses/gui-curses-key.c19
2 files changed, 9 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 704556870..86769bb7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 0.4.3 (under dev)
+* core: fix truncated text when pasting several long lines (bug #40210)
* core: rename option weechat.look.set_title to weechat.look.window_title,
value is now a string (evaluated)
* core: add infos "term_width" and "term_height"
diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c
index 4cdcbe9dd..d553d3b8d 100644
--- a/src/gui/curses/gui-curses-key.c
+++ b/src/gui/curses/gui-curses-key.c
@@ -535,18 +535,15 @@ gui_key_read_cb (void *data, int fd)
|| ((buffer[i] != '\r') && (buffer[i] != '\n'))
|| ((buffer[i - 1] != '\r') && (buffer[i - 1] != '\n')))
{
- if (gui_key_paste_pending)
+ if (gui_key_paste_pending && (buffer[i] == 25))
{
- if (buffer[i] == 25)
- {
- /* ctrl-Y: accept paste */
- accept_paste = 1;
- }
- else if (buffer[i] == 14)
- {
- /* ctrl-N: cancel paste */
- cancel_paste = 1;
- }
+ /* ctrl-Y: accept paste */
+ accept_paste = 1;
+ }
+ else if (gui_key_paste_pending && (buffer[i] == 14))
+ {
+ /* ctrl-N: cancel paste */
+ cancel_paste = 1;
}
else
{