diff --git a/src/text_editor/commands_bindings.cpp b/src/text_editor/commands_bindings.cpp index c934ea3..194adfe 100644 --- a/src/text_editor/commands_bindings.cpp +++ b/src/text_editor/commands_bindings.cpp @@ -437,6 +437,13 @@ void OnCommand(Event event) { if (CtrlPress(SDLK_GRAVE)) { if (ActiveWindow != NullWindowID) { ActiveWindow = NullWindowID; + WindowSplits.value = (double)StyleConsoleSizeBig; + } else { + if (WindowSplits.value - 0.1 > StyleConsoleSizeSmall) { + WindowSplits.value = (double)StyleConsoleSizeSmall; + } else { + WindowSplits.value = (double)StyleConsoleSizeBig; + } } } if (CtrlPress(SDLK_1)) { diff --git a/src/text_editor/todo.txt b/src/text_editor/todo.txt index 40456f3..220ed75 100644 --- a/src/text_editor/todo.txt +++ b/src/text_editor/todo.txt @@ -7,11 +7,10 @@ - rules, interface for opening files using the F4 (aka next path from build output) - for now add ./ and .\ to valid line starters - make search bar standout!! -- relative paths instead of absolute when opening directories -- change console resize behaviour, maybe on tilde, not on click, it borks, selects wrongly because of the change in size - Kill buffer command (it should be marked for deletion and deleted at the end of frame!) - Delete directory/file on disk command - Create directory command (probably should enter it automatically +- Convert more commands to taking buffer instead of view - save all relevant buffers and build - shift down on last line should move the cursor to end of line!!! same for up diff --git a/src/text_editor/window.cpp b/src/text_editor/window.cpp index 38afe31..ddde4ca 100644 --- a/src/text_editor/window.cpp +++ b/src/text_editor/window.cpp @@ -278,12 +278,6 @@ void LayoutWindowSplit(WindowSplit *split, Rect2I rect) { } void LayoutWindows(int16_t wx, int16_t wy) { - if (ActiveWindow == NullWindowID) { - WindowSplits.value = (double)StyleConsoleSizeBig; - } else { - WindowSplits.value = (double)StyleConsoleSizeSmall; - } - Rect2I screen_rect = RectI0Size(wx, wy); LayoutWindowSplit(&WindowSplits, screen_rect);