1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Support for space indentation when splitting line with enter key

This commit is contained in:
ESH 2024-12-02 19:04:23 +01:00
parent c555b8b7ef
commit 6f816241a4

View file

@ -4090,10 +4090,16 @@ namespace IDE.ui
}
if (column > 0)
{
String tabStr = scope String();
tabStr.Append('\t', column / gApp.mSettings.mEditorSettings.mTabSize);
tabStr.Append(' ', column % gApp.mSettings.mEditorSettings.mTabSize);
InsertAtCursor(tabStr);
String indentationStr = scope String();
switch (gApp.mSettings.mEditorSettings.mTabsOrSpaces)
{
case .Spaces:
indentationStr.Append(' ', column);
case .Tabs:
indentationStr.Append('\t', column / gApp.mSettings.mEditorSettings.mTabSize);
indentationStr.Append(' ', column % gApp.mSettings.mEditorSettings.mTabSize);
}
InsertAtCursor(indentationStr);
}
// Insert extra blank line if we're breaking between a { and a }