From 79f661b818492cef93553bcb766402ae7835216d Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 18 Dec 2019 21:10:39 +0300 Subject: [PATCH] Fix byte index, workability at the end of the word --- vim/.vim/ftplugin/go/gogetdoc.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- 2.44.0