From 8e7973d660b1f7bc25323b8ef843310f1deb2107 Mon Sep 17 00:00:00 2001 From: Biliogadafr <Biliogadafr@gmail.com> Date: Sat, 2 May 2015 00:03:49 +0300 Subject: Triple click doesn't select line if click was done on different lines. Fix #1727 --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/text_edit.cpp') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 1e82432165..6cdff20aaf 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1249,7 +1249,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { } - if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600) { + if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600 && cursor.line==prev_line) { //tripleclick select line select(cursor.line,0,cursor.line,text[cursor.line].length()); last_dblclk=0; -- cgit v1.2.3 From f3542ff8381fe7e67f39ff004d98c5b40f331fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20P=C3=A9rez?= <ricpelo@gmail.com> Date: Mon, 4 May 2015 19:54:17 +0200 Subject: Wrong use of | instead of || --- scene/gui/text_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/gui/text_edit.cpp') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 1e82432165..a87d8eea5f 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -489,7 +489,7 @@ void TextEdit::_notification(int p_what) { CharType cc = text[i][j]; //ignore any brackets inside a string - if (cc== '"' | cc == '\'') { + if (cc== '"' || cc == '\'') { CharType quotation = cc; do { j++; @@ -560,7 +560,7 @@ void TextEdit::_notification(int p_what) { CharType cc = text[i][j]; //ignore any brackets inside a string - if (cc== '"' | cc == '\'') { + if (cc== '"' || cc == '\'') { CharType quotation = cc; do { j--; -- cgit v1.2.3 From 74b0e0c296ac438df2f0826482310e788d0ba898 Mon Sep 17 00:00:00 2001 From: Juan Linietsky <reduzio@gmail.com> Date: Tue, 5 May 2015 00:17:22 -0300 Subject: fix crash in editor when using alt+arrows to indent, thanks adolson and romulox_x --- scene/gui/text_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/gui/text_edit.cpp') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 75174a85de..681c33652e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3494,6 +3494,9 @@ void TextEdit::set_line(int line, String new_text) return; _remove_text(line, 0, line, text[line].length()); _insert_text(line, 0, new_text); + if (cursor.line==line) { + cursor.column=MIN(cursor.column,new_text.length()); + } } void TextEdit::insert_at(const String &p_text, int at) -- cgit v1.2.3