]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't wrap lines at NBSP when nobreak-char-display is t
authorEli Zaretskii <eliz@gnu.org>
Sat, 15 Aug 2020 10:23:58 +0000 (13:23 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 15 Aug 2020 10:23:58 +0000 (13:23 +0300)
* 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

index 4fe1c4288afa7c39073eb8e4c7b8ba53cfc44257..f05319aa64479f3da2a14b20b6efcd11f7eef9b1 100644 (file)
@@ -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;
                }