Commit c03de1d0 authored by Chris Wilson's avatar Chris Wilson Committed by Chris Wilson
Browse files

Bug 469862 – Handling of wrapped links in gnome-terminal is broken

2007-08-30  Chris Wilson  <chris@chris-wilson.co.uk>

    Bug 469862 – Handling of wrapped links in gnome-terminal is broken

    * src/vte.c (vte_terminal_get_text_range_maybe_wrapped):
        Check that the last character is in the last column before
        adding a newline for autowrapped lines.


svn path=/trunk/; revision=1938
parent 5480e1f6
2007-08-30 Chris Wilson <chris@chris-wilson.co.uk>
Bug 469862 Handling of wrapped links in gnome-terminal is broken
* src/vte.c (vte_terminal_get_text_range_maybe_wrapped):
Check that the last character is in the last column before
adding a newline for autowrapped lines.
2007-08-30 Chris Wilson <chris@chris-wilson.co.uk>
* MAINTAINERS: Add myself to the list, as Behdad had suggested some
......
......@@ -1384,11 +1384,14 @@ vte_terminal_match_check_internal(VteTerminal *terminal,
}
}
/* Scan backwards to find the start of this line */
while (sattr > 0 && terminal->pvt->match_contents[sattr] != '\n') {
while (sattr > 0 &&
! (terminal->pvt->match_contents[sattr] == '\n' ||
terminal->pvt->match_contents[sattr] == '\0')) {
sattr--;
}
/* and skip any initial newlines. */
while (terminal->pvt->match_contents[sattr] == '\n') {
while (terminal->pvt->match_contents[sattr] == '\n' ||
terminal->pvt->match_contents[sattr] == '\0') {
sattr++;
}
if (eattr <= sattr) { /* blank line */
......@@ -5298,7 +5301,8 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
* not soft-wrapped, append a newline. */
else if (is_selected(terminal, terminal->column_count - 1, row, data)) {
/* If we didn't softwrap, add a newline. */
if (!vte_line_is_wrappable(terminal, row)) {
if (!(last_nonemptycol == terminal->column_count - 1 &&
vte_line_is_wrappable(terminal, row))) {
string = g_string_append_c(string, '\n');
}
}
......
......@@ -1135,11 +1135,15 @@ vte_sequence_handler_ce(VteTerminal *terminal,
* is the end of the array. */
if (rowdata->cells->len > screen->cursor_current.col) {
g_array_set_size(rowdata->cells, screen->cursor_current.col);
/* We've modified the display. Make a note of it. */
terminal->pvt->text_deleted_flag = TRUE;
}
if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
/* Add enough cells to fill out the row. */
vte_g_array_fill(rowdata->cells,
&screen->fill_defaults,
terminal->column_count);
}
/* Add enough cells to the end of the line to fill out the row. */
vte_g_array_fill(rowdata->cells,
&screen->fill_defaults,
terminal->column_count);
/* Repaint this row. */
_vte_invalidate_cells(terminal,
screen->cursor_current.col,
......@@ -1147,8 +1151,6 @@ vte_sequence_handler_ce(VteTerminal *terminal,
screen->cursor_current.col,
screen->cursor_current.row, 1);
/* We've modified the display. Make a note of it. */
terminal->pvt->text_deleted_flag = TRUE;
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment