This project is read-only.

How to keep up with the location of a range when text changes

Topics: Developer Forum, User Forum
Jul 26, 2013 at 10:03 PM
Please bear with me while I explain what I'm doing...

I'm using ScintillaNet in a tabbed editor. My find-replace tool includes a "Find in All Open Docs" function. When used this opens a list (DataGridView) at the bottom of the main window similar to the error list in Visual Studio. Each row displays a match from the search. I want to be able to double-click a row in the list and have the program jump to the proper tab and text position. Each match is a ScintillaNet.Range object created from the index and length of the Regex match. They're marked by setting a style to change the background color.

This works fine, except that when text is edited above the match the position of the range is no longer valid. Is there a built-in method to have the ranges react to changes in the text, or is this something I'll need to do manually?
Jul 27, 2013 at 12:44 AM
Okay, figured that out. Indicators. Duh.