You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Merge pull request #94439 from kitbdev/fix-reopen-hscroll
Fix ScriptEditor scrolling horizontally when reopening script
This commit is contained in:
@@ -5913,6 +5913,11 @@ void TextEdit::adjust_viewport_to_caret(int p_caret) {
|
||||
}
|
||||
visible_width -= 20; // Give it a little more space.
|
||||
|
||||
if (visible_width <= 0) {
|
||||
// Not resized yet.
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2i caret_pos;
|
||||
|
||||
// Get position of the start of caret.
|
||||
|
||||
Reference in New Issue
Block a user