diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/vte.c | 22 |
2 files changed, 16 insertions, 13 deletions
@@ -1,5 +1,12 @@ 2006-04-23 Behdad Esfahbod <behdad@gnome.org> + Bug 339448 – selection doesn't respect hard newlines + + * src/vte.c (vte_terminal_get_text_range_maybe_wrapped): Add newline + to the end of each line that is not soft-wrapped. + +2006-04-23 Behdad Esfahbod <behdad@gnome.org> + Bug 148720 – Word selection erroneously captures text from next line Patch from Chris Heath. @@ -4881,21 +4881,17 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal, pcell = vte_terminal_find_charcell(terminal, terminal->column_count - 1, row); + /* If we didn't softwrap, add a newline. */ + if (!vte_line_is_wrappable(terminal, row)) { + string = g_string_append_c(string, '\n'); + } /* If it's whitespace, we snipped it off, so add a * newline, unless we soft-wrapped. */ - if ((pcell == NULL) || - (pcell->c == '\0') || - (pcell->c == ' ')) { - if (vte_line_is_wrappable(terminal, row) && - wrap) { - string = g_string_append_c(string, - pcell ? - pcell->c : - ' '); - } else { - string = g_string_append_c(string, - '\n'); - } + else if ((pcell == NULL) || (pcell->c == '\0') || (pcell->c == ' ')) { + string = g_string_append_c(string, + pcell ? + pcell->c : + ' '); } /* Move this last character to the end of the line. */ attr.column = MAX(terminal->column_count, |