aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-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) {