Indenting see parse/lexer/indent.go for support functions indentLine indents line by given number of tab stops, using tabs or spaces, for given tab size (if using spaces) -- either inserts or deletes to reach target. Returns edit record for any change.
(ln, ind int)
| 891 | // for given tab size (if using spaces) -- either inserts or deletes to reach target. |
| 892 | // Returns edit record for any change. |
| 893 | func (tb *Buffer) indentLine(ln, ind int) *text.Edit { |
| 894 | autoSave := tb.batchUpdateStart() |
| 895 | defer tb.batchUpdateEnd(autoSave) |
| 896 | tbe := tb.Lines.IndentLine(ln, ind) |
| 897 | tb.signalMods() |
| 898 | return tbe |
| 899 | } |
| 900 | |
| 901 | // AutoIndentRegion does auto-indent over given region; end is *exclusive* |
| 902 | func (tb *Buffer) AutoIndentRegion(start, end int) { |
nothing calls this directly
no test coverage detected