GNU bug report logs -
#77452
31.0.50; Wide characters in left margin on ttys
Previous Next
Full log
View this message in rfc822 format
in emacs -Q -nw, eval
(defun foo ()
(interactive)
(with-current-buffer (get-buffer-create "*foo*")
(setq left-margin-width 2)
(erase-buffer)
(insert "abc")
(insert (propertize "def" 'display '((margin left-margin) "1💡")))))
and M-x foo.
This creates a buffer "*foo*" displaying a string in a left
margin area of width 2. The string consists of 2 characters but has a display
width of 3 since the light bulb character has a display width of 2.
(char-width ?💡)
=> 2
So, writing the left margin string to the terminal advances the output
cursor by 3 not 2. This confuses the display engine, as one can witness
by editing in the *foo* buffer, adding new lines etc.
In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.3.0, NS
appkit-2575.40 Version 15.3.2 (Build 24D81)) of 2025-04-02 built on
pro2
Repository revision: 71b3298c0e813ba1432e75370c460eea5caf72d5
Repository branch: master
System Description: macOS 15.3.2
This bug report was last modified 49 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.