aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-26 03:10:57 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-26 03:10:57 +0800
commit593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7 (patch)
treecf9ca1867c0637f1495b090d8a951b9d85a2dc99 /widgets
parentbf762467c8703006c96d4698b558a7af6d14262b (diff)
downloadgsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.gz
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.bz2
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.lz
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.xz
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.zst
gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.zip
Made this correctly check for going off the end of the table.
2001-01-25 Christopher James Lahey <clahey@helixcode.com> * e-table-selection-model.c (move_selection): Made this correctly check for going off the end of the table. svn path=/trunk/; revision=7817
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-selection-model.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 57869602a4..fba3821f8d 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -605,8 +605,10 @@ move_selection (ETableSelectionModel *selection,
row--;
else
row++;
- if (row < 0 || row > selection->row_count)
- return FALSE;
+ if (row < 0)
+ row = 0;
+ if (row >= selection->row_count)
+ row = selection->row_count - 1;
row = e_table_sorter_sorted_to_model(selection->sorter, row);
switch (selection->mode) {