summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-10-10 07:50:20 -0700
committerGlenn Morris <rgm@gnu.org>2020-10-10 07:50:20 -0700
commit0ed0dac0ca501a9f328c332a7993bf0624c3873c (patch)
treef0cdd1415756b2a285400681bcb60fd9b06c830d /src
parent607dacb5a969ecbca08275d430132b202becd9db (diff)
parentc00606171f88be0df2c19346fa53f401ea71c71f (diff)
downloademacs-0ed0dac0ca501a9f328c332a7993bf0624c3873c.tar.gz
Merge from origin/emacs-27
c00606171f (origin/emacs-27) A better fix for bug#43886 3196fd44c3 Avoid crashes when a theme is loaded with one frame suspended 0407b15500 Removed an incorrectly placed extra word in the semantic docs 040dcbe53e Fix current-line hscrolling when overlays change c56eeba2ce Extend tests for shell-command-dont-erase-buffer
Diffstat (limited to 'src')
-rw-r--r--src/term.c4
-rw-r--r--src/xdisp.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index 36776448451..53a1016183b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3856,7 +3856,9 @@ clear_tty_hooks (struct terminal *terminal)
terminal->update_begin_hook = 0;
terminal->update_end_hook = 0;
terminal->set_terminal_window_hook = 0;
- terminal->defined_color_hook = 0;
+ /* Don't clear the defined_color_hook, as that makes it impossible
+ to unload or load a theme when some TTY frame is suspended. */
+ /* terminal->defined_color_hook = 0; */
terminal->mouse_position_hook = 0;
terminal->frame_rehighlight_hook = 0;
terminal->frame_raise_lower_hook = 0;
diff --git a/src/xdisp.c b/src/xdisp.c
index 915950f5e54..5a62cd6eb52 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15757,7 +15757,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. */