diff options
| author | Ignacio Etcheverry | 2016-03-15 13:03:38 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry | 2016-03-15 13:03:38 +0100 |
| commit | fac027cb14a730c1d8cca080dad733663c287a2d (patch) | |
| tree | c1eb71871c4c179f04e13c45c7174c9ef762001b /scene/gui/text_edit.cpp | |
| parent | 4dfd0c1863fca80ddc35b6bcacf339077a0c4f54 (diff) | |
| download | godot-fac027cb14a730c1d8cca080dad733663c287a2d.tar.gz godot-fac027cb14a730c1d8cca080dad733663c287a2d.tar.zst godot-fac027cb14a730c1d8cca080dad733663c287a2d.zip | |
LineEdit/TextEdit: Add Shift+Delete shortcut for cut
Diffstat (limited to 'scene/gui/text_edit.cpp')
| -rw-r--r-- | scene/gui/text_edit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 74f68b131..b80597560 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1957,6 +1957,12 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { if (readonly) break; + + if (k.mod.shift && !k.mod.command && !k.mod.alt) { + cut(); + break; + } + int curline_len = text[cursor.line].length(); if (cursor.line==text.size()-1 && cursor.column==curline_len) |
