From 593f0036f8dfa204eb0d70c6ad5b5243ee2b49a7 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 25 Jan 2001 19:10:57 +0000 Subject: Made this correctly check for going off the end of the table. 2001-01-25 Christopher James Lahey * e-table-selection-model.c (move_selection): Made this correctly check for going off the end of the table. svn path=/trunk/; revision=7817 --- widgets/table/e-table-selection-model.c | 6 ++++-- 1 file 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) { -- cgit