Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #21 from lewang/fix-overlay-at-eob
Browse files Browse the repository at this point in the history
Fix overlay at eob
  • Loading branch information
victorhge committed Oct 16, 2012
2 parents 9cfd76f + a5ce38a commit 66ca4f9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iedit-lib.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
19 changes: 19 additions & 0 deletions iedit-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66ca4f9

Please sign in to comment.