Skip to content

Commit

Permalink
Fix incorrect positions set in code action edits
Browse files Browse the repository at this point in the history
Neovim requires positions to supply column as well as row.
  • Loading branch information
weirdan committed Jul 23, 2023
1 parent 9c814c8 commit eaf41a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Internal/LanguageServer/Server/TextDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ public function codeAction(TextDocumentIdentifier $textDocument, Range $range, C
//$contents = $this->codebase->file_provider->getContents($file_path);

$snippetRange = new Range(
new Position($data['line_from']-1),
new Position($data['line_to']),
new Position($data['line_from'] - 1, 0),
new Position($data['line_to'], 0),
);

$indentation = '';
Expand Down

0 comments on commit eaf41a1

Please sign in to comment.