mirror of
https://github.com/We-Dont-Byte/Mind_Reader.git
synced 2024-11-14 19:25:59 +00:00
Update commands.ts
This commit is contained in:
parent
327ce1eea4
commit
7f2181d9ea
@ -156,17 +156,18 @@ function getIndent(): void {
|
||||
{
|
||||
let lineNum = editor.selection.active.line + 1;
|
||||
let textLine = editor.document.lineAt(lineNum - 1);
|
||||
let i = 0;
|
||||
if(textLine.isEmptyOrWhitespace)
|
||||
{
|
||||
vscode.window.showInformationMessage("Line number " + lineNum.toString() + " Is Empty");
|
||||
}
|
||||
else
|
||||
{
|
||||
while(textLine.text[i] === '\t')
|
||||
{
|
||||
i++;
|
||||
}
|
||||
// Grab tab format from open document
|
||||
let tabFmt = {
|
||||
size: editor.options.tabSize as number,
|
||||
hard: !editor.options.insertSpaces
|
||||
};
|
||||
let i = pl.Lexer.getIndent(textLine.text, tabFmt);
|
||||
vscode.window.showInformationMessage("Line Number " + lineNum.toString() + " Indentation " + i.toString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user