Browse Source

Excludes last selected line if character 0

main
Eric Amodio 4 years ago
parent
commit
c8d7e54b2c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/commands/openFileOnRemote.ts

+ 3
- 1
src/commands/openFileOnRemote.ts View File

@ -65,7 +65,9 @@ export class OpenFileOnRemoteCommand extends ActiveEditorCommand {
args.range && editor != null && UriComparer.equals(editor.document.uri, uri)
? new Range(
editor.selection.start.with({ line: editor.selection.start.line + 1 }),
editor.selection.end.with({ line: editor.selection.end.line + 1 }),
editor.selection.end.with({
line: editor.selection.end.line + (editor.selection.end.character === 0 ? 0 : 1),
}),
)
: undefined;
let sha = args.sha ?? gitUri.sha;

Loading…
Cancel
Save