From 9da85fadbdd5f0e12804ace6c85e66edd2a85fcd Mon Sep 17 00:00:00 2001 From: krzosa Date: Mon, 29 Dec 2025 22:28:08 +0100 Subject: [PATCH] Ctrl-tab --- src/backup/todo.txt | 10 +++++++--- src/text_editor/buffer.cpp | 2 +- src/text_editor/commands.cpp | 6 ++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/backup/todo.txt b/src/backup/todo.txt index cb42935..d50d73f 100644 --- a/src/backup/todo.txt +++ b/src/backup/todo.txt @@ -1,8 +1,12 @@ -- What precise workflow do I need for me to be viable to use this? -- From a user (novice) point of view, how does it look like? +! What precise workflow do I need for me to be viable to use this? +! From a user (novice) point of view, how does it look like? + +- Rename: Ctrl-C instead? +- If I want to make the ID / pointer design right, (mostly I think for coroutines) I think all the pointers need to be accessed through a broad ID interface without exposing pointers. This seems like a giga hassle. + - What would we do if the pointer disappered? should Null work as dev null in some circumstances or should all the operations be done one console? + - Seems like over reaction but probably the "correct" thing to do? Use session 2 -- Add ctrl-tab to go back to last buffer - I can't change browser currently, maybe syntax like :Set InternetBrowser "firefox" - BUILD annoying: Console or use the other window / the window which is already being used diff --git a/src/text_editor/buffer.cpp b/src/text_editor/buffer.cpp index de1becb..241eef0 100644 --- a/src/text_editor/buffer.cpp +++ b/src/text_editor/buffer.cpp @@ -1569,7 +1569,7 @@ void ReopenBuffer(Buffer *buffer) { void SaveBuffer(Buffer *buffer) { Scratch scratch; String string = AllocCharString(scratch, buffer); - bool success = WriteFile(buffer->name, string); + bool success = WriteFile(buffer->name, string); if (success) { buffer->file_mod_time = GetFileModTime(buffer->name); diff --git a/src/text_editor/commands.cpp b/src/text_editor/commands.cpp index 470fe71..6f182d7 100644 --- a/src/text_editor/commands.cpp +++ b/src/text_editor/commands.cpp @@ -888,6 +888,12 @@ void Command_CloseAll() { CoAdd(Coro_CloseAll); } RegisterCommand(Command_CloseAll, ""); +void Command_JumpPrev() { + BSet main = GetBSet(LastActiveLayoutWindowID); + JumpToLastValidView(main.window); + NextActiveWindowID = main.window->id; +} RegisterCommand(Command_JumpPrev, "ctrl-tab"); + void Command_Prev() { BSet main = GetBSet(LastActiveLayoutWindowID); main.window->skip_checkpoint = true;