#69 Use an initial path to save new files


//--LS: UseInitialPathForNewFiles:
Patch for Npp 4.8.2 SVN release 154

When saving a newly created file in Npp, it is annoying to navigate always from the Npp-directory to the actual working directory.

Therefore, Buffer-Class and ScintillaEditView.h as well as fileNew() and saveAs() have been expanded to use an "initial path" when a new file is saved the first time.

When creating a new file, the "initial path" of that new file is the path of the current active file.

(Alternatively, the real current working directory could be used. This would only give a difference if parameter setting "Remember the last operation directory" was activated. Then, the initial path would be always the first current working directory, when Npp was started! Both alternative behaviour could be made available with an additional parameter setting.)

If the current active file is already a new file, the initial path of that new file is used.
If there is no already saved file, (e.g. Npp just started without file) the initial path is set to the working directory at startup.
The working directory of all new files is still set to the Npp-directory in order to avoid locking current directory behaviour (see SVN release 122, Npp 4.75->4.80)
However, SaveAs dialogue will open in the directory from which the new file was created.
Nevertheless, the Open-dialogue called from a new file will still open in the Npp-directory.



  • FLS

    FLS - 2008-03-27

    Patch UseInitialPathForNewFiles

  • FLS

    FLS - 2013-02-14

    Apparently, the above mentioned annoying behaviour has been changed in the current version of NPP (6.x).

    Therefore, this ticket can be closed!

  • Don HO

    Don HO - 2014-08-17
    • Group: --> Next_major_release
  • Don HO

    Don HO - 2014-08-17


  • Don HO

    Don HO - 2015-02-20
    • status: open --> closed
    • Priority: 5 --> 1

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks