Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

"Highlight occurences" plugin doesn't work with multi-line fragments #5567

Open hastyeagle opened 1 week ago

hastyeagle commented 1 week ago

It seems that Highlight occurences doesn't work if there is a line end character involved. I'd like to be able to select the last character in the previous line (CR/LF/etc.) and then continue onto the next line with whatever I'm selecting. However, it seems when I hit the line end character, it just doesn't work. Any way to get it to work with a line end character?

https://synwrite.sourceforge.net/forums/viewtopic.php?p=19234

Alexey-T commented 1 week ago

Somebody wants to work on plugin, to support multi-line fragments, please?

JairoMartinezA commented 2 days ago

Alex,

Looking into the code and reviewing the API documentation, and after some tests: image

I think the MARKERS_ADD functionality doesn't accept "crossing to a new line", even if I increase the length parameter.

What other command do we need to use to "mark" many lines?

Alexey-T commented 2 days ago

yes, API don't support marker for several lines. but plugin can find proper multi-line fragments and place markers on the 1st line of match. so that user will find fragments.