Skip to content

Commit

Permalink
fix(workspace): fix range of getSelectedRange with line mode
Browse files Browse the repository at this point in the history
Make range pass next line to include diagnostic pass the end of line.
Since we don't fix range of diagnostics any more.
  • Loading branch information
chemzqm committed Jun 21, 2021
1 parent 18f81ab commit cad8c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ export class Workspace implements IWorkspace {
let line = await nvim.call('line', ['.'])
let content = document.getline(line - 1)
if (!content.length) return null
return Range.create(line - 1, 0, line - 1, content.length)
return Range.create(line - 1, 0, line, 0)
}
if (mode === 'cursor') {
let [line, character] = await nvim.eval("coc#util#cursor()") as [number, number]
Expand Down

0 comments on commit cad8c6b

Please sign in to comment.