summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-10-08 14:45:16 +0300
committerEli Zaretskii <eliz@gnu.org>2020-10-08 14:45:16 +0300
commit040dcbe53e39a83fde9cbd09e47b6cfe575d2d52 (patch)
tree42abec23e30295dae674a5dd068e6f7c58103ecb /src
parentc56eeba2ce3b20d1f420db5e0d8cff37df9835c0 (diff)
downloademacs-040dcbe53e39a83fde9cbd09e47b6cfe575d2d52.tar.gz
Fix current-line hscrolling when overlays change
* src/xdisp.c (redisplay_internal): Disable "optimization 1" when auto-hscrolling current line and we're redisplaying the selected window. (Bug#43835)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 05f69b0321f..6c401d0abb9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15581,7 +15581,12 @@ redisplay_internal (void)
&& CHARPOS (this_line_end_pos) == CHARPOS (tlendpos)
/* Line has same height as before. Otherwise other lines
would have to be shifted up or down. */
- && this_line_pixel_height == line_height_before)
+ && this_line_pixel_height == line_height_before
+ /* Cannot use this optimization if hscrolling current
+ line and this line is the current one, because
+ display_line above is not informed about the
+ current-line's vpos, and cannot DTRT in that case. */
+ && !hscrolling_current_line_p (w))
{
/* If this is not the window's last line, we must adjust
the charstarts of the lines below. */