From: Eli Zaretskii Date: Sat, 15 Aug 2020 10:23:58 +0000 (+0300) Subject: Don't wrap lines at NBSP when nobreak-char-display is t X-Git-Tag: emacs-28.0.90~6584^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=83000ae6d7c6e3c615b16d2ea9274e1088d24178;p=emacs.git Don't wrap lines at NBSP when nobreak-char-display is t * src/xdisp.c (get_next_display_element): When nobreak-char-display is t, display NBSP and non-ASCII hyphens as themselves, not as their ASCII counterparts, just with the nobreak-space/nobreak-hyphen face. (Bug#42811) --- diff --git a/src/xdisp.c b/src/xdisp.c index 4fe1c4288af..f05319aa644 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7555,7 +7555,7 @@ get_next_display_element (struct it *it) /* Merge `nobreak-space' into the current face. */ face_id = merge_faces (it->w, Qnobreak_space, 0, it->face_id); - XSETINT (it->ctl_chars[0], ' '); + XSETINT (it->ctl_chars[0], it->c); ctl_len = 1; goto display_control; } @@ -7568,7 +7568,7 @@ get_next_display_element (struct it *it) /* Merge `nobreak-space' into the current face. */ face_id = merge_faces (it->w, Qnobreak_hyphen, 0, it->face_id); - XSETINT (it->ctl_chars[0], '-'); + XSETINT (it->ctl_chars[0], it->c); ctl_len = 1; goto display_control; }