From: Sergey Matveev Date: Wed, 18 Dec 2019 18:10:39 +0000 (+0300) Subject: Fix byte index, workability at the end of the word X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=79f661b818492cef93553bcb766402ae7835216d Fix byte index, workability at the end of the word --- diff --git a/vim/.vim/ftplugin/go/gogetdoc.vim b/vim/.vim/ftplugin/go/gogetdoc.vim index 3dee9b4..c2aa3ac 100644 --- a/vim/.vim/ftplugin/go/gogetdoc.vim +++ b/vim/.vim/ftplugin/go/gogetdoc.vim @@ -22,7 +22,7 @@ endfunction function! s:GoGetDoc() if exists("b:gogetdoc_job") && job_status(b:gogetdoc_job) == "run" | return | endif - let pos = line2byte(line(".")) + col(".") - 1 + let pos = line2byte(line(".")) + col(".") - 2 let cmdline = "gogetdoc -pos " . expand("%p") . ":#" . pos let b:gogetdoc_job = job_start(cmdline, { \"in_mode": "nl",