Steps to reproduce:
* Set font size to larger than the default. * Position the cursor towards the bottom of a file such that the viewport is displaying the bottom part of that file. * Switch to another tab. * Switch back to the original tab. * See that although the cursor is still in the same place, the viewport is now displaying an earlier part of the file.
It looks as if the viewport position calculation is not taking into account the larger font size.
Cheers, James.
On 24 Sep 2014, at 11:54, James Mead wrote:
[…] It looks as if the viewport position calculation is not taking into account the larger font size.
The problem is with how TextMate does lazy layout, it does an initial heuristic (fast) layout and uses that for scroll positions and then only does the real (slow) layout when needing to display the text, which can “push things around” (and cause the previous correct scroll position to now be incorrect).
Long-term I hope to improve this, but it’s non-trivial because laying out text is surprisingly slow.