Take into account dirty buffers in suggest output; Fixes zah/nimrod.vim#14

This commit is contained in:
Zahary Karadjov 2013-08-07 18:58:46 +03:00
commit 5dfc0d0d19
4 changed files with 21 additions and 8 deletions

View file

@ -210,7 +210,11 @@ proc CommandSuggest =
msgs.gErrorMax = high(int) # do not stop after first error
semanticPasses()
rodPass()
compileProject()
# XXX: this handles the case when the dirty buffer is the main file,
# but doesn't handle the case when it's imported module
var projFile = if gProjectMainIdx == gDirtyOriginalIdx: gDirtyBufferIdx
else: gProjectMainIdx
compileProject(projFile)
proc wantMainModule =
if gProjectFull.len == 0: