Open sorawee opened 3 years ago
The issue with newest frame is that sometimes a frame is opened separately from when a file is opened, from the perspective of DrRacket, but not from the user's point of view and we don't want spurious empty windows hanging around.
It may be that this happens only with the very first window that DrRacket creates but I have some kind of vague memory that we can get into this situation in other ways too. Going back through the git history I'm not seeing something that would help explain why it is needed after that first frame is created, but maybe to be conservative maybe the right thing to do is to keep the current behavior only when the "open in tabs" preference is disabled?
Yes, that would help.
I definitely agree with "we don't want spurious empty windows hanging around" when "open in tabs" preference is disabled, but note that newest-frame
doesn't quite solve the problem either. For example, with "open in tabs" preference disabled:
a.rkt
b.rkt
Only the most recent created window is "merged" with one of the opened files. The other created window is not.
True! I'm open to better strategies if you have something in mind.
Consider the following sequence of actions:
a.rkt
) in a tab via File > Open (with "Open files in separate tabs" on)a.rkt
)b.rkt
)I expect that
b.rkt
will be be in the same window asa.rkt
, but it's not.IIUC, this is due to how
open-drscheme-window
tries to open a new tab innewest-frame
, which is set to the most recent created window. I don't understand why that's a desirable behavior however.