summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-05-28 10:21:54 +0200
committerGitHub <noreply@github.com>2019-05-28 10:21:54 +0200
commit556ee712772b992c8d734dfeb478e0ef8363aa8b (patch)
tree5efdd2012e2871f1083bf896c01f8e46f6872f67
parent4686d9470e3d08e2141618167942a7b259daf647 (diff)
parente5f5a71d273c34aa817ac14c505ca10d6f019733 (diff)
Merge pull request #29174 from Chaosus/fix_line_wrap_output
Fix "Index out of size" TextEdit's spam to output (when using Expression nodes in the visual shaders)
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index ef6bfc2e2d..3117d8c59f 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4169,7 +4169,7 @@ void TextEdit::_scroll_moved(double p_to_val) {
int v_scroll_i = floor(get_v_scroll());
int sc = 0;
int n_line;
- for (n_line = 0; n_line < text.size(); n_line++) {
+ for (n_line = 0; n_line < text.size() - 1; n_line++) {
if (!is_line_hidden(n_line)) {
sc++;
sc += times_line_wraps(n_line);