diff options
| author | Ian | 2017-11-10 23:07:41 -0500 |
|---|---|---|
| committer | Ian | 2017-11-11 14:46:59 -0500 |
| commit | 94b3e786cd9d23ef972d366333abfbcfb1f7b989 (patch) | |
| tree | 8a813a47b0d1853ba16695dbfa08a5202fae23f6 /scene/gui/text_edit.cpp | |
| parent | fc299b4f370d586b75e1ae4f394cd3759ea4ae49 (diff) | |
| download | godot-94b3e786cd9d23ef972d366333abfbcfb1f7b989.tar.gz godot-94b3e786cd9d23ef972d366333abfbcfb1f7b989.tar.zst godot-94b3e786cd9d23ef972d366333abfbcfb1f7b989.zip | |
shader editor context menu and line operations and style fix
Diffstat (limited to 'scene/gui/text_edit.cpp')
| -rw-r--r-- | scene/gui/text_edit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f4876668f..5d4048f92 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3900,7 +3900,12 @@ void TextEdit::select(int p_from_line, int p_from_column, int p_to_line, int p_t update(); } - +void TextEdit::swap_lines(int line1, int line2) { + String tmp = get_line(line1); + String tmp2 = get_line(line2); + set_line(line2, tmp); + set_line(line1, tmp2); +} bool TextEdit::is_selection_active() const { return selection.active; |
