Don't use a redisplay optimization in a certain case on ttys
* src/dispnew.c (is_tty_root_frame_with_visible_child): New function. * src/dispextern.h: Declare it. * src/xdisp.c (redisplay_internal): Don't use optimization 1 for tty root frames with a visible child frame.
This commit is contained in:
parent
eaa79e25a6
commit
0fd5b2d146
3 changed files with 18 additions and 1 deletions
|
@ -3953,6 +3953,7 @@ Lisp_Object frames_in_reverse_z_order (struct frame *f, bool visible);
|
|||
bool is_tty_frame (struct frame *f);
|
||||
bool is_tty_child_frame (struct frame *f);
|
||||
bool is_tty_root_frame (struct frame *f);
|
||||
bool is_tty_root_frame_with_visible_child (struct frame *f);
|
||||
void combine_updates (Lisp_Object root_frames);
|
||||
void combine_updates_for_frame (struct frame *f, bool inhibit_id_p);
|
||||
void tty_raise_lower_frame (struct frame *f, bool raise);
|
||||
|
|
|
@ -3479,6 +3479,18 @@ is_tty_root_frame (struct frame *f)
|
|||
return !FRAME_PARENT_FRAME (f) && is_tty_frame (f);
|
||||
}
|
||||
|
||||
/* Return true if frame F is a tty root frame that has a visible child
|
||||
frame.. */
|
||||
|
||||
bool
|
||||
is_tty_root_frame_with_visible_child (struct frame *f)
|
||||
{
|
||||
if (!is_tty_root_frame (f))
|
||||
return false;
|
||||
Lisp_Object z_order = frames_in_reverse_z_order (f, true);
|
||||
return CONSP (XCDR (z_order));
|
||||
}
|
||||
|
||||
/* Return the index of the first enabled row in MATRIX, or -1 if there
|
||||
is none. */
|
||||
|
||||
|
|
|
@ -17279,7 +17279,11 @@ redisplay_internal (void)
|
|||
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))
|
||||
&& !hscrolling_current_line_p (w)
|
||||
/* A root frame may have visible children displayed in its
|
||||
current matrix, so that we can't do the below with its
|
||||
current matrix. */
|
||||
&& !is_tty_root_frame_with_visible_child (it.f))
|
||||
{
|
||||
/* If this is not the window's last line, we must adjust
|
||||
the charstarts of the lines below. */
|
||||
|
|
Loading…
Add table
Reference in a new issue