1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

LibGUI: Allow to uppercase conversion in Vim emulation

If Shift+Key_U is pressed while in visual mode, the currently selected
text will be converted to uppercase.
This commit is contained in:
huttongrabiel 2022-05-18 12:07:16 -07:00 committed by Linus Groh
parent 45c5f68d8a
commit e3bef71d05

View file

@ -1145,6 +1145,10 @@ bool VimEditingEngine::on_key_in_visual_mode(KeyEvent const& event)
move_to_logical_line_beginning();
switch_to_insert_mode();
return true;
case (KeyCode::Key_U):
casefold_selection(Casing::Uppercase);
switch_to_normal_mode();
return true;
default:
break;
}
@ -1174,9 +1178,6 @@ bool VimEditingEngine::on_key_in_visual_mode(KeyEvent const& event)
m_editor->do_delete();
switch_to_normal_mode();
return true;
case (KeyCode::Key_U):
// FIXME: Set selection to uppercase.
return true;
case (KeyCode::Key_X):
yank(Selection);
m_editor->do_delete();