[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to record the line number pixel width for each window.

From: Keith David Bershatsky
Subject: Re: How to record the line number pixel width for each window.
Date: Fri, 6 Dec 2019 09:07:10 -0800

Thank you, Eli, for reading and responding to this thread.  Once the redisplay 
cycle gets to the place where update_window is called, all simulations 
performed by moving IT have already concluded, and update_window is the 
launch-point for features 17684/22873.  I would be comfortable using an 
existing instance of screen simulation and perform the essence of 
line_number_display_width without launching a new session with start_display.  
The goal is to be as efficient as possible when storing the values so that they 
are reliably accessible when update_window gets called.  My general feeling is 
that update_window is not the place to do screen simulations (moving IT) and 
running a _new_ instance of start_display for each window is not efficient.

Is there an existing instance of a running simulation for each window somewhere 
in xdisp.c where I could add the guts of line_number_display_width without 
launching a new start_display; and, if so, some pointers on where that might be 
located would be greatly appreciated?

On Dec 6, 2019, at 12:10 AM, Eli Zaretskii <address@hidden> wrote:

>> Date: Thu, 05 Dec 2019 10:19:07 -0800
>> From: Keith David Bershatsky <address@hidden>
>> How can I perfect the recorded value of the line number pixel width, and 
>> also avoid expressly firing up a new instance of start_display and moving IT 
>> for the sole purpose of determining the value for each window during 
>> update_window (in dispnew.c)?
> I guess you will have to write code that stores the last value
> computed during redisplay in the window object.
> Not that I think this is a good idea, because the display engine has
> its own rules for which parts of the window it redraws, so you might
> bump into situations where the value is not accurate.  Nor do I
> understand why you don't like what line_number_display_width does,
> because that's the right solution for this kind of problems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]