Add `Doc:get_indent_info`

It returns the indentation type, size and confirmation status, used by 
the `Doc`.
This commit is contained in:
Guldoman 2021-11-20 03:15:08 +01:00
parent b2940d6dc0
commit b77b1c0221
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 8 additions and 0 deletions

View File

@ -115,6 +115,14 @@ function Doc:clean()
end end
function Doc:get_indent_info()
if not self.indent_info then return config.tab_type, config.indent_size, false end
return self.indent_info.type or config.tab_type,
self.indent_info.size or config.indent_size,
self.indent_info.confirmed
end
function Doc:get_change_id() function Doc:get_change_id()
return self.undo_stack.idx return self.undo_stack.idx
end end