mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Allow mixed tabs and spaces when indentation does not depend on tab size
(hopefully) Closes #30937, fixes #32612
This commit is contained in:
parent
d0628180ae
commit
afbde3314a
4 changed files with 103 additions and 78 deletions
|
|
@ -552,7 +552,27 @@ private:
|
|||
|
||||
int pending_newline;
|
||||
|
||||
List<int> tab_level;
|
||||
struct IndentLevel {
|
||||
int indent;
|
||||
int tabs;
|
||||
|
||||
bool is_mixed(IndentLevel other) {
|
||||
return (
|
||||
(indent == other.indent && tabs != other.tabs) ||
|
||||
(indent > other.indent && tabs < other.tabs) ||
|
||||
(indent < other.indent && tabs > other.tabs));
|
||||
}
|
||||
|
||||
IndentLevel() :
|
||||
indent(0),
|
||||
tabs(0) {}
|
||||
|
||||
IndentLevel(int p_indent, int p_tabs) :
|
||||
indent(p_indent),
|
||||
tabs(p_tabs) {}
|
||||
};
|
||||
|
||||
List<IndentLevel> indent_level;
|
||||
|
||||
String base_path;
|
||||
String self_path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue