C: Fix uncrustify recentering when saving buffer from another buffer

master
Pierre Neidhardt 2018-11-20 19:51:50 +01:00
parent ac99acab06
commit ed8cf91c88
1 changed files with 3 additions and 1 deletions

View File

@ -119,7 +119,9 @@ If the command is not `make', run it normally. "
(insert-buffer-substring formatbuf))
(goto-line old-line)
(move-to-column old-column)
(recenter old-window-start-line))
(ignore-errors
;; recenter won't work if selected window is not the target buffer.
(recenter old-window-start-line)))
(kill-buffer formatbuf)))
;; Return nil if in a `write-file-functions'.
nil)