From a5756ab2f5fb74ce79a01fd321a5b061784a25dd Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Thu, 8 Aug 2024 17:42:03 +0200 Subject: [PATCH] Improve console behaviour --- src/text_editor/commands.cpp | 2 +- src/text_editor/commands_window.cpp | 2 +- src/text_editor/todo.txt | 1 + src/text_editor/window.cpp | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/text_editor/commands.cpp b/src/text_editor/commands.cpp index b16d7f7..8e21e75 100644 --- a/src/text_editor/commands.cpp +++ b/src/text_editor/commands.cpp @@ -249,7 +249,7 @@ bool GlobalCommand(Event event) { if (event.ctrl && Mouse(RIGHT)) { GoBackToLastCrumb(); } else if (event.alt && Mouse(RIGHT)) { - ToggleConsole(); + // ToggleConsole(); } // @todo: maybe move some of this stuff to window command ??? diff --git a/src/text_editor/commands_window.cpp b/src/text_editor/commands_window.cpp index 4c55e7e..b7f5a49 100644 --- a/src/text_editor/commands_window.cpp +++ b/src/text_editor/commands_window.cpp @@ -905,7 +905,7 @@ void WindowCommand(Event event, Window *window, View *view) { if (Ctrl(SDLK_W)) { GoBackToLastCrumb(); } else if (Alt(SDLK_W)) { - ToggleConsole(); + // ToggleConsole(); } if (Mouse(MIDDLE)) { diff --git a/src/text_editor/todo.txt b/src/text_editor/todo.txt index 32252a4..96b9150 100644 --- a/src/text_editor/todo.txt +++ b/src/text_editor/todo.txt @@ -5,6 +5,7 @@ - prevent lua from infinite looping - Append to console and change console directory - hotkey to select window title +- the 'invisible when inactive' flag does it apply to title bar windows?? - search as a command to execute which is going to be in the title bar - search backwards diff --git a/src/text_editor/window.cpp b/src/text_editor/window.cpp index b6a5cc2..53f75cc 100644 --- a/src/text_editor/window.cpp +++ b/src/text_editor/window.cpp @@ -152,6 +152,8 @@ void InitWindows() { WindowID window_id = window->id; ConsoleWindowID = window_id; + window->invisible_when_inactive = true; + window->deactivate_on_escape = true; window->absolute_position = true; window->dont_save_in_active_window_history = true;