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
375 stars 52 forks source link

Add INI setting to disable file save prompt in Launch > New Window #361

Closed ProgerXP closed 2 years ago

ProgerXP commented 3 years ago

Currently New Window brings up the prompt for unsaved file. The new option (disabled by default) removes this prompt, opening new window without saving the file.

This is irrespective of Save Before Running Tools.

cshnik commented 3 years ago

Done. SkipFileSavePromptOnNewWindowCommand INI option added: 0 (default), 1 - disable file save prompt.

ProgerXP commented 2 years ago

Remove SkipFileSavePromptOnNewWindowCommand, instead extend Notepad2's SaveBeforeRunningTools so that value 2 (2e-specific) works as SkipFileSavePromptOnNewWindowCommand=1, given that this setting has no meaning when SaveBeforeRunningTools is disabled.

cshnik commented 2 years ago

SaveBeforeRunningTools option is tied to main menu item with a checkbox. How is it supposed to work/switch there (in the case of a new non-boolean value [0,1,2])? image

ProgerXP commented 2 years ago

Right, change this into a submenu with 3 radios:

cshnik commented 2 years ago

Done.

ProgerXP commented 2 years ago

Memo: the setting affects these commands in Notepad2:

  1. New Window
  2. Empty Window
  3. Execute Document
  4. Open with
  5. Command (Ctrl+R)

In #176 we have disabled it for Empty Window. Now, Enabled affects 1, 3-5 while except affects 3-5.