With the messages:
NPPN_FILESAVED and NPPN_FILEBEFORESAVE
If the user makes a new file, "New 1", and then does a save, and chooses a new name for the file, NPPM_GETFILENAME will still give the old, "New 1" filename. Is there another way to get the filename, or a different message i should look for?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so now Load Filenames are incorrect on both NPPN_FILEBEFOREOPEN and NPPN_FILEOPENED
Any calls to NPPM_GETFILENAME will get the file that is currently selected, but it looks like that selection doesn't update until after the OPENED call. It works ok for the first file opened, but any files open thereafter will not get a correct filename from NPPM_GETFILENAME.
This is version 5.0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I downloaded the latest notepad++ exe, v4.9.2, and am using the messages from the link you mentioned, and I am still experiencing this problem in both FILESAVED && FILEBEFORESAVE when using NPPM_GETFILENAME
NPPM_GETFILENAME is defined as #define NPPM_GETFILENAME (RUNCOMMAND_USER + FILE_NAME)
RUNCOMMAND_USER = WM_USER + 3000, and FILENAME is 3
Same steps as before to repro, new file, hit save as, and when i make a GETFILENAME call, i get the name of the file before the save as. Its arguable that FileBeforeSave and GetFileName should return the name of the file before its changed, but FileSaved really should return the true filename that was saved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could you please try again with v5.0? Most of the times it should render the correct name, unless a file that is not active is being saved (as with save all, close all etc).
Maybe the message needs some expansion where it gives the filename as part of the notification.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With the messages:
NPPN_FILESAVED and NPPN_FILEBEFORESAVE
If the user makes a new file, "New 1", and then does a save, and chooses a new name for the file, NPPM_GETFILENAME will still give the old, "New 1" filename. Is there another way to get the filename, or a different message i should look for?
Ok, so now Load Filenames are incorrect on both NPPN_FILEBEFOREOPEN and NPPN_FILEOPENED
Any calls to NPPM_GETFILENAME will get the file that is currently selected, but it looks like that selection doesn't update until after the OPENED call. It works ok for the first file opened, but any files open thereafter will not get a correct filename from NPPM_GETFILENAME.
This is version 5.0
https://sourceforge.net/forum/forum.php?thread_id=2095366&forum_id=482781
Don
Yeah, see my monolog at
<http://sourceforge.net/forum/forum.php?thread_id=2021691&forum_id=482781>
Unfortuently, there seems not too much todo about it
/Björn
I just
1. With which version of Notepad++ your plugin works?
2. Make sure your Notepad_plus_msgs.h is updated (with v4.9.2 : http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h?revision=195&view=markup\)
3. Showing me your code may help.
Don
I downloaded the latest notepad++ exe, v4.9.2, and am using the messages from the link you mentioned, and I am still experiencing this problem in both FILESAVED && FILEBEFORESAVE when using NPPM_GETFILENAME
NPPM_GETFILENAME is defined as #define NPPM_GETFILENAME (RUNCOMMAND_USER + FILE_NAME)
RUNCOMMAND_USER = WM_USER + 3000, and FILENAME is 3
NPPN_FIRST = 1000;
NPPN_FILEBEFORESAVE = NPPN_FIRST + 7;
NPPN_FILESAVED = NPPN_FIRST + 8;
Same steps as before to repro, new file, hit save as, and when i make a GETFILENAME call, i get the name of the file before the save as. Its arguable that FileBeforeSave and GetFileName should return the name of the file before its changed, but FileSaved really should return the true filename that was saved.
Could you please try again with v5.0? Most of the times it should render the correct name, unless a file that is not active is being saved (as with save all, close all etc).
Maybe the message needs some expansion where it gives the filename as part of the notification.
I don't see any links to version 5 in the download section, is there somewhere else i should grab it?
You can find it in open discussion, v5 alpha. Currently its pretty high listed, you cant miss it :)
Thanks, found it, tested it, and it seems to fix my problem.