Add configurable Tab Out support

Add an optional Tab Out behavior that moves a single cursor past configured trailing characters when pressing Tab. Expose the feature in Global Document Settings, keep it disabled by default, persist its configuration, and preserve existing selection and multi-cursor indentation behavior (SpartanJ/ecode#951).
This commit is contained in:
Martín Lucas Golini
2026-08-21 11:35:35 -03:00
parent 2895d771ab
commit 8eed5fcd58
13 changed files with 159 additions and 0 deletions
+10
View File
@@ -564,6 +564,14 @@ class EE_API TextDocument {
const std::vector<std::pair<String::StringBaseType, String::StringBaseType>>&
autoCloseBracketsPairs );
bool getTabOutEnabled() const;
void setTabOutEnabled( bool enabled );
const String& getTabOutChars() const;
void setTabOutChars( const String& chars );
bool isDirtyOnFileSystem() const;
void setDirtyOnFileSystem( bool dirtyOnFileSystem );
@@ -780,6 +788,7 @@ class EE_API TextDocument {
bool mTrimTrailingWhitespaces{ false };
bool mVerbose{ false };
bool mAutoCloseBrackets{ false };
bool mTabOutEnabled{ false };
bool mDirtyOnFileSystem{ false };
bool mSaving{ false };
bool mDeleteOnClose{ false };
@@ -789,6 +798,7 @@ class EE_API TextDocument {
bool mDoingTextInput{ false };
bool mInsertingText{ false };
std::vector<std::pair<String::StringBaseType, String::StringBaseType>> mAutoCloseBracketsPairs;
String mTabOutChars{ ")]}'\":;>," };
Uint32 mIndentWidth{ 4 };
IndentType mIndentType{ IndentType::IndentTabs };
AutoIndentConfig mAutoIndent{ AutoIndentConfig::Smart };