mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
43b9e89a07
commit
d2e651f403
11 changed files with 174 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue