Browse files

set `iedit-rectangle` to the actual rectangle corners

- after inserting necessary spaces to pad out full rectangle
  • Loading branch information...
Le Wang
Le Wang committed Oct 10, 2012
1 parent 9cfd76f commit 46f5c74dea5efd96bd9f272c2815ffe11c2e6ec9
Showing with 3 additions and 1 deletion.
  1. +3 −1 iedit-rect.el
@@ -104,8 +104,9 @@ Commands:
(defun iedit-rectangle-start (beg end)
"Start Iedit mode for the region as a rectangle."
+ (setq beg (copy-marker beg))
+ (setq end (copy-marker end t))
(setq iedit-occurrences-overlays nil)
- (setq iedit-rectangle (list beg end))
(setq iedit-initial-string-local nil)
(setq iedit-occurrence-keymap iedit-rect-keymap)
@@ -126,6 +127,7 @@ Commands:
(forward-line 1))
until (> (point) end))
(setq iedit-occurrences-overlays (nreverse iedit-occurrences-overlays))))
+ (setq iedit-rectangle (list beg end))
(setq iedit-rectangle-mode (propertize
(concat " Iedit-rect:" (number-to-string (length iedit-occurrences-overlays)))
'face 'font-lock-warning-face))

0 comments on commit 46f5c74

Please sign in to comment.