I'm working on an extension for Visual Studio 2010. I'm using the function
IVsTextLines.CreateLineMarker((int)MARKERTYPE.MARKER_READONLY, ...
to make some syntax elements in a text buffer read-only. This causes a problem: it makes the Find and Replace command think that the entire file is read-only. In the Find and Replace dialog, the Replace and Replace All buttons are disabled.
To verify that I was creating the markers correctly: instead of read-only markers, I used MARKER_BOOKMARK. That type did not cause any problem with Find and Replace.
Has anybody seen this problem, and/or have a solution?
(To Replace in a buffer like this, you have to resort to tricks like replacing in a Selection, or in All Files.)