You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add Duplicate Lines shortcut to CodeTextEditor
This keyboard shortcut has been made with inspiration from the VS Code keyboard shortcut editor.action.copyLinesDownAction. It duplicates all selected lines and inserts them below no matter where the caret is within the line.
This commit is contained in:
@@ -805,6 +805,11 @@ void CodeTextEditor::input(const Ref<InputEvent> &event) {
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
if (ED_IS_SHORTCUT("script_text_editor/duplicate_lines", key_event)) {
|
||||
text_editor->duplicate_lines();
|
||||
accept_event();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
|
||||
|
||||
Reference in New Issue
Block a user