Skip to content

Commit 7b7e4f9

Browse files
committed
Start at the bottom of scroll when loading saved history
1 parent f3a71bd commit 7b7e4f9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

rt-shell/objects/obj_shell/Create_0.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ deferredQueue = ds_queue_create();
4747
// Variables for the saved history feature
4848
savedHistoryFilePath = working_directory + "rt-shell-saved-history.data";
4949
loadedSavedHistory = false;
50+
loadedHistoryScrolled = false;
5051

5152
// Mouse-argument data types
5253
enum mouseArgumentType {

rt-shell/objects/obj_shell/Step_0.gml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
if (saveHistory && !loadedSavedHistory) {
2-
self._load_history();
3-
loadedSavedHistory = true;
1+
if (saveHistory) {
2+
if (!loadedSavedHistory) {
3+
self._load_history();
4+
loadedSavedHistory = true;
5+
} else if (!loadedHistoryScrolled && isOpen) {
6+
targetScrollPosition = maxScrollPosition;
7+
scrollPosition = maxScrollPosition;
8+
loadedHistoryScrolled = true;
9+
}
410
}
511

612
if (!isOpen) {

0 commit comments

Comments
 (0)