Skip to content

Commit 2723b5a

Browse files
committed
Send character column to server, not byte column
1 parent e02c836 commit 2723b5a

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

autoload/OmniSharp/stdio.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function! OmniSharp#stdio#Request(command, opts) abort
129129
else
130130
let bufnr = bufnr('%')
131131
let lnum = get(a:opts, 'LineNum', line('.'))
132-
let cnum = get(a:opts, 'ColNum', col('.'))
132+
let cnum = get(a:opts, 'ColNum', charcol('.'))
133133
endif
134134
let host = OmniSharp#GetHost(bufnr)
135135
let job = host.job

test/rename.vader

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Given cs():
1111

1212
Execute (rename constructor):
1313
call OmniSharpTestInitializeBuffer('RenameTo')
14-
call search("TestRenameTo()")
14+
call search('TestRenameTo()')
1515
call OmniSharpTestAwait('OmniSharp#actions#rename#To', ['Renamed'])
1616

1717
Expect cs(should rename class):
@@ -21,3 +21,24 @@ Expect cs(should rename class):
2121
{
2222
}
2323
}
24+
25+
Given cs():
26+
public class TestOmdøbAnother
27+
{
28+
public TestOmdøbAnother()
29+
{
30+
}
31+
}
32+
33+
Execute (rename after multi-byte characters):
34+
call OmniSharpTestInitializeBuffer('RenameAnother')
35+
call search('TestOmdøbAnother\ze()', 'e')
36+
call OmniSharpTestAwait('OmniSharp#actions#rename#To', ['RenamedAnother'])
37+
38+
Expect cs(should rename class):
39+
public class RenamedAnother
40+
{
41+
public RenamedAnother()
42+
{
43+
}
44+
}

test/vimrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let g:OmniSharp_start_without_solution = 1
2121
let g:OmniSharp_highlighting = 0
2222
let g:OmniSharp_selector_ui = ''
2323
let g:OmniSharp_open_quickfix = 0
24-
let g:OmniSharp_loglevel = 'info'
24+
let g:OmniSharp_loglevel = 'none'
2525

2626
let g:OmniSharp_popup = 0
2727
let g:OmniSharp_test_timeout = 10

0 commit comments

Comments
 (0)