aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-01-13 16:45:31 +0200
committerEli Zaretskii2021-01-13 16:45:31 +0200
commit19b169c4e22abe5112d36ff4740f382409f6acdf (patch)
tree5a28c390ac15a00325a3b64ff64ddbd870498e52 /src
parentaeb11da203d011d4331e1e09ec7c2e98584afcb8 (diff)
downloademacs-19b169c4e22abe5112d36ff4740f382409f6acdf.tar.gz
emacs-19b169c4e22abe5112d36ff4740f382409f6acdf.zip
Fix 'visual-line-mode' when 'word-wrap-by-category' is in effect
* src/xdisp.c (move_it_in_display_line_to): Don't reset next_may_wrap after saving a potential wrap point. This fixes the case where several characters in a row can serve as a wrap point. (Bug#45837)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 6a4304d194b..64f401690a6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9285,8 +9285,8 @@ move_it_in_display_line_to (struct it *it,
9285 if (may_wrap && char_can_wrap_before (it)) 9285 if (may_wrap && char_can_wrap_before (it))
9286 { 9286 {
9287 /* We have reached a glyph that follows one or more 9287 /* We have reached a glyph that follows one or more
9288 whitespace characters or a character that allows 9288 whitespace characters or characters that allow
9289 wrapping after it. If this character allows 9289 wrapping after them. If this character allows
9290 wrapping before it, save this position as a 9290 wrapping before it, save this position as a
9291 wrapping point. */ 9291 wrapping point. */
9292 if (atpos_it.sp >= 0) 9292 if (atpos_it.sp >= 0)
@@ -9303,7 +9303,6 @@ move_it_in_display_line_to (struct it *it,
9303 } 9303 }
9304 /* Otherwise, we can wrap here. */ 9304 /* Otherwise, we can wrap here. */
9305 SAVE_IT (wrap_it, *it, wrap_data); 9305 SAVE_IT (wrap_it, *it, wrap_data);
9306 next_may_wrap = false;
9307 } 9306 }
9308 /* Update may_wrap for the next iteration. */ 9307 /* Update may_wrap for the next iteration. */
9309 may_wrap = next_may_wrap; 9308 may_wrap = next_may_wrap;