From 2c2a74842ff2456ba6b57765b2e6f864d5b7f186 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Thu, 3 Oct 2024 15:17:55 +1300 Subject: [PATCH] Add support for F13-F24 in keybindings. Re #436 --- FOCUS-CHANGELOG.txt | 9 +++++++++ src/config_parser.jai | 31 ++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/FOCUS-CHANGELOG.txt b/FOCUS-CHANGELOG.txt index 2d361caf5..71fa1f836 100644 --- a/FOCUS-CHANGELOG.txt +++ b/FOCUS-CHANGELOG.txt @@ -4,10 +4,19 @@ + Syntax highlighting: + Batch (thanks @arjenwitteveen) + It is now possible to pass a line number together with the file path to the editor on startup: `focus /path/to/file:69` (thanks @simonvallz) + + New actions to change case of selected text (thanks @onelivesleft): + + `change_case_to_upper` + + `change_case_to_lower` + + `change_case_to_caps` - will capitalize the first letter, and any letter following a non-letter character (my_foo_type -> My_Foo_Type) + + `change_case_cycle` - will cycle through the options below. Bound to `Ctrl-U` by default + + New action `create_cursors_around`. Creates cursors above and below so that they extend up to the surrounding whitespace (thanks @onelivesleft) + + Added support for F13-F24 in keybindings + Bug fixes: + Fixed a crash when changing languages in the color preview widget + + Fixed font size changing when you press ctrl after scrolling has started (thanks @onelivesleft) + Other changes: + Syntax highlighting improvements for CSS and TypeScript (thanks @simonvallz) + + Creating cursors above and below will now skip empty lines as this is most likely the behaviour users want (thanks @onelivesleft) # RELEASES ================================================================== diff --git a/src/config_parser.jai b/src/config_parser.jai index 301df4066..a9f0d3acd 100644 --- a/src/config_parser.jai +++ b/src/config_parser.jai @@ -295,19 +295,32 @@ STRING_TO_CODE_MAP :: Str_Code.[ .{ "Plus", #char "+" }, .{ "Minus", #char "-" }, - .{ "F1", F1 }, - .{ "F2", F2 }, - .{ "F3", F3 }, - .{ "F4", F4 }, - .{ "F5", F5 }, - .{ "F6", F6 }, - .{ "F7", F7 }, - .{ "F8", F8 }, - .{ "F9", F9 }, + .{ "F1", F1 }, + .{ "F2", F2 }, + .{ "F3", F3 }, + .{ "F4", F4 }, + .{ "F5", F5 }, + .{ "F6", F6 }, + .{ "F7", F7 }, + .{ "F8", F8 }, + .{ "F9", F9 }, .{ "F10", F10 }, .{ "F11", F11 }, .{ "F12", F12 }, + .{ "F13", F13 }, + .{ "F14", F14 }, + .{ "F15", F15 }, + .{ "F16", F16 }, + .{ "F17", F17 }, + .{ "F18", F18 }, + .{ "F19", F19 }, + .{ "F20", F20 }, + .{ "F21", F21 }, + .{ "F22", F22 }, + .{ "F23", F23 }, + .{ "F24", F24 }, + .{ "Numpad0", NUMPAD_0 }, .{ "Numpad1", NUMPAD_1 }, .{ "Numpad2", NUMPAD_2 },