Permalink
Browse files

Merge pull request #21 from lewang/fix-overlay-at-eob

Fix overlay at eob
  • Loading branch information...
2 parents 9cfd76f + a5ce38a commit 66ca4f9595a8fc0bdb45e6b00cfaaa2a276e7b81 @victorhge committed Oct 16, 2012
Showing with 21 additions and 1 deletion.
  1. +2 −1 iedit-lib.el
  2. +19 −0 iedit-tests.el
View
@@ -384,7 +384,8 @@ occurrence, it will abort Iedit mode."
(insert-and-inherit value))
(run-hook-with-args 'after-change-functions
beginning
- ending
+ (min ending
+ (point-max))
change)))))))))))))
(defun iedit-next-occurrence ()
View
@@ -128,6 +128,25 @@ foo"
123foo456123foo456
123foo456")))))
+(ert-deftest iedit-overlay-at-end-of-buffer ()
+ (with-iedit-test-fixture
+ "foo
+foo"
+ (lambda ()
+ (iedit-mode)
+ (highlight-changes-mode 1)
+ (goto-char (point-min))
+ (goto-char (point-at-eol))
+ (iedit-mode)
+ (delete-region (point) (1- (point)))
+ (should (string= (buffer-string)
+ "fo
+fo"))
+ (insert "b")
+ (should (string= (buffer-string)
+ "fob
+fob")))))
+
(ert-deftest iedit-mode-start-from-isearch-test ()
(with-iedit-test-fixture
"foo

0 comments on commit 66ca4f9

Please sign in to comment.