Commit 68774f88 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

also trim back lines which are nothing but whitespace (#140765).

* src/vte.c(vte_terminal_get_text_range_maybe_wrapped): also trim back lines
	which are nothing but whitespace (#140765).
* src/vte.c(vte_terminal_configure_toplevel): invalidate the whole window if
	we're "transparent", because we don't get expose events unless some
	portion of our area came out from behind something else, but we still
	need to repaint it (#122243).
parent bc403a38
2004-04-21 nalin
* src/vte.c(vte_terminal_get_text_range_maybe_wrapped): also trim back
lines which are nothing but whitespace (#140765).
* src/vte.c(vte_terminal_configure_toplevel): invalidate the whole
window if we're "transparent", because we don't get expose events
unless some portion of our area came out from behind something else,
but we still need to repaint it (#122243).
2004-04-20 nalin
* doc/reference/tmpl/reaper.sgml: document the child-exited signal.
* doc/reference/tmpl/vte.sgml: document the emulation-changed and
......
......@@ -8105,6 +8105,8 @@ static gboolean
vte_terminal_configure_toplevel(GtkWidget *widget, GdkEventConfigure *event,
gpointer data)
{
VteTerminal *terminal;
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_EVENTS)) {
fprintf(stderr, "Top level parent configured.\n");
......@@ -8113,6 +8115,14 @@ vte_terminal_configure_toplevel(GtkWidget *widget, GdkEventConfigure *event,
g_return_val_if_fail(GTK_IS_WIDGET(widget), FALSE);
g_return_val_if_fail(GTK_WIDGET_TOPLEVEL(widget), FALSE);
g_return_val_if_fail(VTE_IS_TERMINAL(data), FALSE);
terminal = VTE_TERMINAL(data);
if (terminal->pvt->bg_transparent) {
/* We have to repaint the entire window, because we don't get
* an expose event unless some portion of our visible area
* moved out from behind another window. */
vte_invalidate_all(terminal);
}
return FALSE;
}
......@@ -9135,7 +9145,7 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
GArray *attributes)
{
long col, row, last_space, last_spacecol,
last_nonspace, last_nonspacecol;
last_nonspace, last_nonspacecol, line_start;
VteScreen *screen;
struct vte_charcell *pcell = NULL;
GString *string;
......@@ -9155,6 +9165,7 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
last_space = last_nonspace = -1;
last_spacecol = last_nonspacecol = -1;
attr.row = row;
line_start = string->len;
pcell = NULL;
do {
/* If it's not part of a multi-column character,
......@@ -9242,6 +9253,11 @@ vte_terminal_get_text_range_maybe_wrapped(VteTerminal *terminal,
g_string_truncate(string, last_nonspace + 1);
}
}
/* If we found no non-whitespace characters on this line, trim
* it, as xterm does. */
if (last_nonspacecol == -1) {
g_string_truncate(string, line_start);
}
/* Make sure that the attributes array is as long as the
* string. */
if (attributes) {
......
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