Skip to content

Update the cursor and anchor to sync with the visual but not scroll for selectAll

Xuetian Weng requested to merge work/select-all-cursor-anchor into master

116dc5c4 tries to not scroll the view if select all happens. However, this causes internal anchor become inconsistent with the visual anchor.

For example, if document is like "abcd|" (| means cursor position), press all will make the selection, but the anchor is same as cursor. If user press "Shift+Left", only "d" will be selected. But if user use shift + arrow to select all "abcd", it looks visually same, but shift+left will update the selection to "abc".

This tries a different approach by avoid call "makeVisible" if updateCursor parameter scroll is false. This helps the cursor and anchor become visually same as the selection after selectAll.

Merge request reports

Loading