Alexey-T / CudaText

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

[HiOccur] Use a different color in micromap for the word under caret when `caret_allow = true` #5452

Open pintassilgo opened 7 months ago

pintassilgo commented 7 months ago

Currently, we can set a special background color for the word under the caret with the option theme_item_current, with that one having a different color from other matches.

The same should apply for the marks in micromap. Currently, the mark for the word under the caret has the same color as the others matches.

Findbar already supports this because when you use findbar the word is selected, then the selected word is marked at the 3rd column (light blue in default theme), so you know where the caret is when you look at scrollbar/micromap.

pintassilgo commented 7 months ago

I don't know where in HiOccur code controls the color of micromap mark. For me it's a tone of blue, but I don't know where this is written in HiOccur code so that I can try to change for the mark related to current occurrence (the one under the caret).

Alexey-T commented 7 months ago

HiOccur adds the micromap mark with given TAG. then special TAG value is handled specially in Cud.

const
  cTagOccurrences = 101; //see plugin 'Highlight Occurrences'
  cTagSpellChecker = 105; //see plugin 'Spell Checker' 

fix must be

I dont want to add theme-color. maybe suggest how to mix existing colors to get 'new color of mark'.

Alexey-T commented 7 months ago

Let's delay the work until the next Cud release. after next release 1.212.0 maybe we will work on it.

Alexey-T commented 7 months ago

this can be made specially only in Cud. app can detect the mark (with special tag) under the caret. and colorize it diferrently. it's the better way.