summaryrefslogtreecommitdiff
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 50abe8bc36..99ca82b311 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -332,7 +332,7 @@ void FindReplaceBar::_update_results_count() {
if (results_count_to_current > results_count) {
results_count_to_current = results_count_to_current - results_count;
- } else if (results_count_to_current == 0) {
+ } else if (results_count_to_current <= 0) {
results_count_to_current = results_count;
}
@@ -824,12 +824,15 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
if (k->is_pressed()) {
if (ED_IS_SHORTCUT("script_editor/zoom_in", p_event)) {
_zoom_in();
+ accept_event();
}
if (ED_IS_SHORTCUT("script_editor/zoom_out", p_event)) {
_zoom_out();
+ accept_event();
}
if (ED_IS_SHORTCUT("script_editor/reset_zoom", p_event)) {
_reset_zoom();
+ accept_event();
}
}
}
@@ -1594,6 +1597,10 @@ void CodeTextEditor::set_error_pos(int p_line, int p_column) {
error_column = p_column;
}
+Point2i CodeTextEditor::get_error_pos() const {
+ return Point2i(error_line, error_column);
+}
+
void CodeTextEditor::goto_error() {
if (!error->get_text().is_empty()) {
if (text_editor->get_line_count() != error_line) {