Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix Emacs crashing bug when rectangle ends at EOB #34

Closed
wants to merge 1 commit into from

2 participants

@lewang
Collaborator

This supercedes the pull-request fixing #31

@victorhge
Owner

Fixed in commit c699e32

@victorhge victorhge closed this
@lewang
Collaborator
@victorhge
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 31, 2013
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 10 deletions.
  1. +15 −10 iedit-rect.el
View
25 iedit-rect.el
@@ -112,20 +112,25 @@ Commands:
(setq iedit-occurrence-keymap iedit-rect-keymap)
(save-excursion
(let ((beg-col (progn (goto-char beg) (current-column)))
- (end-col (progn (goto-char end) (current-column))))
+ (end-col (progn (goto-char end) (current-column)))
+ (doit (lambda ()
+ (push (iedit-make-occurrence-overlay
+ (progn
+ (move-to-column beg-col t)
+ (point))
+ (progn
+ (move-to-column end-col t)
+ (point)))
+ iedit-occurrences-overlays)
+ (forward-line 1))))
(when (< end-col beg-col)
(rotatef beg-col end-col))
(goto-char beg)
(loop do (progn
- (push (iedit-make-occurrence-overlay
- (progn
- (move-to-column beg-col t)
- (point))
- (progn
- (move-to-column end-col t)
- (point)))
- iedit-occurrences-overlays)
- (forward-line 1))
+ (funcall doit)
+ (when (= (point) (point-max))
+ (funcall doit)
+ (return)))
until (> (point) end))))
(setq iedit-rectangle (list beg end))
(setq iedit-rectangle-mode (propertize
Something went wrong with that request. Please try again.