Shift+F4 problem with Notepad++

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
TimoJ
Junior Member
Junior Member
Posts: 17
Joined: 2016-09-03, 14:13 UTC

Shift+F4 problem with Notepad++

Post by *TimoJ »

After some changes/bug fixes to Notepad++, editing a new file in Total Commander without giving a file extension with shift+F4 always gives an error.

e.g. I press shift+F4 , type test in the name dialog and Notepad++ opens with an error box saying: Cannot open file "D:\test.".
Notepad++ also doesn't use the given filename in this case. Notepad++ 8.4.7 is the last one that works, all after that have this problem.
Works fine if I type also a file extension for the new file.

Is this a Notepad++ problem or Total Commander problem? Notepad++ is now in 8.5.2 version and still the same issue, so I'm wondering if it's Total Commander's way of opening a new file that causes this? Or is this just something in my setup that is causing this?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Shift+F4 problem with Notepad++

Post by *Horst.Epp »

I have configured PSPad as editor.
If I press Shift f4 and enter the name test without any extension
it opens a empty file and shows it as test.
It saves it as file test without extension.
As this works as one can expect I would say Notepad++ is the problem.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Shift+F4 problem with Notepad++ and new file without extension

Post by *Stefan2 »

TimoJ wrote: 2023-05-09, 13:05 UTC . . . Is this a Notepad++ problem . . .

See viewtopic.php?p=429549&hilit=Notepad#p429549
(solved, was NP++ issue #12849) Shift-F4 mit Notepad++ v8.4.8 geht nicht
Works: "filename.ext"
Works: ".filename"
Error with just: "filename"

So maybe keep using v8.4.7. until Notepad++ can provide an fix for this.



Or use the DOS command
cmd /c copy nul testname
cmd /c copy nul "my new Test file"
e.g. in the TC command line box.

We can create an own UserCommand with that for you and you could assign them an Alias like 'nf'
and next you would just type 'nf testname' into the TC command line box.




EDIT:

for example:


usercmd.ini
[em_NewFile_withAlias]
cmd=cmd /c copy nul
Param=%A

WINCMD.INI
[Alias]
nf=em_NewFile_withAlias


Use in TC command line box as:
nf myNewFile
---or---
nf "My New File"



- - -


Edit2:

and BTW, since I wanted to do that for my own for an too long time, I now did it:

usercmd.ini
[em_NewFileAlias_INFOs] ; called by Alias nfi
cmd=cmd /c copy nul
Param=____INFOs_%%Date:~-4,4%%.%%Date:~-7,2%%.%%Date:~0,2%%.txt

WINCMD.INI
[Alias]
nfi=em_NewFileAlias_INFOs

The Alias 'nfi' creates a new textfile named "____INFOs_2023.05.09.txt" for me.

 
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Shift+F4 problem with Notepad++

Post by *petermad »

May I suggest this button for TC's buttonbar:

Code: Select all

TOTALCMD#BAR#DATA
%ProgramFiles%\Notepad++\notepad++.exe
?
%ProgramFiles%\Notepad++\notepad++.exe
Notepad++ with new file
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
When you click the butto, a dialog pops up where you can type the name of the file to open. If the file doesn't exist, Notepad++ will offer to create it in the current directory - and you can use file names without extension.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
TimoJ
Junior Member
Junior Member
Posts: 17
Joined: 2016-09-03, 14:13 UTC

Re: Shift+F4 problem with Notepad++

Post by *TimoJ »

Looks like this problem was fixed in Total Commander 11 final. Works fine with 11.01RC3.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Shift+F4 problem with Notepad++

Post by *ghisler(Author) »

Yes, it should be fixed in TC11 final:
02.08.23 Fixed: New text file (Shift+F4): Do not append dot to file without dot in name when the editor is set to notepad++.exe (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Shift+F4 problem with Notepad++

Post by *petermad »

Moderator message from: petermad » 2023-08-30, 08:55 UTC

Moved from "TC10.x bug reports (English)" to "TC Fixed bugs"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply