GNOME Bugzilla – Bug 702761
Hide the caret cursor if a text selection is ongoing.
Last modified: 2013-07-03 17:01:56 UTC
The caret cursor should not be visible when we are selecting text.
Created attachment 247833 [details] [review] Don't draw the caret cursor if a selection is ongoing
Review of attachment 247833 [details] [review]: This is not enough, there are still some details that we should take into account. When selecting text, only the area affected by the new selection is redrawn, and in most of the cases the selections start at the middle of the caret cursor. If the cursor stopped blinking half of the cursor is still drawn. This is easier to see at a high zoom level. So, we need to include caret cursor area into the damaged region we redraw when selecting text. You can check if caret navigation is enabled in merge_selection_region and if the cursor is visible get the area an include it in the damage region. Another problem is that the cursor is not shown again when there are no selections anymore. If you start a selection with the keyboard, and after selecting a character go back to the position where the selection started, the cursor should be shown again. For this, you need to check not only that selection list is not empty, but also that the covered region is empty. ::: libview/ev-view.c @@ +3795,3 @@ + /* Don't draw the caret cursor if a selection is ongoing */ + if (EV_IS_SELECTION (view->document) && view->selection_info.in_selection) We should check is the selection list (selection_info.selections) is empty or not, in_selection is not updated when selecting with double or triple click. Actually in_selection is mostly unused and rendundant so I've just removed it in master.
I've fixed this in git master.