Closed AndrewRayCode closed 11 years ago
I also see this stack trace when switching between tabs :frowning: :confused:
Dupe of #16
Isn't this more likely something to do with an autocommand, like the one for lookupArgumentHints
? Probably needs some error handling when the cursor is not on something it can handle.
This is by design -- the server will complain when you try to perform a query that expects an expression at a point where there is no expression. Don't be worried by the error output.
What stack trace do you see when switching between tabs?
I see the same stack trace when switching between tabs
That's really odd. There is a BufLeave
handler that sends the buffer over to the server if it is dirty, but the "No expression at the given position." error can't be fired for a request that simply sends an updated version of a buffer. The stack trace contains findTypeAt
, which indicates that somehow a "type"
query was done. Probably, the LookupArgumentHints
function is somehow running. What is your tern_show_argument_hints
setting? Could it be that a hold or move event fires when leaving the buffer? (@clausreinke maybe you know more?)
CursorMoved
fires on buffer switch, CursorHold
will fire in the new buffer, after delay.
When I do /varName and hit enter, then n, and the match is inside a comment, I see the tern server get unhappy: