Commit 5d005b24 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod
Browse files

Add the debug flag TRIE for printing out the trie (previous was using

2006-02-03  Behdad Esfahbod  <behdad@gnome.org>

        * src/debug.c, src/debug.h, src/matcher.c: Add the debug
        flag TRIE for printing out the trie (previous was using
        MISC.)

        * src/vte.c (vte_invalidate_cells): Update row_count and
        column_count when clamping their respective _start values.

        * src/vte.c (vte_terminal_extend_selection,
        * _vte_terminal_select_text):
        Pass row_count to vte_invalidate_cells(), instead of row_stop.

        * src/vteapp.c: Run $SHELL by default.
parent 1785a75a
2006-02-03 Behdad Esfahbod <behdad@gnome.org>
* src/debug.c, src/debug.h, src/matcher.c: Add the debug
flag TRIE for printing out the trie (previous was using
MISC.)
* src/vte.c (vte_invalidate_cells): Update row_count and
column_count when clamping their respective _start values.
* src/vte.c (vte_terminal_extend_selection, _vte_terminal_select_text):
Pass row_count to vte_invalidate_cells(), instead of row_stop.
* src/vteapp.c: Run $SHELL by default.
2006-02-01 Behdad Esfahbod <behdad@gnome.org>
* doc/reference/tmpl/internals.sgml: Added to CVS.
......
......@@ -9,10 +9,8 @@ Internals
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
......@@ -74,6 +74,9 @@ _vte_debug_parse_string(const char *string)
} else
if (g_ascii_strcasecmp(flags[i], "LIFECYCLE") == 0) {
_vte_debug_flags |= VTE_DEBUG_LIFECYCLE;
} else
if (g_ascii_strcasecmp(flags[i], "TRIE") == 0) {
_vte_debug_flags |= VTE_DEBUG_TRIE;
}
}
g_strfreev(flags);
......
......@@ -40,7 +40,8 @@ typedef enum {
VTE_DEBUG_PTY = 1 << 9,
VTE_DEBUG_CURSOR = 1 << 10,
VTE_DEBUG_KEYBOARD = 1 << 11,
VTE_DEBUG_LIFECYCLE = 1 << 12
VTE_DEBUG_LIFECYCLE = 1 << 12,
VTE_DEBUG_TRIE = 1 << 13
} VteDebugFlags;
void _vte_debug_parse_string(const char *string);
......
......@@ -128,7 +128,7 @@ _vte_matcher_init(struct _vte_matcher *matcher, char *emulation,
}
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC)) {
if (_vte_debug_on(VTE_DEBUG_TRIE)) {
fprintf(stderr, "Trie contents:\n");
_vte_matcher_print(matcher);
fprintf(stderr, "\n");
......
......@@ -605,6 +605,7 @@ vte_invalidate_cells(VteTerminal *terminal,
{
GdkRectangle rect;
GtkWidget *widget;
gint i;
g_assert(VTE_IS_TERMINAL(terminal));
widget = GTK_WIDGET(terminal);
......@@ -621,8 +622,13 @@ vte_invalidate_cells(VteTerminal *terminal,
row_start -= terminal->pvt->screen->scroll_delta;
/* Clamp the start values to reasonable numbers. */
column_start = (column_start > 0) ? column_start : 0;
i = row_start;
row_start = (row_start > 0) ? row_start : 0;
row_count = (i + row_count) - row_start;
i = column_start;
column_start = (column_start > 0) ? column_start : 0;
column_count = (i + column_count) - column_start;
/* Convert the column and row start and end to pixel values
* by multiplying by the size of a character cell. */
......@@ -2254,7 +2260,7 @@ vte_sequence_handler_al(VteTerminal *terminal,
rowdata = _vte_ring_index(screen->row_data,
VteRowData *, start);
g_assert(rowdata != NULL);
/* Add enough cells to it so that it has the default colors. */
/* Add enough cells to it so that it has the default columns. */
vte_g_array_fill(rowdata->cells, &screen->fill_defaults,
terminal->column_count);
/* Adjust the scrollbars if necessary. */
......@@ -7315,12 +7321,6 @@ _vte_terminal_fork_basic(VteTerminal *terminal, const char *command,
return pid;
}
static char *
get_user_shell (VteTerminal *terminal)
{
}
/**
* vte_terminal_fork_command:
* @terminal: a #VteTerminal
......@@ -10094,7 +10094,9 @@ vte_terminal_extend_selection(VteTerminal *terminal, double x, double y,
terminal->column_count,
MIN(old_start.y,
terminal->pvt->selection_start.y),
ABS(old_start.y -
MAX(old_start.y,
terminal->pvt->selection_start.y) -
MIN(old_start.y,
terminal->pvt->selection_start.y) + 1);
}
if ((old_end.x != terminal->pvt->selection_end.x) ||
......@@ -10111,7 +10113,9 @@ vte_terminal_extend_selection(VteTerminal *terminal, double x, double y,
terminal->column_count,
MIN(old_end.y,
terminal->pvt->selection_end.y),
ABS(old_end.y -
MAX(old_end.y,
terminal->pvt->selection_end.y) -
MIN(old_end.y,
terminal->pvt->selection_end.y) + 1);
}
if (invalidate_selected) {
......@@ -15890,7 +15894,8 @@ _vte_terminal_select_text(VteTerminal *terminal, long start_x, long start_y, lon
vte_invalidate_cells (terminal, 0,
terminal->column_count,
MIN (start_y, end_y),
ABS (start_y - end_y) + 1);
MAX (start_y, end_y) -
MIN (start_y, end_y) + 1);
vte_terminal_emit_selection_changed(terminal);
}
......
......@@ -404,7 +404,7 @@ main(int argc, char **argv)
const char *message = "Launching interactive shell...\r\n";
const char *font = NULL;
const char *terminal = NULL;
const char *command = NULL;
const char *command = getenv ("SHELL");
const char *working_directory = NULL;
char **argv2;
int opt;
......
......@@ -41,22 +41,22 @@ struct _vte_draw_impl
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_XFT2
&_vte_draw_xft,
#endif
#endif
#endif /* HAVE_XFT2 */
#endif /* !X_DISPLAY_MISSING */
&_vte_draw_ft2,
#if GTK_CHECK_VERSION(2,2,0)
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_GL
&_vte_draw_gl,
#endif
#endif
#endif
#endif /* HAVE_GL */
#endif /* !X_DISPLAY_MISSING */
#endif /* GTK_CHECK_VERSION(2,2,0) */
&_vte_draw_pango,
#ifndef X_DISPLAY_MISSING
#ifdef HAVE_PANGOX
&_vte_draw_pango_x,
#endif
#endif
#endif /* HAVE_PANGOX */
#endif /* !X_DISPLAY_MISSING */
};
struct _vte_draw *
......
Supports Markdown
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