aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table/e-table-item.c')
-rw-r--r--widgets/e-table/e-table-item.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index 286b1a8352..a7d5573fad 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -307,6 +307,10 @@ static void
eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
{
eti->rows = e_table_model_row_count (eti->table_model);
+
+ if (eti->focused_row > eti->rows - 1) {
+ eti->focused_row = eti->rows - 1;
+ }
if (eti->cell_views)
eti_compute_height (eti);