vte r2313 - in trunk: . src



Author: behdad
Date: Tue Dec  2 20:29:09 2008
New Revision: 2313
URL: http://svn.gnome.org/viewvc/vte?rev=2313&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/src/vte.c

Modified: trunk/src/vte.c
==============================================================================
--- trunk/src/vte.c	(original)
+++ trunk/src/vte.c	Tue Dec  2 20:29:09 2008
@@ -6182,6 +6182,17 @@
 	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 @@
 		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 @@
 		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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]