Added restoring cursor position after failed incremental search (#416).

This commit is contained in:
Paul Kulchenko
2015-03-31 15:22:09 -07:00
parent edce5fa76c
commit f030d16ded

View File

@@ -789,8 +789,9 @@ function findReplace:createPanel()
mgr:Update()
local editor = self:GetEditor()
if editor then
-- restore original position for Shift-Esc
if event:ShiftDown() and findReplace.startpos then
-- restore original position for Shift-Esc or failed search
if findReplace.startpos
and (event:ShiftDown() or findReplace.foundString == false) then
editor:GotoPos(findReplace.startpos)
end
editor:SetFocus()