Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] - Option to hide prompt when closing an unsaved file #13178

Closed
vbergaaa opened this issue Feb 19, 2023 · 9 comments
Closed
Labels

Comments

@vbergaaa
Copy link

Description of the Issue

Needing to close multiple tabs that you don't want to save changes to is tedious due to the multiple prompts that appear when trying to close these tabs

Use Case

I often use notepad++ as a scrapbook to write down notes I need to store for a limited time. The duration could range from 10s to a week.
When needing to create a note, I open Notepad++ and create a new tab to store the information. The note is named 'New n' for the duration of it's life, and because I know it's a temp file, I don't want to save it, I just rely on Notepad++ to store it for it's duration.
I might create 10-20 tabs like this during a day. This quickly builds up, and at so at the end of the day (or week), I often go through each file and decide if it's ready to be deleted or not.
If its something I want to keep for another day, I go to the next tab, if not, I hit the x to delete it, then have to navigate to the prompt to hit 'no' because it's unsaved.
This is the tedious part and the part I wish I didn't have to do. I'm more than aware I'm deleting an unsaved file and that I'll be losing those changes, having a prompt appear in the middle of the window every time is unnecessary to me.

Proposed Feature

Add some type of optional way that a user can delete the file without being prompted about losing the unsaved changes
A few possible ideas (with my prefered one at the top):

  • Hold Shift while clicking close to close without prompt (and have a tooltip when the prompt appears saying 'hold shift while clicking to force delete without this prompt' (Discord does this and it's very effective).
  • A checkbox (or two) on the prompt that says ("do not show this prompt again" and/or "do not show this prompt again for new files")
  • A user preference you can navigate to that allows the prompt to not appear for new files.

Thank you for your consideration

@alankilborn
Copy link
Contributor

alankilborn commented Feb 20, 2023

Hold Shift while clicking close to close without prompt

Seems like a good idea in general, but it excludes those that are dedicated keyboardists and don't wish to use the mouse. But a keyboard way of doing it seems dangerous as you could suffer a "keyboard stutter" and lose data. There isn't a big danger with the Shift+clickX method, as that can hardly occur accidentally.

The other ideas you present have no stutter protection (including "mouse stutter" as well as keyboard), and seem dangerous to me.

@doug1234
Copy link
Contributor

doug1234 commented Mar 1, 2023

I was able to add the shift+click feature @alankilborn but do you think it is a useful addition without some keyboard way of doing it? Also, how would you document the feature's existence?

@alankilborn
Copy link
Contributor

@doug1234

but do you think it is a useful addition without some keyboard way of doing it

I'm not a good judge of this. :-)
The procedure is to submit a PR for the feature and let the Notepad++ author decide.

how would you document the feature's existence?

In the Notepad++ user manual, but no point in talking about that unless a change is going to be accepted.

Good luck.

@doug1234
Copy link
Contributor

doug1234 commented Mar 2, 2023

Thank you! I will get a PR together and see.

@alankilborn
Copy link
Contributor

I will get a PR together and see.

Be sure to follow the instructions in CONTRIBUTING.md.

doug1234 added a commit to doug1234/notepad-plus-plus that referenced this issue Mar 4, 2023
@donho
Copy link
Member

donho commented Mar 11, 2023

I personally don't like this idea - it's above all data security to me.
Let's see if there are the similar request coming.

@alankilborn
Copy link
Contributor

@avishayp You are describing a different scenario than the one presented by this issue. You should create a new issue.

@donho
Copy link
Member

donho commented Jun 10, 2023

I don't see it as a good behaviour. This feature won't be implemented.

@donho donho closed this as completed Jun 10, 2023
@donho donho added the reject label Jun 10, 2023
@donho
Copy link
Member

donho commented Jun 13, 2023

Instead, please use the feature of #13776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants