For quite a while Scite's MRU list has been bothering me. It seems to act erratically, with files I've closed first showing up in the list and then mysteriously disappearing later on.
Oddly enough, each time new entries disappeared older entries would show up in their place. Often files I had worked on the day before... Weird (and quite annoying)!
Today, it finally annoyed me enough to drop my work and try and figure out what's going on. Fortunately, I think I've solved this little mystery:
It turns out the MRU list is *not* mangled if I simply open files using a File menu command. But, things *do* go wrong if I open a file by (directly or indirectly) starting a 2nd Scite instance.
My Scite setup has check.if.already.open=1 as well as save.recent=1. So, what happens is, the 2nd instance passes its commandline to the 1st (already running) instance and then stops. The original instance will process the commandline and open any files that are mentioned.
So far, so groovy, it seems. However, in ProcessCommandLine (in SciTEBase.cxx) there are 2 places where both InitialiseBuffers and RestoreRecentMenu are called...
The one close to the end of the function looks fine to me, since it's only called if the buffers aren't already initialised. But the first occurrance of RestoreRecentMenu seems odd. Is this the place that keeps resetting my MRU list to a previous state? I believe so.
So, my question is: should those 3 lines (4712-4714; version 3.3.1) really be there? Won't this logic be called during phase 1 (in the section below) anyway?
I'm not familiar enough with Scite's code base to say for certain. But it seems to me that if a running instance is processing new parameters passed to it, it should leave the MRU list alone...
What do you think?
Ashwin.