Tags: patch To reproduce, emacs -nw -Q on a terminal not supporting underlining (in my case Terminal.app on macOS). - M-x display-line-number-mode RET - Eval (insert (amke-separator-line)) => the separator line is too long Attached patch fixes that. In GNU Emacs 31.0.50 (build 4, aarch64-apple-darwin24.2.0) of 2024-12-21 built on pro2 Repository revision: cbafbb2dd57993397c0d624461e3611831414e91 Repository branch: cl-packages System Description: macOS 15.2 Configured using: 'configure --without-ns --cache-file /var/folders/1d/k_6t25f94sl83szqbf8gpkrh0000gn/T//config.cache.cl-packages --with-native-compilation --with-mps=yes CC=clang 'CFLAGS=-Wgnu-imaginary-constant -Wunused-result -g -fno-omit-frame-pointer -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -Wno-ignored-attributes -Wno-flag-enum -Wno-missing-method-return-type -Wno-variadic-macros -Wno-strict-prototypes -Wno-availability -Wno-nullability-completeness' --prefix=/Users/gerd/.local'