1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

ScriptEditor: Fix line number gutter drag select

Fixes issue #42722
This commit is contained in:
Devin Curry
2020-10-11 10:44:53 -07:00
parent 6c173e2f7f
commit b9c35af15d
3 changed files with 75 additions and 32 deletions

View File

@@ -341,7 +341,10 @@ void CodeEdit::_gutter_clicked(int p_line, int p_gutter) {
}
if (p_gutter == line_number_gutter) {
cursor_set_line(p_line);
set_selection_mode(TextEdit::SelectionMode::SELECTION_MODE_LINE, p_line, 0);
select(p_line, 0, p_line + 1, 0);
cursor_set_line(p_line + 1);
cursor_set_column(0);
return;
}