diff --git a/dub.json b/dub.json index d90ffaf..4c88cae 100644 --- a/dub.json +++ b/dub.json @@ -12,7 +12,7 @@ "stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"], "dependencies": { - "dlangui": "==0.8.30", + "dlangui": "==0.8.31", "dcd": "~>0.8.0" }, diff --git a/src/dlangide/ui/dsourceedit.d b/src/dlangide/ui/dsourceedit.d index b3006a4..5199d10 100644 --- a/src/dlangide/ui/dsourceedit.d +++ b/src/dlangide/ui/dsourceedit.d @@ -50,6 +50,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener { showIcons = true; //showFolding = true; showWhiteSpaceMarks = true; + showTabPositionMarks = true; content.marksChanged = this; } @@ -89,6 +90,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener { smartIndents = _settings.smartIndents; smartIndentsAfterPaste = _settings.smartIndentsAfterPaste; showWhiteSpaceMarks = _settings.showWhiteSpaceMarks; + showTabPositionMarks = _settings.showTabPositionMarks; } protected EditorTool _editorTool; diff --git a/src/dlangide/ui/settings.d b/src/dlangide/ui/settings.d index 5da7189..1aad197 100644 --- a/src/dlangide/ui/settings.d +++ b/src/dlangide/ui/settings.d @@ -63,6 +63,7 @@ SettingsPage createSettingsPages() { texted.addCheckbox("editors/textEditor/smartIndents", UIString("Smart indents"d)); texted.addCheckbox("editors/textEditor/smartIndentsAfterPaste", UIString("Smart indent after paste"d)); texted.addCheckbox("editors/textEditor/showWhiteSpaceMarks", UIString("Show white space marks"d)); + texted.addCheckbox("editors/textEditor/showTabPositionMarks", UIString("Show tab position marks"d)); SettingsPage dlang = res.addChild("dlang", UIString("D"d)); SettingsPage dub = dlang.addChild("dlang/dub", UIString("DUB"d)); diff --git a/src/dlangide/workspace/idesettings.d b/src/dlangide/workspace/idesettings.d index 73d2f3a..c835f37 100644 --- a/src/dlangide/workspace/idesettings.d +++ b/src/dlangide/workspace/idesettings.d @@ -22,6 +22,7 @@ class IDESettings : SettingsFile { ed.setBooleanDef("smartIndents", true); ed.setBooleanDef("smartIndentsAfterPaste", true); ed.setBooleanDef("showWhiteSpaceMarks", true); + ed.setBooleanDef("showTabPositionMarks", true); Setting ui = uiSettings(); ui.setStringDef("theme", "ide_theme_default"); ui.setStringDef("language", "en"); @@ -147,11 +148,18 @@ class IDESettings : SettingsFile { /// set smart indents enabled flag @property IDESettings smartIndents(bool enabled) { editorSettings.setBoolean("smartIndents", enabled); return this; } - /// true if smart indents are enabled + /// true if white space marks are enabled @property bool showWhiteSpaceMarks() { return editorSettings.getBoolean("showWhiteSpaceMarks", true); } - /// set smart indents enabled flag + /// set white space marks enabled flag @property IDESettings showWhiteSpaceMarks(bool enabled) { editorSettings.setBoolean("showWhiteSpaceMarks", enabled); return this; } + /// true if tab position marks are enabled + @property bool showTabPositionMarks() { return editorSettings.getBoolean("showTabPositionMarks", true); } + /// set tab position marks enabled flag + @property IDESettings showTabPositionMarks(bool enabled) { editorSettings.setBoolean("showTabPositionMarks", enabled); return this; } + + + /// true if smart indents are enabled @property bool smartIndentsAfterPaste() { return editorSettings.getBoolean("smartIndentsAfterPaste", true); } /// set smart indents enabled flag