ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
370 stars 52 forks source link

Make Reuse Window non-global #454

Closed ProgerXP closed 7 months ago

ProgerXP commented 1 year ago

Toggling Settings > Reuse Window in Notepad2 causes the change across all running Notepad2 instances and makes it unpredictable which window will receive the newly opened file.

This setting must be individual to every process just like most settings (but not Sticky Window Position or Single File Instance) so that when starting a new process instances with this flag disabled are not considered. Persisting this in INI must be removed.

Update: in Notepad2 this flag doesn't act as a filter when launching a process; it simply determines if (any) new process must reuse any existing process.

cshnik commented 1 year ago

Done.

ProgerXP commented 1 year ago

In the end, we have changed the meaning of -R and -N switches compared to Notepad2:

In Notepad2, ReuseWindow state is stored in the INI; giving -R or -N overrides that (default) value for this particular process while giving none uses the INI's value (giving both is illegal).

In Notepad2, if INI is not in use, Settings > Reuse Window is non-functional but the CLI switches are allowed. In Notepad 2e, the INI is no longer used for this feature at all.

ProgerXP commented 7 months ago

both -R and -N: as above except that Reuse Window is enabled in the new window

Let's change the meaning of this combination:

cshnik commented 7 months ago

Done.