Skip to content

Commit 66e1f05

Browse files
committed
fix scope on compiling while loop
1 parent 4abc322 commit 66e1f05

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
@@ -561,7 +561,9 @@ function s:GoCompiler.compile_while(node)
561561
endif
562562
call self.out('for %s{', cond)
563563
call self.incindent("\t")
564+
call self.inscope()
564565
call self.compile_body(a:node.body)
566+
call self.descope()
565567
call self.decindent()
566568
call self.out('}')
567569
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)