Re: Restoring the vertical position
Neil Hodgson <[email protected]> Wed, 19 Mar 2025 16:11:43 +1100
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
Me: > Wrapping is a slow operation so is performed as an idle task. The lines will not be wrapped at the time that SCI_SETFIRSTVISIBLELINE is called. A short wait that allows idle processing, possibly on a timer may cause SCI_SETFIRSTVISIBLELINE to produce a result closer to your preference. Since Scintilla runs the idle time wrapping, it may be reasonable for it to offer a SetFirstVisibleLineAfterWrap method that waited until wrapping had passed that line before setting the vertical scroll position. This may be a significant time (possibly 10 seconds or more) later so the operation should be cancelled if the user starts interacting before then as it would be annoying for the visual context to be ripped away once the user starts scrolling or typing, for example. To deal with changing conditions like text enlargement or window resizing, it may be better to use a (character) position to anchor the display instead of a visible or document line. Neil -- You received this message because you are subscribed to the Google Groups "scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/0677F239-6D91-45CA-A5DA-31685D7723D9%40gmail.com.