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

Append extension doesn't work in Save As dialog #9939

Closed
mere-human opened this issue Jun 3, 2021 · 5 comments
Closed

Append extension doesn't work in Save As dialog #9939

mere-human opened this issue Jun 3, 2021 · 5 comments
Assignees

Comments

@mere-human
Copy link
Contributor

Description of the Issue

This was originally reported on the Community Forum https://community.notepad-plus-plus.org/post/66533
Thanks to @pryrt and Alan Kilborn for providing details and @sasumner for testing.
Some discussion was in #9732.

Steps to Reproduce the Issue

  1. Press Ctrl+N to create new file; new1 tab appears
  2. Press Ctrl+Alt+S to invoke Save As dialog
  3. Check the Append extension checkbox:
    image
  4. Set the file name to anything without extension (e.g. z):
    image
  5. Click on Save button using left mouse button

Expected Behavior

File is saved with extension as z.txt

Actual Behavior

File is saved without extension as z

Note:
In step 5 if mouse click is replaced by

  • Enter key - works as expected (.txt extension added automagically)
  • Alt+S - doesn't work (no extension added)

Debug Information

Notepad++ v8 (64-bit)
Build time : May 27 2021 - 22:10:00
Path : E:\Installs\npp\npp.8.0.portable.x64\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19043.985
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

@mere-human
Copy link
Contributor Author

I have a fix, will do a PR after testing it.

@donho
Copy link
Member

donho commented Jun 3, 2021

OK, great. Thank you @mere-human for your investigation.
I can reproduce on button-click, ENTER & ALT+S.
I will do Notepad++ v8 RC3 this afternoon, hope this PR could be on time for Notepad++ v8

@donho
Copy link
Member

donho commented Jun 3, 2021

@mere-human
I don't wanna push you, just I'm about to package Notepd++ v8 RC3.
Is the fix ready to be merged or it's better to wait for integrating it in the next version?

@mere-human
Copy link
Contributor Author

@donho I'll push it today in a couple of hours.
I think, it's better to do it for current version rather than next one.

@donho
Copy link
Member

donho commented Jun 3, 2021

Sorry, v8 RC3 is out:
https://community.notepad-plus-plus.org/topic/21273/notepad-v8-release-candidate-3

If there are some critical bugs found in RC3, I'll be able to include the fix by rebuild RC4 or release 8.
Otherwise it's not a critical bug, we can integrate it in v8.1. So take you time.

mere-human added a commit to mere-human/notepad-plus-plus that referenced this issue Jun 3, 2021
Fix notepad-plus-plus#9939

In some cases, checkbox was found instead of OK button and window
procedure was overriden for it. Now, the OK button is identified
using style and label checks.

Also, in some cases IFileDialog::GetFileTypeIndex() returns
the old value. To fix that, always remember the file type selected.
mere-human added a commit to mere-human/notepad-plus-plus that referenced this issue Jun 3, 2021
Fix notepad-plus-plus#9939

In some cases, checkbox was found instead of OK button and window
procedure was overriden for it. Now, the OK button is identified
using style and label checks.

Also, in some cases IFileDialog::GetFileTypeIndex() returns
the old value. To fix that, always remember the file type selected.
@donho donho closed this as completed in 0e1a466 Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants