Merge pull request #13221 from Paulb23/fix_unfolding_last_line

Fixed not be able to unfold the last line
This commit is contained in:
Rémi Verschelde 2017-11-23 21:59:29 +01:00 committed by GitHub
commit 6086252f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4536,7 +4536,7 @@ bool TextEdit::can_fold(int p_line) const {
bool TextEdit::is_folded(int p_line) const { bool TextEdit::is_folded(int p_line) const {
ERR_FAIL_INDEX_V(p_line, text.size(), false); ERR_FAIL_INDEX_V(p_line, text.size(), false);
if (p_line + 1 >= text.size() - 1) if (p_line + 1 >= text.size())
return false; return false;
if (!is_line_hidden(p_line) && is_line_hidden(p_line + 1)) if (!is_line_hidden(p_line) && is_line_hidden(p_line + 1))
return true; return true;