[TxMt] Re: Large file does not properly paint text when scrolling in v2.0 on MacOS Catalina
Allan Odgaard
mailinglist at textmate.org
Mon Oct 14 08:44:58 UTC 2019
On 11 Oct 2019, at 9:02, Jacob Carlborg wrote:
> TextMate has always had problems with large files since the move to
> TextMate 2. I think the text rendering is implemented differently
> compared to TextMate 1.5.
TextMate 2 got a completely new layout engine that supported
proportional width fonts, indented soft wrap, mixed fonts with different
line heights, folding arbitrary subsets, enabling/disabling soft wrap
for subsets, etc.
As obtaining text metrics is a slow operation, I decided to make it
lazy, which is what has resulted in the unsatisfying behavior with soft
wrap:
When scrolling through a file, lines will wrap the first time they are
rendered, causing the total height of the document to change, and this
can cause text to “jump around”.
This is worst if opening a file with many long soft wrapped lines, and
then moving to the bottom, because the bottom of the file will then
change after having moved there, and scrolling up is also very confusing
when hitting a line that hasn’t been wrapped yet.
I’ve decided that rather than try to fix this for TextMate 2.0 it is
better to write a new layout engine because the soft wrap issue is not
the only thing I want to address.
I don’t want to say anything that can be interpreted as promises or
pre-announcements, but the new layout engine / text view is what I am
currently working on, and in addition to fixing the lazy layout issue,
performance for large files (as in hundreds of megabytes) is also a high
priority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macromates.com/textmate/attachments/20191014/a2a9b472/attachment.html>
More information about the TextMate
mailing list