Commit 8ebb6830 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent e980a3c9
...@@ -268,7 +268,8 @@ available: ...@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment