Fix NPPM_RELOADFILE API return wrong result issue
Now NPPM_RELOADFILE returns the correct value: TRUE if reloading file succeeds, otherwise FALSE. Ref: https://community.notepad-plus-plus.org/topic/25533/nppm_reloadfile-should-return-true-_only_-on-success/4
This commit is contained in:
parent
2adf712135
commit
060396c698
|
@ -288,7 +288,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
|
|||
// Reload the document which matches with the given filePathName2switch.
|
||||
// wParam: 0 (not used)
|
||||
// lParam[in]: filePathName2Reload is the full file path of document to reload
|
||||
// Return TRUE
|
||||
// Return TRUE if reloading file succeeds, otherwise FALSE
|
||||
|
||||
#define NPPM_SWITCHTOFILE (NPPMSG + 37)
|
||||
// BOOL NPPM_SWITCHTOFILE(0, TCHAR* filePathName2switch)
|
||||
|
|
|
@ -682,7 +682,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
|
||||
BufferID id = MainFileManager.getBufferFromName(longNameFullpath);
|
||||
if (id != BUFFER_INVALID)
|
||||
doReload(id, wParam != 0);
|
||||
result = doReload(id, wParam != 0);
|
||||
|
||||
break; // For relaying this message to other plugin by calling "_pluginsManager.relayNppMessages(message, wParam, lParam)" at the end.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue