mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Skip lines in rectangular-region-mode that are too short for the rectangle.
This commit is contained in:
parent
56d037319a
commit
05125618aa
@ -39,17 +39,18 @@
|
||||
(left-column (if (< point-column anchor-column) point-column anchor-column))
|
||||
(right-column (if (> point-column anchor-column) point-column anchor-column))
|
||||
(navigation-func (if (< point-line anchor-line) 'next-line 'previous-line)))
|
||||
(move-to-column anchor-column t)
|
||||
(move-to-column anchor-column)
|
||||
(set-mark (point))
|
||||
(move-to-column point-column t)
|
||||
(move-to-column point-column)
|
||||
(mc/save-excursion
|
||||
(while (not (= anchor-line (line-number-at-pos)))
|
||||
(funcall navigation-func)
|
||||
(move-to-column right-column t)
|
||||
(move-to-column anchor-column t)
|
||||
(move-to-column anchor-column)
|
||||
(when (= anchor-column (current-column))
|
||||
(set-mark (point))
|
||||
(move-to-column point-column t)
|
||||
(mc/create-fake-cursor-at-point)))))
|
||||
(move-to-column point-column)
|
||||
(when (= point-column (current-column))
|
||||
(mc/create-fake-cursor-at-point)))))))
|
||||
|
||||
(defun rrm/switch-to-multiple-cursors (&rest forms)
|
||||
(interactive)
|
||||
|
Loading…
x
Reference in New Issue
Block a user