Hi GHROK, thanks for the speedy reply.
I use UltraEdit/-Compare to deal with text, which keeps track of file data and modification times on the fly. The “…\AppData\Roaming\SumatraPDF\SumatraPDF-settings.txt” file is recreated but unaltered when exiting SumatraPDF using the menu via mouse, Alt-F → X, or the default Ctrl-Q hotkey. If SumatraPDF is exited using Alt-F4 or clicking the top-right X close button, the settings file is not recreated.
The RememberOpenedFiles property holds a “true” value at all times, as does the RestoreSession property (dunno if that’s involved). I rebooted and shut down my AutoHotkey scripts/everything else that might interfere with the exit/startup process, but the behaviour persists.
Uninstalling and renaming the “…\AppData\Roaming\SumatraPDF” directory to “…\AppData\Roaming\SumatraPDF_OLD”, I compared the settings files of the old and new installs. RememberOpenedFiles and RestoreSession’s value is “true” in both. Other than the FileStates section, the only differences were the values of the DefaultDisplayMode, DefaultZoom, WindowState, WindowPos, and SidebarDx properties—just cosmetics, I think?
The settings file not being recreated when exiting via Alt-F4/close button might have something to do with it, but since the seemingly relevant properties’ value remains “true”, I can’t think of how. To rule out SumatraPDF somehow ignoring the settings file if it was last exited using Alt-F4/close button, I changed the main background colour to black. Using Alt-F4 to exit the program, it indeed now always restarts with the black background—but still not with my previously loaded tab!?
This thread may indicate the same issue, i.e. the user possibly exiting SumatraPDF in different ways without realising it?
I’ll use AutoHotkey to remap Alt-F4 and the close button to Ctrl-Q if SumatraPDF is the active application for now.
LATER: The plot thickens… if two or more tabs are open at the time of exiting SumatraPDF, they’re reloaded successfully when restarting it regardless of the exit method. The settings file still isn’t recreated when exiting via Alt-F4/close button, so that’s not linked to the problem, but it’s comforting. (i.e. no file’s ghost haunting the user if they exit the program in a way which reminds it of its gruesome and untimely death. )
EDIT: The user in the thread above possibly had 1 tab open when exiting sometimes, but 2 or more when exiting at other times?
tl;dr: If the user has A) only one tab open and B) closes SumatraPDF using the Alt-F4 keyboard shortcut or clicking the top-right X close button, this tab will not be reloaded when restarting the program.