Merge pull request #48666 from LLschuster/master

text-editor: fix Clicking warning doesn't center around line #48639
This commit is contained in:
Rémi Verschelde 2021-05-13 21:11:16 +02:00 committed by GitHub
commit 0f5fddbdc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) {
void ScriptTextEditor::_warning_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
code_editor->get_text_editor()->cursor_set_line(p_line.operator int64_t());
goto_line_centered(p_line.operator int64_t());
} else if (p_line.get_type() == Variant::DICTIONARY) {
Dictionary meta = p_line.operator Dictionary();
code_editor->get_text_editor()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);