From e23a7b9c02d0be8e1ddac69151ec903187b04b06 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Thu, 4 Jul 2024 16:23:12 +0200 Subject: [PATCH] Fix move down out of selection --- src/text_editor/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/text_editor/main.cpp b/src/text_editor/main.cpp index a255b33..092cf58 100644 --- a/src/text_editor/main.cpp +++ b/src/text_editor/main.cpp @@ -193,7 +193,6 @@ int main() { } } - // @todo: proper handling of getting out of selection if (IsKeyPressed(KEY_DOWN) || IsKeyPressedRepeat(KEY_DOWN)) { if (IsKeyDown(KEY_LEFT_SHIFT) && IsKeyDown(KEY_LEFT_ALT)) { // Default in VSCode seems to be Ctrl + Alt + down Array cursors_to_add = {FrameArena}; @@ -226,12 +225,11 @@ int main() { } } else { For(focused_window->cursors) { - it.range.max = it.range.min = MoveDown(focused_window->buffer, it.range.min); + it.range.max = it.range.min = MoveDown(focused_window->buffer, it.range.max); } } } - // @todo: proper handling of getting out of selection if (IsKeyPressed(KEY_UP) || IsKeyPressedRepeat(KEY_UP)) { if (IsKeyDown(KEY_LEFT_SHIFT) && IsKeyDown(KEY_LEFT_ALT)) { // Default in VSCode seems to be Ctrl + Alt + up Array cursors_to_add = {FrameArena};