summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/vte.c22
2 files changed, 16 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 17be6b9..1955293 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/src/vte.c b/src/vte.c
index bdf694e..c515200 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -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,