We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2723b5a commit 35aae8bCopy full SHA for 35aae8b
autoload/OmniSharp/stdio.vim
@@ -129,7 +129,13 @@ function! OmniSharp#stdio#Request(command, opts) abort
129
else
130
let bufnr = bufnr('%')
131
let lnum = get(a:opts, 'LineNum', line('.'))
132
- let cnum = get(a:opts, 'ColNum', charcol('.'))
+ if exists('*charcol')
133
+ " charcol() gives the character index of the cursor column, instead of the
134
+ " byte index. The OmniSharp-roslyn server uses character-based indices.
135
+ let cnum = get(a:opts, 'ColNum', charcol('.'))
136
+ else
137
+ let cnum = get(a:opts, 'ColNum', col('.'))
138
+ endif
139
endif
140
let host = OmniSharp#GetHost(bufnr)
141
let job = host.job
0 commit comments