Select title bar

This commit is contained in:
Krzosa Karol
2024-08-08 17:52:27 +02:00
parent a5756ab2f5
commit 4c179e3965
2 changed files with 9 additions and 2 deletions

View File

@@ -792,7 +792,6 @@ void WindowCommand(Event event, Window *window, View *view) {
}
}
// @todo: consider making this view command
if (view->fuzzy_search && search) {
Scratch scratch;
String16 first_line_string = GetLineStringWithoutNL(*buffer, 0);
@@ -862,7 +861,7 @@ void WindowCommand(Event event, Window *window, View *view) {
}
}
if (Ctrl(SDLK_G)) {
if (CtrlShift(SDLK_G)) {
Window *titlebar = window;
if (!window->is_title_bar) titlebar = GetWindow(window->title_bar_window);
View *titlebar_view = GetView(titlebar->active_view);
@@ -881,6 +880,12 @@ void WindowCommand(Event event, Window *window, View *view) {
titlebar_view->update_scroll = false;
}
}
} else if (Ctrl(SDLK_G)) {
Window *titlebar = window;
if (!window->is_title_bar) titlebar = GetWindow(window->title_bar_window);
View *titlebar_view = GetView(titlebar->active_view);
Buffer *titlebar_buffer = GetBuffer(titlebar_view->active_buffer);
SetActiveWindow(titlebar->id);
}
if (Ctrl(SDLK_Q)) {

View File

@@ -10,6 +10,8 @@
- search as a command to execute which is going to be in the title bar
- search backwards
- braces enclose should be performed even if we put the mouse out of bounds!
- select until
- some split selection commands
- word complete
- Search all buffers in 10X style, incrementally searched results popping up on every key press (maybe we need coroutine library in C so this is easier?)