Skip to content

Commit

Permalink
Merge pull request fatih#3587 from bhcleek/sameids/multibyte
Browse files Browse the repository at this point in the history
sameids: fix highlighting preceded by multibyte characters
  • Loading branch information
bhcleek authored Oct 2, 2023
2 parents a2e5998 + 6965841 commit aa1590a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/go/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,10 @@ function! s:sameIDsHandler(next, msg) abort dict
continue
endif

let l:result.sameids = add(l:result.sameids, [l:loc.range.start.line+1, l:loc.range.start.character+1, l:loc.range.end.character+1])
let l:line = getline(l:loc.range.start.line + 1)
let l:start = go#lsp#lsp#PositionOf(l:line, l:loc.range.start.character)
let l:end = go#lsp#lsp#PositionOf(l:line, l:loc.range.end.character)
let l:result.sameids = add(l:result.sameids, [l:loc.range.start.line+1, l:start, l:end])
endfor

call call(a:next, [0, l:result, ''])
Expand Down

0 comments on commit aa1590a

Please sign in to comment.