summaryrefslogtreecommitdiffstats
path: root/editor/plugins/shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorChaosus <chaosus89@gmail.com>2018-11-21 13:56:02 +0300
committerChaosus <chaosus89@gmail.com>2018-11-22 11:55:36 +0300
commit1129d8327285c1d3732532b6c09a3079a4a45b58 (patch)
treeb4152c588ce9282afda279f175ff95f42f461947 /editor/plugins/shader_editor_plugin.cpp
parentda0ec37aa9c6fd80becc9d8ffa8fd064445d8023 (diff)
downloadredot-engine-1129d8327285c1d3732532b6c09a3079a4a45b58.tar.gz
Allows user to click on error line to jump into error.
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 638de1b213..6bc5c77df2 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -193,6 +193,7 @@ void ShaderTextEditor::_validate_script() {
if (err != OK) {
String error_text = "error(" + itos(sl.get_error_line()) + "): " + sl.get_error_text();
set_error(error_text);
+ set_error_pos(sl.get_error_line() - 1, 0);
for (int i = 0; i < get_text_edit()->get_line_count(); i++)
get_text_edit()->set_line_as_marked(i, false);
get_text_edit()->set_line_as_marked(sl.get_error_line() - 1, true);