Open frankrolf opened 1 year ago
this still works...
import vanilla
w = vanilla.Window((300, 300))
w.t = vanilla.TextEditor((0, 0, 0, 0), "abc\n" * 100)
w.open()
ts = w.t.getNSTextView().textStorage()
w.t.getNSTextView().scrollRangeToVisible_((len(ts), 0))
I've noticed it, too.
the scrolling code works only the view is not updated somehow... I tried already to add the same runUntilDate trick without luck
silly:
when calling this twice it works again --> edited: in RoboFont but not in DrawBot, dont get it...
https://github.com/typemytype/drawbot/blob/master/drawBot/ui/codeEditor.py#L1524
def scrollToEnd(self):
range = (self.getNSTextView().string().length(), 0)
self.getNSTextView().scrollRangeToVisible_(range)
self.getNSTextView().scrollRangeToVisible_(range)
I’ve been noticing that the output section does not (no longer?) scroll up to show the last line; this means that I need to scroll up manually to see any tracebacks/errors.
I tried a different font (just in case), but this seems to be consistent behavior.
Using DrawBot 3.129 on macOS 13.0.1