vim-rtags
vim-rtags copied to clipboard
using rtags#ExecuteRCAsync print error when the symbol not indexed
I am using vim8 when 'job' and 'channel' feature work, so the vim-rtags will use rtags#ExecuteRCAsync when call rtags#JumpTo. but I find it print error when the jump symbol is not indexed. after test I find it is beacuse rtags#JumpToHandler function do not right handle when the async job return ["Not indexed"]. after I change the "elseif len(results) == 1" condition to elseif len(results) == 1 && results[0] != "Not indexed" the error print disappear. I think it is needed to fixed this little problam.
Thanks. I have added similar things to my fork such as:
function! rtags#DisplayLocations(locations)
let num_of_locations = len(a:locations)
+ if num_of_locations == 0
+ echohl | echomsg "[vim-rtags] No info returned" | echohl None
+ return
+ endif
function! rtags#FindSymbols(pattern)
+ if empty(a:pattern)
+ echo "<empty input>"
+ return
+ endif
And also when starting funcs such as FindSymbols, I echo a msg about the cmd started and then clear it when the cmd completes so I can tell it is running still and waiting for results.