File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ void TextEdit::Text::clear() {
332332
333333 max_line_width_dirty = true ;
334334 max_line_height_dirty = true ;
335+ total_visible_line_count = 0 ;
335336
336337 Line line;
337338 line.gutters .resize (gutter_count);
@@ -421,6 +422,10 @@ void TextEdit::Text::remove_range(int p_from_line, int p_to_line) {
421422
422423 for (int i = p_from_line; i < p_to_line; i++) {
423424 const Line &text_line = text[i];
425+ if (text_line.hidden ) {
426+ continue ;
427+ }
428+
424429 if (text_line.height == max_line_height) {
425430 max_line_height_dirty = true ;
426431 }
@@ -435,6 +440,8 @@ void TextEdit::Text::remove_range(int p_from_line, int p_to_line) {
435440 text.write [(i - diff) + 1 ] = text[i + 1 ];
436441 }
437442 text.resize (text.size () - diff);
443+
444+ ERR_FAIL_COND (total_visible_line_count < 0 ); // BUG
438445}
439446
440447void TextEdit::Text::add_gutter (int p_at) {
You can’t perform that action at this time.
0 commit comments