#426 Enhancement: Remember Edit View per File


Enhancement: Remember Edit View per File

With the parameter setting "Remember current session for next launch", ALL open files are restored, even if the user wants only to open - and restore the edit view - of just another single file. Some other text editors, like EditPadPro7 and UltraEdit, restore the edit view (first line in edit view, etc.) of recently opened files in a file by file manner. This feature is added to Notepad++ with this patch.

With this patch, the edit view of a number of recently opened files are saved like for a session but independently.

Whenever a file is closed, the edit view information is written into an extra node (FileEditViewHistory) into the config.xml file. The list of files in this node is managed like the node for the history of recently opend files.

Whenever a file is opened, and this feature is enabled, the filename is searched in the list of files in the FileEditViewHistory-node.
When it is found, the edit view for that file is restored.

The Settings-Preferences-MISC dialog is enhanced with a checkbox to enable/disable this functionality and the possibility to set the number of files to remember.

Patch: NppPatch_6.1.7_RememberEditViewHistoryPerFile-WithGUI.patch
- CommentCode:
xFileEditViewHistory: for the basic functionality
xFileEditViewHistoryParameterGUI: for the Settings-Preferences-MISC dialog upgrade


  • FLS

    When an opened file is deleted and the buffer is then not kept in NPP, Npp crashes.

    The reason is that Buffer::getPosition() crashes if applied to a no more existing buffer, which is the case when deleting the buffer of a no more existing file.

    This patch (Buffer.cpp-getPositionBugFix.patch) prevents NPP of crashing.

    • FLS

      BugFix and most parts of "RememberEditViewHistoryPerFile" has been introduced in SVN revision 1024. Only the update of the GUI (Settings-Preferences-MISC diagogue) is missing (see first attachment).