convertIndentWhitespace
convertIndentWhitespace(toTabs: Boolean): Integer;
The convertIndentWhitespace method of the JadeTextEdit class changes all of the indentation whitespace to the style requested by the toTabs parameter. The indentation whitespace is the tab and space characters that precede the first visible character in each line.
The existing indent whitespace length for each line is calculated. Each tab character is counted using the current tab width. A new sequence of indent whitespace is created that has the same effective length as the original.
If the value of the toTabs parameter is true, the new indent white space is converted to a series of tab characters followed by any additional space characters to make up the required indentation length.
If the value of the toTabs parameter is false, the new indent whitespace is built using space characters only.
If the existing indent whitespace does not match the new whitespace, the change is applied.
This method returns the number of lines that are changed.
If any changes occur, the conversion is performed as a single undo action.