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))
|
||||
(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)))
|
||||
|
|
Loading…
Add table
Reference in a new issue