From 7870e38fd705ae5925eb935e5679f5e90329735d Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Thu, 16 Jan 2020 11:16:02 -0300 Subject: [PATCH] Fixes IDE not restoring last session's window size. How? I don't know. The bug shows when the code is replaced with a mere _CWD$ but disappears when the cd > or pwd > approach is restored. Go figure. --- source/ide/ide_methods.bas | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 93b8cb1b3..c3ea94532 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -10212,7 +10212,21 @@ END FUNCTION FUNCTION idezgetroot$ 'note: does NOT including a trailing / or \ on the right - idezgetroot$ = _CWD$ + IF os$ = "WIN" THEN + SHELL _HIDE "cd >.\internal\temp\root.txt" + OPEN ".\internal\temp\root.txt" FOR INPUT AS #150 + LINE INPUT #150, a$ + idezgetroot$ = a$ + CLOSE #150 + EXIT FUNCTION + ELSE + SHELL _HIDE "pwd >./internal/temp/root.txt" + OPEN "./internal/temp/root.txt" FOR INPUT AS #150 + LINE INPUT #150, a$ + idezgetroot$ = a$ + CLOSE #150 + EXIT FUNCTION + END IF END FUNCTION