summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2016-10-10 00:10:13 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2016-10-10 11:56:45 +0200
commit2f80965845dd40c4a7981b0d3f011f26c185d63f (patch)
tree9c85b308d17eaa19fa8d7a1f8832d65452eaa4ac /tools
parente0e21984d8f5153892e3b7eff4feb64a2c976cf9 (diff)
Make text column numbers one-based
Make one-based the column number on the code editor Make one-based the column number for GDScript error messages Make one-based the column number for shader code error messages
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/code_editor.cpp2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 9240e3527c..b43a3e9ca7 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -1051,7 +1051,7 @@ void CodeTextEditor::_reset_zoom() {
void CodeTextEditor::_line_col_changed() {
line_nb->set_text(itos(text_editor->cursor_get_line() + 1));
- col_nb->set_text(itos(text_editor->cursor_get_column()));
+ col_nb->set_text(itos(text_editor->cursor_get_column() + 1));
}
void CodeTextEditor::_text_changed() {
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index b3317e8313..39efde8bea 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -155,7 +155,7 @@ void ShaderTextEditor::_validate_script() {
Error err = ShaderLanguage::compile(code,type,NULL,NULL,&errortxt,&line,&col);
if (err!=OK) {
- String error_text="error("+itos(line+1)+","+itos(col)+"): "+errortxt;
+ String error_text="error("+itos(line+1)+","+itos(col+1)+"): "+errortxt;
set_error(error_text);
get_text_edit()->set_line_as_marked(line,true);