diff options
| author | Eli Zaretskii | 2024-06-20 13:42:04 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-06-20 13:42:04 +0300 |
| commit | 74af691b90e69eb70d47782419edfab7d6503dc2 (patch) | |
| tree | bc5742625dec6cf2d42b7b9894b47c728af6bb7f /src | |
| parent | 775aeabcfbf84c950610738cd130bf652c77bfa5 (diff) | |
| download | emacs-74af691b90e69eb70d47782419edfab7d6503dc2.tar.gz emacs-74af691b90e69eb70d47782419edfab7d6503dc2.zip | |
Fix last change
* src/xdisp.c (handle_line_prefix): Set the 'align_visually_p'
only after pushing the iterator.
(pop_it): Reset the 'align_visually_p' flag. (Bug#71605)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 5987813cd28..18ac5b69d7e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7288,6 +7288,7 @@ pop_it (struct it *it) | |||
| 7288 | it->bidi_p = p->bidi_p; | 7288 | it->bidi_p = p->bidi_p; |
| 7289 | it->paragraph_embedding = p->paragraph_embedding; | 7289 | it->paragraph_embedding = p->paragraph_embedding; |
| 7290 | it->from_disp_prop_p = p->from_disp_prop_p; | 7290 | it->from_disp_prop_p = p->from_disp_prop_p; |
| 7291 | it->align_visually_p = false; | ||
| 7291 | if (it->bidi_p) | 7292 | if (it->bidi_p) |
| 7292 | { | 7293 | { |
| 7293 | bidi_pop_it (&it->bidi_it); | 7294 | bidi_pop_it (&it->bidi_it); |
| @@ -24488,17 +24489,14 @@ static void | |||
| 24488 | handle_line_prefix (struct it *it) | 24489 | handle_line_prefix (struct it *it) |
| 24489 | { | 24490 | { |
| 24490 | Lisp_Object prefix; | 24491 | Lisp_Object prefix; |
| 24492 | bool wrap_prop = false; | ||
| 24491 | 24493 | ||
| 24492 | if (it->continuation_lines_width > 0) | 24494 | if (it->continuation_lines_width > 0) |
| 24493 | { | 24495 | { |
| 24494 | prefix = get_line_prefix_it_property (it, Qwrap_prefix); | 24496 | prefix = get_line_prefix_it_property (it, Qwrap_prefix); |
| 24495 | if (NILP (prefix)) | 24497 | if (NILP (prefix)) |
| 24496 | prefix = Vwrap_prefix; | 24498 | prefix = Vwrap_prefix; |
| 24497 | /* Interpreting :align-to relative to the beginning of the logical | 24499 | wrap_prop = true; |
| 24498 | line effectively renders this feature unusable, so we make an | ||
| 24499 | exception for this use of :align-to. */ | ||
| 24500 | if (!NILP (prefix)) | ||
| 24501 | it->align_visually_p = true; | ||
| 24502 | } | 24500 | } |
| 24503 | else | 24501 | else |
| 24504 | { | 24502 | { |
| @@ -24513,6 +24511,11 @@ handle_line_prefix (struct it *it) | |||
| 24513 | iterator stack overflows. So, don't wrap the prefix. */ | 24511 | iterator stack overflows. So, don't wrap the prefix. */ |
| 24514 | it->line_wrap = TRUNCATE; | 24512 | it->line_wrap = TRUNCATE; |
| 24515 | it->avoid_cursor_p = true; | 24513 | it->avoid_cursor_p = true; |
| 24514 | /* Interpreting :align-to relative to the beginning of the logical | ||
| 24515 | line effectively renders this feature unusable, so we make an | ||
| 24516 | exception for this use of :align-to. */ | ||
| 24517 | if (wrap_prop && CONSP (prefix) && EQ (XCAR (prefix), Qspace)) | ||
| 24518 | it->align_visually_p = true; | ||
| 24516 | } | 24519 | } |
| 24517 | } | 24520 | } |
| 24518 | 24521 | ||