[PATCH][weston] terminal: allow copy-paste when selection is scrolled out
Manuel Bachmann
manuel.bachmann at iot.bzh
Sat Sep 19 04:51:05 PDT 2015
We could not paste text when its source went outside the
visible part of the buffer ; this is because we were
incorrectly assuming that our iterator should start at
row 0, while it could very well be negative.
Signed-off-by: Manuel Bachmann <manuel.bachmann at iot.bzh>
---
clients/terminal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clients/terminal.c b/clients/terminal.c
index c5d5d60..7406f50 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -942,7 +942,7 @@ terminal_send_selection(struct terminal *terminal, int fd)
close(fd);
return;
}
- for (row = 0; row < terminal->height; row++) {
+ for (row = terminal->selection_start_row; row < terminal->height; row++) {
p_row = terminal_get_row(terminal, row);
for (col = 0; col < terminal->width; col++) {
if (p_row[col].ch == 0x200B) /* space glyph */
--
1.8.3.1
More information about the wayland-devel
mailing list