pspp-sheet-view: Fix rendering moving cursor left or right with keyboard.
[pspp] / src / ui / gui / pspp-sheet-view.c
index 1e50c2801a62c41dfcb1fe9166d6e81b35114ded..d5637a1d14574bffe2c49e69394c6d1e2b0cb9dc 100644 (file)
@@ -3482,10 +3482,12 @@ pspp_sheet_view_draw_grid_lines (PsppSheetView    *tree_view,
 
       current_x += column->width;
 
-      gdk_draw_line (event->window,
-                    tree_view->priv->grid_line_gc,
-                    current_x - 1, 0,
-                    current_x - 1, height);
+      if (current_x - 1 >= event->area.x
+          && current_x - 1 < event->area.x + event->area.width)
+        gdk_draw_line (event->window,
+                       tree_view->priv->grid_line_gc,
+                       current_x - 1, 0,
+                       current_x - 1, height);
     }
 }
 
@@ -7719,10 +7721,7 @@ pspp_sheet_view_move_cursor_left_right (PsppSheetView *tree_view,
 
   if (found_column)
     {
-      if (!pspp_sheet_view_has_special_cell (tree_view))
-       _pspp_sheet_view_queue_draw_node (tree_view,
-                                          cursor_node,
-                                          NULL);
+      _pspp_sheet_view_queue_draw_node (tree_view, cursor_node, NULL);
       g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
       gtk_widget_grab_focus (GTK_WIDGET (tree_view));
     }