diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-01-26 03:10:57 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-01-26 03:10:57 +0800 |
commit | 593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7 (patch) | |
tree | cf9ca1867c0637f1495b090d8a951b9d85a2dc99 /widgets/table | |
parent | bf762467c8703006c96d4698b558a7af6d14262b (diff) | |
download | gsoc2013-evolution-593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7.tar.gz 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/table')
-rw-r--r-- | widgets/table/e-table-selection-model.c | 6 |
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) { |