[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 8ebb683: Avoid errors with recentering in 'skelet
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 8ebb683: Avoid errors with recentering in 'skeleton-insert' |
Date: |
Sat, 30 Jun 2018 05:08:08 -0400 (EDT) |
branch: emacs-26
commit 8ebb6830fafcd272bd0d6f7f9d765ef72500ffc5
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid errors with recentering in 'skeleton-insert'
* lisp/skeleton.el (skeleton-insert): Don't recenter if we are
running in a buffer other than the one displayed in the selected
window. (Bug#31950)
---
lisp/skeleton.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 90e3819..e3cebba 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -268,7 +268,8 @@ available:
(or (eolp) (not skeleton-end-newline) (newline-and-indent))
(run-hooks 'skeleton-end-hook)
(sit-for 0)
- (or (pos-visible-in-window-p beg)
+ (or (not (eq (window-buffer) (current-buffer)))
+ (pos-visible-in-window-p beg)
(progn
(goto-char beg)
(recenter 0)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 8ebb683: Avoid errors with recentering in 'skeleton-insert',
Eli Zaretskii <=