| 977 | } |
| 978 | |
| 979 | void CodeTextEditor::_line_col_changed() { |
| 980 | if (!code_complete_timer->is_stopped() && code_complete_timer_line != text_editor->get_caret_line()) { |
| 981 | code_complete_timer->stop(); |
| 982 | } |
| 983 | |
| 984 | String line = text_editor->get_line(text_editor->get_caret_line()); |
| 985 | |
| 986 | int positional_column = 0; |
| 987 | for (int i = 0; i < text_editor->get_caret_column(); i++) { |
| 988 | if (line[i] == '\t') { |
| 989 | positional_column += text_editor->get_indent_size(); // Tab size |
| 990 | } else { |
| 991 | positional_column += 1; |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | StringBuilder sb; |
| 996 | sb.append(itos(text_editor->get_caret_line() + 1).lpad(4)); |
| 997 | sb.append(" : "); |
| 998 | sb.append(itos(positional_column + 1).lpad(3)); |
| 999 | |
| 1000 | line_and_col_txt->set_text(sb.as_string()); |
| 1001 | |
| 1002 | if (find_replace_bar) { |
| 1003 | if (!find_replace_bar->line_col_changed_for_result) { |
| 1004 | find_replace_bar->needs_to_count_results = true; |
| 1005 | } |
| 1006 | |
| 1007 | find_replace_bar->line_col_changed_for_result = false; |
| 1008 | } |
| 1009 | } |
| 1010 | |
| 1011 | void CodeTextEditor::_text_changed() { |
| 1012 | if (code_complete_enabled && text_editor->is_insert_text_operation()) { |
nothing calls this directly
no test coverage detected