[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding fake cursors when resizing a window.
From: |
Keith David Bershatsky |
Subject: |
Re: Adding fake cursors when resizing a window. |
Date: |
Sun, 10 Mar 2019 11:04:03 -0700 |
I have been working on stepping through the code and have observed the
following series of events:
- When there is a two-window left/right split and the user calls delete-window
on the right window, update_window runs a couple of times.
- draw_glyphs does its job on all relevant screen lines.
- Fake cursors are placed on all relevant screen lines immediately following
the calls to draw_glyphs.
- Although the call to remove/add scroll bars happens earlier in time, it is
not actually processed by Emacs until the tail end of read_char, at
approximately read_decoded_event_from_main_queue. Here is a screenshot of gdb
at the point where this happens:
http://www.lawlist.com/images/after_03_10_2019.png
- Although the scroll bar in the center is no longer visible because it was
overwritten during update_window, Emacs tries to remove the center scroll bar
anyway and that is what erases the fake cursors along the vertical strip in the
center of the screen.
- At about the exact same time that the scroll bar in the center of the screen
gets erased, the right scroll bar on the far right of the window is added.
I do not know if the scroll bar in the center will always be completely
overwritten by update_window in this circumstance. If it will always be
completely overwritten in this situation, then one idea would be to figure out
how to suppress formally removing the scroll bar in the center.
And the other idea, which Martin cautioned against, is to figure out how to
remove the center scroll bar at the outset of update_window (instead of letting
Emacs delay the execution until after all is said and done).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> Date: [03-07-2019 23:55:48] <08 Mar 2019 09:55:48 +0200>
> From: Eli Zaretskii <address@hidden>
> To: Keith David Bershatsky <address@hidden>
> CC: address@hidden,address@hidden
> Subject: Re: Adding fake cursors when resizing a window.
>
> * * *
>
> Step through the code starting at the point where you redraw the fake
> cursors, and see what happens. Maybe some later operation erases
> them, or something.