Fix move down out of selection

This commit is contained in:
Krzosa Karol
2024-07-04 16:23:12 +02:00
parent b48cffd880
commit e23a7b9c02

View File

@@ -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<Cursor> 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<Cursor> cursors_to_add = {FrameArena};