When set git-gutter:visual-line to t, and start editing a new empty `main.rs`, cause following error.
zw963 opened this issue · 5 comments
zw963 commented
error in process sentinel: line-move-visual: End of buffer
error in process sentinel: End of buffer
zw963 commented
For how to reproduce:
-
Open a rust source file, e.g.
src/main.rs
. -
mark all content, and delete it.
-
start typing from beginning of buffer, when typing, type will
interrupt by this error message in minibuffer.
How to fix it.
Remove (setq git-gutter:visual-line to t)
config.
syohex commented
diff --git a/git-gutter.el b/git-gutter.el
index 01db6b2..d9ff0bf 100644
--- a/git-gutter.el
+++ b/git-gutter.el
@@ -467,8 +467,10 @@ Can be a directory-local variable in your project.")
(defun git-gutter:next-visual-line (arg)
(let ((line-move-visual t))
- (with-no-warnings
- (next-line arg))))
+ (or (ignore-errors
+ (next-line arg)
+ t)
+ (goto-char (point-max)))))
(defun git-gutter:view-for-unchanged ()
(save-excursion
zw963 commented
It works, should we merge this diff into master?
syohex commented
I have sent PR #182, however I have no longer push permission. Please wait response of current maintainer.
jcs090218 commented
Merged! Thank you for all your participation!