mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-22 16:57:12 +09:00
Fix SkipMultiCursor behavior when there is no selection
When there is no selection (i.e. selection is empty), SkipMultiCursor searches for the empty text, "finds" it as the beginning of the buffer, and as a result, jumps to the beginning of the buffer, which confuses the user. Fix it.
This commit is contained in:
@@ -2013,6 +2013,9 @@ func (h *BufPane) MouseMultiCursor(e *tcell.EventMouse) bool {
|
||||
// SkipMultiCursor moves the current multiple cursor to the next available position
|
||||
func (h *BufPane) SkipMultiCursor() bool {
|
||||
lastC := h.Buf.GetCursor(h.Buf.NumCursors() - 1)
|
||||
if !lastC.HasSelection() {
|
||||
return false
|
||||
}
|
||||
sel := lastC.GetSelection()
|
||||
searchStart := lastC.CurSelection[1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user