mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
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)
This commit is contained in:
parent
e980a3c992
commit
8ebb6830fa
1 changed files with 2 additions and 1 deletions
|
|
@ -268,7 +268,8 @@ available:
|
||||||
(or (eolp) (not skeleton-end-newline) (newline-and-indent))
|
(or (eolp) (not skeleton-end-newline) (newline-and-indent))
|
||||||
(run-hooks 'skeleton-end-hook)
|
(run-hooks 'skeleton-end-hook)
|
||||||
(sit-for 0)
|
(sit-for 0)
|
||||||
(or (pos-visible-in-window-p beg)
|
(or (not (eq (window-buffer) (current-buffer)))
|
||||||
|
(pos-visible-in-window-p beg)
|
||||||
(progn
|
(progn
|
||||||
(goto-char beg)
|
(goto-char beg)
|
||||||
(recenter 0)))
|
(recenter 0)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue