Skip to content

Commit

Permalink
fix(locations): consider unicode on jump
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Feb 20, 2025
1 parent 80c9c22 commit 59a853a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/handler/locations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ describe('locations', () => {
expect(res).toEqual([
{
name: 'foo',
cmd: 'silent keepjumps call cursor(3, 1)',
cmd: 'silent keepjumps call coc#cursor#move_to(2, 0)',
filename: 'test://bar'
},
{ name: 'foo', cmd: 'silent keepjumps call cursor(2, 1)', filename: '/foo' }
{ name: 'foo', cmd: 'silent keepjumps call coc#cursor#move_to(1, 0)', filename: '/foo' }
])
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/handler/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class LocationsHandler {
const filename = parsedURI.scheme == 'file' ? parsedURI.fsPath : parsedURI.toString()
return {
name: word,
cmd: `silent keepjumps call cursor(${location.range.start.line + 1}, ${location.range.start.character + 1})`,
cmd: `silent keepjumps call coc#cursor#move_to(${location.range.start.line}, ${location.range.start.character})`,
filename,
}
})
Expand Down

0 comments on commit 59a853a

Please sign in to comment.