[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 38b4bbb7e1: A cleaner fix for display bug#52947
From: |
Eli Zaretskii |
Subject: |
master 38b4bbb7e1: A cleaner fix for display bug#52947 |
Date: |
Tue, 4 Jan 2022 08:38:19 -0500 (EST) |
branch: master
commit 38b4bbb7e1abaa9f925048840b53290e2011a851
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
A cleaner fix for display bug#52947
* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Don't call
set_iterator_to_next here...
(display_tab_bar_line): ...call it here, even if we exit the loop
because we encounter a newline.
---
src/xdisp.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 6e94ff5ec6..0635cad0d1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13745,6 +13745,7 @@ display_tab_bar_line (struct it *it, int height)
so there's no need to check the face here. */
it->start_of_box_run_p = true;
+ bool enough = false;
while (it->current_x < max_x)
{
int x, n_glyphs_before, i, nglyphs;
@@ -13791,11 +13792,12 @@ display_tab_bar_line (struct it *it, int height)
++i;
}
+ enough = ITERATOR_AT_END_OF_LINE_P (it);
+ set_iterator_to_next (it, true);
+
/* Stop at line end. */
- if (ITERATOR_AT_END_OF_LINE_P (it))
+ if (enough)
break;
-
- set_iterator_to_next (it, true);
}
out:;
@@ -13878,10 +13880,6 @@ tab_bar_height (struct frame *f, int *n_rows, bool
pixelwise)
{
it.glyph_row = temp_row;
display_tab_bar_line (&it, -1);
- /* If the tab-bar string includes newlines, get past it, because
- display_tab_bar_line doesn't. */
- if (ITERATOR_AT_END_OF_LINE_P (&it))
- set_iterator_to_next (&it, true);
}
clear_glyph_row (temp_row);
@@ -14007,10 +14005,6 @@ redisplay_tab_bar (struct frame *f)
extra -= h;
}
display_tab_bar_line (&it, height + h);
- /* If the tab-bar string includes newlines, get past it,
- because display_tab_bar_line doesn't. */
- if (ITERATOR_AT_END_OF_LINE_P (&it))
- set_iterator_to_next (&it, true);
}
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 38b4bbb7e1: A cleaner fix for display bug#52947,
Eli Zaretskii <=