mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
Avoid errors in shr-pixel-column due to dedicated windows
* lisp/net/shr.el (shr-pixel-column): If we are switching to another buffer in the selected window, make that window temporarily non-dedicated. (Bug#24950)
This commit is contained in:
parent
3138598dd8
commit
a725592db8
1 changed files with 3 additions and 0 deletions
|
@ -518,6 +518,9 @@ size, and full-buffer size."
|
||||||
(current-column)
|
(current-column)
|
||||||
(if (not (get-buffer-window (current-buffer)))
|
(if (not (get-buffer-window (current-buffer)))
|
||||||
(save-window-excursion
|
(save-window-excursion
|
||||||
|
;; Avoid errors if the selected window is a dedicated one,
|
||||||
|
;; and they just want to insert a document into it.
|
||||||
|
(set-window-dedicated-p nil nil)
|
||||||
(set-window-buffer nil (current-buffer))
|
(set-window-buffer nil (current-buffer))
|
||||||
(car (window-text-pixel-size nil (line-beginning-position) (point))))
|
(car (window-text-pixel-size nil (line-beginning-position) (point))))
|
||||||
(car (window-text-pixel-size nil (line-beginning-position) (point))))))
|
(car (window-text-pixel-size nil (line-beginning-position) (point))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue