Commit c15f5ce6 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

Call function instead of open coding.

2008-12-02  Behdad Esfahbod  <behdad@gnome.org>

        * src/vte.c (vte_terminal_invalidate_selection),
        (vte_terminal_start_selection): Call function instead of open coding.


svn path=/trunk/; revision=2313
parent 36e0a0aa
2008-12-02 Behdad Esfahbod <behdad@gnome.org>
* src/vte.c (vte_terminal_invalidate_selection),
(vte_terminal_start_selection): Call function instead of open coding.
2008-12-02 Behdad Esfahbod <behdad@gnome.org>
* src/vtedraw.h:
......
......@@ -6182,6 +6182,17 @@ find_end_column (VteTerminal *terminal, glong col, glong row)
return MIN(col + columns, terminal->column_count);
}
static void
vte_terminal_invalidate_selection (VteTerminal *terminal)
{
_vte_invalidate_region (terminal,
terminal->pvt->selection_start.col,
terminal->pvt->selection_end.col,
terminal->pvt->selection_start.row,
terminal->pvt->selection_end.row,
terminal->pvt->selection_block_mode);
}
/* Start selection at the location of the event. */
static void
......@@ -6230,16 +6241,7 @@ vte_terminal_start_selection(VteTerminal *terminal, GdkEventButton *event,
terminal->pvt->selection_end.row = celly;
terminal->pvt->selection_origin =
terminal->pvt->selection_last;
_vte_invalidate_region(terminal,
MIN(terminal->pvt->selection_start.col,
terminal->pvt->selection_end.col),
MAX(terminal->pvt->selection_start.col,
terminal->pvt->selection_end.col),
MIN(terminal->pvt->selection_start.row,
terminal->pvt->selection_end.row),
MAX(terminal->pvt->selection_start.row,
terminal->pvt->selection_end.row),
FALSE);
vte_terminal_invalidate_selection (terminal);
break;
}
......@@ -6265,17 +6267,6 @@ math_div (long a, long b)
return (a / b) - 1;
}
static void
vte_terminal_invalidate_selection (VteTerminal *terminal)
{
_vte_invalidate_region (terminal,
terminal->pvt->selection_start.col,
terminal->pvt->selection_end.col,
terminal->pvt->selection_start.row,
terminal->pvt->selection_end.row,
terminal->pvt->selection_block_mode);
}
/* Helper */
static void
vte_terminal_extend_selection_expand (VteTerminal *terminal)
......
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