Closed ryu1kn closed 7 years ago
So,
I should probably drop the feature to unmark a text by highlighting it, and always use the list of pattern to select remove marks, for consistency...
Released as v0.4.0
https://github.com/ryu1kn/vscode-text-marker/releases/tag/8ba08408c246b
I should probably drop the feature to unmark a text by highlighting it, and always use the list of pattern to select remove marks, for consistency...
Maybe I don't need to because the following can be resolved.
- It would be complicated/impractical to find the regex pattern giving the mark under the cursor
- It would be confusing that I can/cannot unmark a text by selecting the text depending on the way I maked them (either by selecting it or writing a regex)
As TextMarker always updates the locations of matching texts anyway, if I not only apply highlight but keep track of the locations, I should be able to identify a pattern from a text location. It doesn't seem to be complicated but it could cause a performance issue if there are tens of thousands of locations registered.
Anyway with this way, I can unhighlight regex patterns as well, then the problem that I could unhighlight only non-regex type patterns will disappear.
Expecting user actions:
QuickPick
)It must be confusing that you can unmark a text by selecting it if the text was highlighed & command executed, but cannot if it was specified by regex...
Then it could be better if I could remove whatever mark currently under the cursor, suggested in https://github.com/ryu1kn/vscode-text-marker/issues/6
But if there are 2 texts
aaa
andbbb
marked by regex[ab]*
, would it be unnatural if both marks are removed if I executehighlight/unhighlight
command just on textaaa
? And in the first place, is it even possible to find a corresponding regex pattern just from a cursor position?