diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-04-23 08:39:08 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-04-23 08:39:08 +0000 |
commit | 1375bfe7189dc1a316ebee510175baf48fcee0cd (patch) | |
tree | 031fd515904b2b812000951f50a448caff6a5a74 | |
parent | 9a70a1fea66d11a81415bdc082679a6d586ff7cc (diff) |
Bug 339448 – selection doesn't respect hard newlines
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.
-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, |