mirror of
				https://github.com/We-Dont-Byte/Mind_Reader.git
				synced 2025-02-04 10:38:42 +00:00 
			
		
		
		
	Only return cursor to editor when selection succeeds
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user