diff options
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index c8f7e88082..ddd702fc6c 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -122,7 +122,7 @@ void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) { bool accepted = true; - switch (k->get_scancode()) { + switch (k->get_keycode()) { case KEY_ESCAPE: { @@ -1257,7 +1257,7 @@ void CodeTextEditor::clone_lines_down() { text_editor->cursor_set_line(cursor_new_line); text_editor->cursor_set_column(cursor_new_column); if (selection_active) { - text_editor->select(to_line, to_column, 2 * to_line - from_line, 2 * to_column - from_column); + text_editor->select(to_line, to_column, 2 * to_line - from_line, to_line == from_line ? 2 * to_column - from_column : to_column); } text_editor->end_complex_operation(); |