Permalink
Browse files

Fixed a bug with suggest where project files are not being handled

properly.
  • Loading branch information...
1 parent e931e3c commit 0ef95ca0797a0c4bacf910b8bf1b231069cc83e8 @dom96 dom96 committed Jan 28, 2013
Showing with 6 additions and 2 deletions.
  1. +4 −1 suggest.nim
  2. +0 −1 todo.markdown
  3. +2 −0 utils.nim
View
@@ -224,7 +224,10 @@ proc populateSuggest*(win: var MainWin, start: PTextIter, tab: Tab): bool =
var (projectFile, projectCfgFile) = findProjectFile(tab.filename.splitFile.dir)
let splitPrjF = splitFile(projectFile)
- projectFile = prefixDir / splitPrjF.name & splitPrjF.ext
+ if projectFile != "":
+ projectFile = prefixDir / splitPrjF.name & splitPrjF.ext
+ else:
+ projectFile = prefixDir / currentTabSplit.name & currentTabSplit.ext
echod("[Suggest] Project cfg file is: ", projectCfgFile)
echod("[Suggest] Project file is: ", projectFile)
View
@@ -15,7 +15,6 @@
* Search for ⌚, it selects too much with regex.
* Move "Find", "Go to line" etc. to a "Search" menu in the top bar.
* Recent files... should be populated upon tab close.
-* Suggest: Compile some file so it's saved as aXX.nim, and then try using suggest. It fails...
## Other language features
* Ability to change to hard tabs.
View
@@ -397,6 +397,8 @@ proc findProjectFile*(directory: string): tuple[projectFile, projectCfg: string]
# check for file.nimrod
if not existsFile(projectFile & "rod"):
projectFile = ""
+ else:
+ projectFile = projectFile & "rod"
return (projectFile, projectCfgFile)
proc isTemporary*(t: Tab): bool =

0 comments on commit 0ef95ca

Please sign in to comment.