terminal: allow copy-paste when selection is scrolled out
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@iot.bzh> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
a1f3f3c9f2
commit
e54cee17a7
|
@ -942,7 +942,7 @@ terminal_send_selection(struct terminal *terminal, int fd)
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
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);
|
p_row = terminal_get_row(terminal, row);
|
||||||
for (col = 0; col < terminal->width; col++) {
|
for (col = 0; col < terminal->width; col++) {
|
||||||
if (p_row[col].ch == 0x200B) /* space glyph */
|
if (p_row[col].ch == 0x200B) /* space glyph */
|
||||||
|
|
Loading…
Reference in New Issue