Browse files

Skip the first occurrence for occur-edit-mode

  • Loading branch information...
1 parent 59ce7fa commit 4cf803d9cb0e6d8209b79095f2de7b10643143b1 @victorhge victorhge committed Jul 3, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 iedit.el
View
8 iedit.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-07-01 17:21:37 Victor Ren>
+;; Time-stamp: <2012-07-03 15:00:38 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.95
@@ -422,7 +422,9 @@ Commands:
(iedit-mode-on-action arg)
(let (occurrence
complete-symbol
- (beg (point-min))
+ (beg (if (eq major-mode 'occur-edit-mode) ; skip the first occurrence
+ (next-single-char-property-change 1 'read-only)
+ (point-min)))
(end (point-max)))
(cond ((and arg
(= 4 (prefix-numeric-value arg))
@@ -715,7 +717,7 @@ beginning of the buffer."
(let ((pos (point))
(in-occurrence (get-char-property (point) 'iedit-occurrence-overlay-name)))
(when in-occurrence
- (setq pos (next-single-char-property-change pos 'iedit-occurrence-overlay-name)))
+ (setq pos (next-single-char-property-change pos 'iedit-occurrence-overlay-name)))
(setq pos (next-single-char-property-change pos 'iedit-occurrence-overlay-name))
(if (/= pos (point-max))
(setq iedit-forward-success t)

0 comments on commit 4cf803d

Please sign in to comment.