Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix overlay at eob #21

Merged
merged 2 commits into from

2 participants

@lewang
Collaborator

Test-case included.

@victorhge
Owner

I don't get it. You test case can pass without the change. Is it only for Emacs 24.2?

@lewang
Collaborator
@victorhge victorhge merged commit 66ca4f9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 21 additions and 1 deletion.
  1. +2 −1  iedit-lib.el
  2. +19 −0 iedit-tests.el
View
3  iedit-lib.el
@@ -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
19 iedit-tests.el
@@ -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
Something went wrong with that request. Please try again.