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
When using Notepad++ as notepad replacement, it doesn't open a file without extension #7902
Comments
Is it really true that no npp devs have been able to reproduce this bug? |
Or is it that no one has any idea what causes it to try to append a .txt at the end? |
This is the line of code, that causes the problem:
|
So we can just remove that line and commit it and then make a pull request to the main repository? Are you going to make a pull request or should I? |
Would they accept it? Why does that line even exist? |
When you look at the comments of the method, the question is, why is Notepad++ mirroring it's behavior and is it necessary?
Maybe @donho can help out here? |
This has been there from the time the function was created. See this commit: |
No it is not. |
I just updated the issue with a Proposed change section 😉 |
This change aligns the behavior of the original notepad.exe with notepad++.exe when it's used as image hijack for notepad.exe. Fixes notepad-plus-plus#7902
Has anyone tested the solution of Notepad replacement under Windows 11 with v8.3.3 or v8.4? |
@donho I'll try to set up a quick test environment in the evening... |
@donho It does not work by default on Windows 11, there is an additional DWORD that has to be set (changed): "UseFilter"=dword:00000000 With this change, it works as before with Windows 10 Update
The problem seems to have something to do with the new notepad app: Update again
|
@donho As you can see it is not that easy for Windows 11. (the easiest solution would be to delete the Windows Notepad Store App) Nevertheless it would be cool to get the fix merged for all other Windows versions... 🙏 |
From this related thread:
|
Also:
|
@rdipardo I tried this on Win11 (OS Build 22000.613) and sadly it didn't work |
I wonder if we should keep supporting Notepad replacement solution, since it becomes more complex under Windows11 (and surly the future Windows' versions). @pryrt What do you think? |
In my opinion, it should still be an option, because:
|
I tend to agree with @kapsiR : given how long the feature has been available, I am sure that users who have grown accustomed to that implementation would be upset if you took away that long-standing feature. I would prefer to just add documentation to the user manual which shows the win11 workarounds that @kapsiR had highlighted. I used to wonder why people would use the hack, rather than File Associations or the more modern Open With mechanism. |
Sorry for the late reply. |
After a closer look, I do believe this bug has been fixed in 6c3659f |
hi there, i use this Registry Settings: Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="\"C:\\Program Files\\Notepad++\\notepad++.exe\" -notepadStyleCmdline -z"
"UseFilter"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0]
"AppExecutionAliasRedirect"=dword:00000001
"AppExecutionAliasRedirectPackages"="*"
"FilterFullPath"="notepad++.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1]
"AppExecutionAliasRedirect"=dword:00000001
"AppExecutionAliasRedirectPackages"="*"
"FilterFullPath"="notepad++.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2]
"AppExecutionAliasRedirect"=dword:00000001
"AppExecutionAliasRedirectPackages"="*"
"FilterFullPath"="notepad++.exe" Also tried without the Sub-Keys 0, 1 and 2 -> no difference! Example, Run (Win + R) this:
will result in this:
also when open a "*.reg" file by "Edit" in the Windows Context menu will result in this:
BUT the file will still open? Open any solution? |
Description of the Issue
When using Notepad++ as replacement for
notepad.exe
, the behavior for opening files without extension is weird.Steps to Reproduce the Issue
Using Notepad++ v7.8.4 x64
notepad.exe
with Notepad++ (See Notepad Replacement)notepad.exe
.txt
if ther is no file extension?!)Expected Behavior
Open files without extension too when using
notepad.exe
(e.g. README, LICENSE)Proposed change
Add an additional check if the file without a file extension does exist or not before adding a
.txt
extension.The affected lines of code.
Actual Behavior
Notepad++ looks, if the same file with the
.txt
extension is available.txt
extensionNote: If I open any file without extension directly with Notepad++, it works as expected!
Debug Information
Notepad++ v7.8.4 (64-bit)
Build time : Jan 29 2020 - 01:31:03
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1909
OS Build : 18363.592
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll
The text was updated successfully, but these errors were encountered: