Skip to content

Commit

Permalink
Have terminal runSelectedText run current line with no selection
Browse files Browse the repository at this point in the history
Fixes #19863
Related #19375
  • Loading branch information
Tyriar committed Feb 4, 2017
1 parent de28ea6 commit b24bbdf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class RunSelectedTextInTerminalAction extends Action {
let selection = editor.getSelection();
let text: string;
if (selection.isEmpty()) {
text = editor.getValue();
text = editor.getModel().getLineContent(selection.selectionStartLineNumber).trim();
} else {
let endOfLinePreference = os.EOL === '\n' ? EndOfLinePreference.LF : EndOfLinePreference.CRLF;
text = editor.getModel().getValueInRange(selection, endOfLinePreference);
Expand Down

0 comments on commit b24bbdf

Please sign in to comment.