Please add option to show highlight lines even when the window is not in focus.
This is the code notepad2 use for highlight current line, to better show what i'm talking about:
void Style_SetCurrentLineBackground(HWND hwnd)
{
int rgb, iValue;
// Use 2nd default style
int iIdx = (bUse2ndDefaultStyle) ? 12 : 0;
if (bHiliteCurrentLine) {
if (Style_StrGetColor(FALSE,lexDefault.Styles[8+iIdx].szValue,&rgb)) // caret line back
{
SendMessage(hwnd,SCI_SETCARETLINEVISIBLE,TRUE,0);
SendMessage(hwnd,SCI_SETCARETLINEBACK,rgb,0);
if (Style_StrGetAlpha(lexDefault.Styles[8+iIdx].szValue,&iValue))
SendMessage(hwnd,SCI_SETCARETLINEBACKALPHA,iValue,0);
else
SendMessage(hwnd,SCI_SETCARETLINEBACKALPHA,SC_ALPHA_NOALPHA,0);
}
else
SendMessage(hwnd,SCI_SETCARETLINEVISIBLE,FALSE,0);
}
else
SendMessage(hwnd,SCI_SETCARETLINEVISIBLE,FALSE,0);
}
I've made a patch for this feature.
Added two messages:
SCI_GETCARETLINEVISIBLEALWAYS
SCI_SETCARETLINEVISIBLEALWAYS
Will make it show the caret line always even when the window is inactive.
Default setting is off,
This could be further extended. Like adding support for a different caret line color when the window is inactive.
Note: The patch file was made with git.
The patch was made based on scintilla v3.2.3
The Scintilla.h file is generated from Scintilla.iface, so that is the file that should be modified and it should include short explanatory comments. The patch should also include documentation in doc/ScintillaDoc.html.
The 4000+ range is for lexer related messages. The next message number for other features is 2654.
Extension to different colours for inactive is not needed as the application can switch the colour when it receives a focus notification.
ver 2, based on scintilla v3.2.3, patch made with git
I've uploaded a new patch.
Does it satisfy your requirements ?
Committed.