mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Small refactoring
This commit is contained in:
parent
b5e2e9d737
commit
e61b20a7fe
@ -982,18 +982,15 @@ bool Notepad_plus::fileClose(BufferID id, int curView)
|
|||||||
bufferID = _pEditView->getCurrentBufferID();
|
bufferID = _pEditView->getCurrentBufferID();
|
||||||
Buffer * buf = MainFileManager.getBufferByID(bufferID);
|
Buffer * buf = MainFileManager.getBufferByID(bufferID);
|
||||||
|
|
||||||
int res;
|
|
||||||
|
|
||||||
//process the fileNamePath into LRF
|
|
||||||
const TCHAR *fileNamePath = buf->getFullPathName();
|
|
||||||
|
|
||||||
if (buf->isUntitled() && buf->docLength() == 0)
|
if (buf->isUntitled() && buf->docLength() == 0)
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
else if (buf->isDirty())
|
else if (buf->isDirty())
|
||||||
{
|
{
|
||||||
res = doSaveOrNot(fileNamePath);
|
const TCHAR* fileNamePath = buf->getFullPathName();
|
||||||
|
int res = doSaveOrNot(fileNamePath);
|
||||||
|
|
||||||
if (res == IDYES)
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
if (!fileSave(id)) // the cancel button of savedialog is pressed, aborts closing
|
if (!fileSave(id)) // the cancel button of savedialog is pressed, aborts closing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user