mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-02-04 06:12:25 +00:00
Don't let mc/mark-lines create 'double' cursors.
Previously using mc/mark-lines in a fowards/backwards/forwards combination would cause multiple cursors to be placed at the same point of the same line. This is not useful behaviour. Noted while implementing magnars suggestion: https://github.com/magnars/multiple-cursors.el/pull/23#commitcomment-1983183
This commit is contained in:
@@ -145,8 +145,10 @@ With zero ARG, skip the last one and mark next."
|
||||
(dotimes (i num-lines)
|
||||
(mc/create-fake-cursor-at-point)
|
||||
(ecase direction
|
||||
(forwards (next-line 1 nil))
|
||||
(backwards (previous-line 1 nil)))))
|
||||
(forwards (loop do (next-line 1 nil)
|
||||
while (mc/all-fake-cursors (point) (1+ (point)))))
|
||||
(backwards (loop do (previous-line 1 nil)
|
||||
while (mc/all-fake-cursors (point) (1+ (point))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/mark-next-lines (arg)
|
||||
|
||||
Reference in New Issue
Block a user