Skip to content

Commit

Permalink
Added forcing immediate refresh of symbol index when requested from t…
Browse files Browse the repository at this point in the history
…he menu (#499).
  • Loading branch information
pkulchenko committed Aug 9, 2015
1 parent 3ff3527 commit f22918b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/editor/outline.lua
Expand Up @@ -35,9 +35,9 @@ local function resetOutlineTimer()
end
end

local function resetIndexTimer()
local function resetIndexTimer(interval)
if ide.config.symbolindexinactivity and not ide.timers.symbolindex:IsRunning() then
ide.timers.symbolindex:Start(ide.config.symbolindexinactivity*1000, wx.wxTIMER_ONE_SHOT)
ide.timers.symbolindex:Start(interval or ide.config.symbolindexinactivity*1000, wx.wxTIMER_ONE_SHOT)
end
end

Expand Down Expand Up @@ -501,7 +501,7 @@ local package = ide:AddPackage('core.outline', {
-- files will be purged based on time, but this is a good time to clean.
purgeIndex(name)
outline:RefreshSymbols(name)
resetIndexTimer()
resetIndexTimer(1) -- start after 1ms
end)
tree:Connect(ID_SYMBOLDIRDISABLE, wx.wxEVT_COMMAND_MENU_SELECTED, function()
disableIndex(name)
Expand Down

0 comments on commit f22918b

Please sign in to comment.