diff options
author | Yuan Fu <casouri@gmail.com> | 2022-11-21 12:54:35 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-11-21 12:54:35 -0800 |
commit | aaeaa310f0391f5a5193e1a3d6e026986c4f2c0c (patch) | |
tree | 67765b95359bfc462e95606043e6b0cea3bb7c49 /lisp/emacs-lisp/subr-x.el | |
parent | b2ea38ab03e801859163b74a292aa75008e36541 (diff) | |
parent | f176a36f4629b56c9fd9e3fc15aebd04a168c4f5 (diff) | |
download | emacs-aaeaa310f0391f5a5193e1a3d6e026986c4f2c0c.tar.gz emacs-aaeaa310f0391f5a5193e1a3d6e026986c4f2c0c.tar.bz2 emacs-aaeaa310f0391f5a5193e1a3d6e026986c4f2c0c.zip |
Merge remote-tracking branch 'savannah/master' into feature/tree-sitter
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 6e4d88b4df3..18087bc937f 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -322,6 +322,10 @@ as the new values of the bound variables in the recursive invocation." ;; Keeping a work buffer around is more efficient than creating a ;; new temporary buffer. (with-current-buffer (get-buffer-create " *string-pixel-width*") + ;; `display-line-numbers-mode' is enabled in internal buffers + ;; that breaks width calculation, so need to disable (bug#59311) + (when (bound-and-true-p display-line-numbers-mode) + (display-line-numbers-mode -1)) (delete-region (point-min) (point-max)) (insert string) (car (buffer-text-pixel-size nil nil t))))) |