From 83000ae6d7c6e3c615b16d2ea9274e1088d24178 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Aug 2020 13:23:58 +0300 Subject: [PATCH] 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) --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5