#9021
CrashNBurn
Member

I updated my AHK fix for this,
1) Automatically Clear the Find Highlight when you Click [Close] on the Find|Replace dialog.
2) Does NOT clear the Find highlight if:
—> you press keyboard {ESC} or
—> click [X] on Titlebar. or
—> Shift+Click, or Ctrl+Click.

#ifWinActive, Find ahk_class #32770, &Search All Open Documents
{
$LButton:: IWA_32770_FindReplace( "{LButton Down}" )
$LButton UP:: IWA_32770_FindReplace( "{LButton Up}" )
return
}
#ifWinActive, Replace ahk_class #32770, Search All &Open Documents
{
$LButton:: IWA_32770_FindReplace( "{LButton Down}" )
$LButton UP:: IWA_32770_FindReplace( "{LButton Up}" )
return
}

WinGetParentClass(winTitle="A", winText="", exTitle="", exText="")
{
WinGetClass, wClass, \% "ahk_id " DllCall( "GetParent", "UInt", WinExist(winTitle, winText, exTitle, exText))
return wClass
}

IWA_32770_FindReplace(mKeyF)
{
EmEditorMainFrame3_sendKey:="!{F3}", EmEditorMainFrame3_control:="Button16"
ControlGetFocus, cgFocus
Send, \% ((wpClass:=WinGetParentClass()) && doKey:=(cgFocus==\%wpClass\%_control)) ? mKeyF : mKeyF
if( GetKeyState("Ctrl") || GetKeyState("Shift") )
return
Send, \% (doKey && (WinGetClass("A")==wpClass) && \%wpClass\%_sendKey) ? \%wpClass\%_sendKey : ""
return
}