2009/8/10 Jean-Philippe Bernardy <jeanphilippe.berna...@gmail.com>:
>
> On Mon, Aug 10, 2009 at 3:50 PM, Colin McQuillan<m.ni...@googlemail.com> 
> wrote:
>
>>>  Colin: Do you know why the "getRegion" field of Window takes a Buffer 
>>> parameter?
>>>  There is only one buffer in the window...
>
>> One BufferRef, but many FBuffers. In this case, I want to be able to
>> tell if typing in a buffer has caused the cursor to go off the screen.
>> Typing and scrolling doesn't change the Window but it does change the
>> FBuffer.
>>
>> Or in other words, the geometry of a window is given by a function
>> from text to layout information (in this case, the visible region).
>
> I'm not sure that I follow yet.
>
> I can see that changing the contents of the buffer should influence
> the region which is displayed.
> However, I thought that this region was recomputed after each refresh
> (in the layout function), and therefore
> an extra dependency is not needed.

Since a window only depends on its size (and other parameters
perhaps), we could optimize refreshEditor by only calling layout if
the window size has changed.

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to