You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix code editor not always centering to bookmarks
This commit is contained in:
@@ -1303,6 +1303,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
||||
if (line >= bpoints[bpoints.size() - 1]) {
|
||||
tx->unfold_line(bpoints[0]);
|
||||
tx->cursor_set_line(bpoints[0]);
|
||||
tx->center_viewport_to_cursor();
|
||||
} else {
|
||||
for (List<int>::Element *E = bpoints.front(); E; E = E->next()) {
|
||||
int bline = E->get();
|
||||
@@ -1329,6 +1330,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
||||
if (line <= bpoints[0]) {
|
||||
tx->unfold_line(bpoints[bpoints.size() - 1]);
|
||||
tx->cursor_set_line(bpoints[bpoints.size() - 1]);
|
||||
tx->center_viewport_to_cursor();
|
||||
} else {
|
||||
for (List<int>::Element *E = bpoints.back(); E; E = E->prev()) {
|
||||
int bline = E->get();
|
||||
|
||||
Reference in New Issue
Block a user