Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Incremental Search Affecting Search Text Selection Color #80

scyclops opened this Issue Apr 8, 2014 · 4 comments


None yet
3 participants

scyclops commented Apr 8, 2014

This issue is a bit strange and I'm not totally sure it's sublemacspro or ST3 causing it but when I upgraded to the latest sublemacspro version on ST3, incremental searches are now highlighting the found text using my theme's color settings for Strings instead of the color setting for selections.

When I disable sublemacspro and do an incremental search, the color used is correct. I've tried using multiple themes and the issue doesn't seem to be specific to the theme I'm using.

I tried to track down what caused this in sublemacspro's package but all I found was that if I commented out https://github.com/grundprinzip/sublemacspro/blob/master/Default.sublime-keymap#L99 then that made the problem go away (at the price of the incremental search key mapping no longer working..).

grundprinzip added a commit that referenced this issue Apr 8, 2014


grundprinzip commented Apr 8, 2014

This should be fixed in 2.0.4 that should be available soon in ST via package control. Please let me know if this helped.

scyclops commented Apr 9, 2014

I just pulled the latest changes from Github but it didn't seem to fix the
selection color.

After looking at your latest commits, I changed line 1786 in jove.py to
have "selection" as the 3rd argument instead of "string" and this changed
the color to the selection color defined in my theme.

That said, when I made this change, I realized that the selection color in
my theme wasn't being used by ST3 when I disabled sublemacspro and the
color ST3 was using was a color that wasn't even defined in my theme
(#FFE792). So long story short, I defined a new customselection color in
my theme and set it to #FFE792 and then changed line 1786 in jove.py to
pass "customselection" as the 3rd argument. So I'm happy with what I've
got setup now but I am confused by where ST3 was getting the color value
(maybe something hardcoded and/or a bug in ST3..).


canoeberry commented May 19, 2014

When I wrote the i-search code I was trying to figure out how to make it look like the built-in i-search. My highlighted search strings were always yellow until I completed the search, at which point they became the selection color. So I found "string" as the scope that matched the color Sublime was using itself.

I think it's important that the selection (multiple cursors and all) are differentiated from an in-progress search where you are assigning matches as you go to future cursors. Like CMD-D in vanilla ST except that i-search lets you have non-contiguous selections.

It should be possible to see what sublime is using for the scope selector, right? Let me see if I can confirm my choice.

@canoeberry canoeberry self-assigned this May 19, 2014


canoeberry commented Sep 12, 2014

I think it's time to close this. My colors exactly match the default colors. If you think I have made a mistake, let me know.

@canoeberry canoeberry closed this Jan 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment