Re: Restoring the vertical position

Mitchell <[email protected]> Mon, 17 Mar 2025 12:14:37 -0400
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Hi,

> On Mar 17, 2025, at 12:06 PM, Jean Lalonde <[email protected]> wrote:
> 
> I forgot to mention that I also tried
> 
> intFisrtVisibleLine := SCI_GETFIRSTVISIBLELINE()
> ...
> SCI_  SETFIRSTVISIBLELINE(intFisrtVisibleLine)
> 
> But this does not restore the expected position. FYI, SCI_SETWRAPMODE() is enabled.

Then I think you’ll have to save with SCI_DOCLINEFROMVISIBLE(SCI_GETFIRSTVISIBLELINE) and restore with SCI_VISIBLEFROMDOCLINE.

You might need to trigger a Scintilla repaint in-between your SCI_SETTEXT and SCI_VISIBLEFROMDOCLINE. You could wait for an SCN_UPDATEUI notification, but that would require some extra work.

Cheers,
Mitchell

-- 
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/911ADA36-8ACD-49FA-9626-9C4FFA1C9D07%40foicica.com.