branch: elpa/multiple-cursors
commit 56d037319a577224069c667c1b176b063cf6d8bd
Author: Magnar Sveen <[email protected]>
Commit: Magnar Sveen <[email protected]>

    Fix rectangular-region-mode when adding cursors over hidden areas of the 
buffer.
---
 rectangular-region-mode.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/rectangular-region-mode.el b/rectangular-region-mode.el
index 4477988..8226015 100644
--- a/rectangular-region-mode.el
+++ b/rectangular-region-mode.el
@@ -38,14 +38,12 @@
          (anchor-line (save-excursion (goto-char rrm/anchor) 
(line-number-at-pos)))
          (left-column (if (< point-column anchor-column) point-column 
anchor-column))
          (right-column (if (> point-column anchor-column) point-column 
anchor-column))
-         (num-mirrors (abs (- point-line anchor-line)))
-         (num-chars (- right-column left-column))
          (navigation-func (if (< point-line anchor-line) 'next-line 
'previous-line)))
     (move-to-column anchor-column t)
     (set-mark (point))
     (move-to-column point-column t)
     (mc/save-excursion
-     (dotimes (i num-mirrors)
+     (while (not (= anchor-line (line-number-at-pos)))
        (funcall navigation-func)
        (move-to-column right-column t)
        (move-to-column anchor-column t)

Reply via email to