vim-rtags
vim-rtags copied to clipboard
inappropriate type conversion in rtags#JumpToHandler
vim 8.2 think lnum and col as string in rtags#JumpToHandler Therefore call cursor(lnum, col) cause exception(E474) in rtags#jumpToLocationInternal. But neovim can covert it to number properly.
I have to fix it as below code:
function! rtags#JumpToHandler(results, args)
...
let [jump_file, lnum, col; rest] = split(location, ':')
let lnum = str2nr(lnum)
let col = str2nr(col)
...
Hi, Good info. I did something similar in my fork -
function! rtags#jumpToLocationInternal(file, line, col)
try
if a:file != expand("%:p")
exe "e ".a:file
endif
"call cursor(a:line, a:col)
let curlistpos = [a:line, a:col]
call cursor(curlistpos)
I try to maintain rtags some for a while in my fork. thx, -m