Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

.Lines[intIndex].Position always returns 0. - Latest version, not 3.6 release. #539

@joeduf

Description

@joeduf

In a slightly modified copy of the Scintilla.NET DEMO master app...

Just under the form constructor...

ScintillaNET.Scintilla TextArea; // just like the original demo

Inside the MainForm_Load(...

TextArea = new ScintillaNET.Scintilla(); // also just like the original demo

TextArea.UpdateUI += (this.UpdateUICustomGUIDColorizer); // added so I can customize GUID (not UUID) colorization

Inside my private void UpdateUICustomGUIDColorizer(object sender, UpdateUIEventArgs e)...

int startPos = TextArea.Lines[TextArea.FirstVisibleLine].Position;

startPos is ALWAYS 0 (zero) even though TextArea.FirstVisibleLine is correct... it does not matter how you move / scroll / position the cursor the .Position property never accurately reflects the document character index

Putting this In other words, if I extract any Line object from the Lines collection and try to fetch the position of that Line object I ways get zero regardless of whether it is Line 0, Line 1, Line 73, etc.

I'm trying to fetch just the text visible on the screen editor text area for a quick custom colorization with StartStyling / SetStyling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions