Skip to content

Commit 40e8753

Browse files
committed
fix scope on compiling while loop
1 parent 6ad6c56 commit 40e8753

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

go/gocompiler.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,9 @@ function s:GoCompiler.compile_while(node)
558558
endif
559559
call self.out('for %s{', cond)
560560
call self.incindent("\t")
561+
call self.inscope()
561562
call self.compile_body(a:node.body)
563+
call self.descope()
562564
call self.decindent()
563565
call self.out('}')
564566
endfunction

go/vimlparser.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)