Quantcast
Viewing all articles
Browse latest Browse all 296

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

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?

Viewing all articles
Browse latest Browse all 296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>