notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Load Session... command cleanses the session file from inactive entries.

Open
#7,931 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Hi, I see that command Menu bar > File > Load Session... automatically deletes inactive entries from session file. So If we have session with 2 <File> node, and second node indicates to non-existent file (via filename attribute), then Notepad++ remove second node and overwrite existing session file.

Is there any option that will turn off this automatic cleanup in session file? I have a lot of extensive session files, some of them have outdated entries (because I often move source files), but I don't always remember which entries are inactive, and I don't fix the filename attribute with every such change. So every attempt to load such a session file by Load Session... causes its cleaning. This, in fact, spoils the original arrangement in the session file and it's hard to rebuild it later, because it is not enough to just correct the inactive paths, we must build such a session file from the beginning.

If this automatic cleaning session file cannot be turned off, then please add this option. From my perspective modifying the user's original files without any information/asked about it is too invasive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Menu bar > File > Load Session... command and trace how it loads and rewrites session files. Confirm how inactive entries are handled, then define the option's behavior so loading can preserve them; done should include coverage for a session containing a nonexistent filename.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.