Skip to content

Commit

Permalink
Fixed localization of 'next' variable, which was causing debugger fai…
Browse files Browse the repository at this point in the history
…lure
  • Loading branch information
pkulchenko committed Jan 6, 2012
1 parent 4246d76 commit 867de8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/editor/filetree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ local function treeAddDir(tree,parent_id,rootdir)
if item then -- existing item
-- keep deleting items until we find item
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() or name == tree:GetItemText(next) then
curr = next
break
Expand All @@ -92,8 +92,8 @@ local function treeAddDir(tree,parent_id,rootdir)
if item then -- existing item
-- keep deleting items until we find item
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() or name == tree:GetItemText(next) then
curr = next
break
Expand All @@ -108,8 +108,8 @@ local function treeAddDir(tree,parent_id,rootdir)

-- delete any leftovers (something that exists in the tree, but not on disk)
while true do
next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
local next = curr and tree:GetNextSibling(curr)
or tree:GetFirstChild(parent_id)
if not next:IsOk() then break end
tree:Delete(next)
end
Expand Down

0 comments on commit 867de8f

Please sign in to comment.