Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set `iedit-rectangle` to the actual rectangle corners

- after inserting necessary spaces to pad out full rectangle
  • Loading branch information...
commit 46f5c74dea5efd96bd9f272c2815ffe11c2e6ec9 1 parent 9cfd76f
Le Wang authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 iedit-rect.el
View
4 iedit-rect.el
@@ -104,8 +104,9 @@ Commands:
(defun iedit-rectangle-start (beg end)
"Start Iedit mode for the region as a rectangle."
(barf-if-buffer-read-only)
+ (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)
(save-excursion
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.