mirror of
https://github.com/We-Dont-Byte/Mind_Reader.git
synced 2024-11-15 03:35:59 +00:00
Only return cursor to editor when selection succeeds
This commit is contained in:
parent
7c985b3817
commit
7e001ee50c
@ -231,12 +231,13 @@ function selectLeadingWhitespace(): void {
|
||||
(numSpaces !== 1)
|
||||
? window.showInformationMessage(`Line ${lineNum.toString()}: ${numSpaces.toString()} spaces selected`)
|
||||
: window.showInformationMessage(`Line ${lineNum.toString()}: ${numSpaces.toString()} space selected`);
|
||||
|
||||
// Move the cursor to the new selection
|
||||
window.showTextDocument(editor.document);
|
||||
}
|
||||
else {
|
||||
window.showErrorMessage(`Line ${lineNum.toString()}: No leading spaces to select!`); // No whitespace to select
|
||||
}
|
||||
// Move the cursor to the new selection
|
||||
window.showTextDocument(editor.document);
|
||||
}
|
||||
else {
|
||||
window.showErrorMessage('No document currently active'); // No active document
|
||||
|
Loading…
Reference in New Issue
Block a user