Issue #86 resolved

Source/Doc lookup fails when result buffer already open

Dave Ray avatarDave Ray created an issue

I'm using vimclojure as of changeset 340e7b1efe4e.

Here's how I reproduce the bug:

  • Start up nailgun
  • Start up vim and open a clojure file
  • Put the cursor on a word and hit ,lw
  • Do not close the result window
  • Now hit ,sw

The contents (doc of word) of the result window should be replaced with the source of the word, but instead I get an error:

Vim(call):E118: Too many arguments for function: 377

or sometimes:

Error detected while processing function vimclojure#SourceLookup..376..vimclojure#util#WithSavedOption..vimclojure#util#WithSaved..449:
line    3:
E118: Too many arguments for function: 377
Error detected while processing function vimclojure#SourceLookup..376:
line   14:
E171: Missing :endif

This only seems to happen if the result buffer is already open with a different kind of result (source vs. doc) showing.

I've stepped through ":debug call vimclojure#SourceLookup("ns")" with the same result, but with the closures and my vimscript ignorance, it's hard to see which function is actually throwing the exception.

Comments (2)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.