Commits

Takashi Sawanaka  committed 261f3fd

Didn't ask whether to close multiple windows when starting with /e option and then pressing ESC key to quit

  • Participants
  • Parent commits 4722b51
  • Branches default

Comments (0)

Files changed (2)

File Src/DirView.cpp

 			// Check if we got 'ESC pressed' -message
 			if (pMsg->wParam == VK_ESCAPE)
 			{
-				if (m_bEscCloses)
+				if (m_bEscCloses && !GetMainFrame()->m_bEscShutdown)
 				{
 					AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_CLOSE);
 					return FALSE;

File Src/MergeEditView.cpp

 		}
 
 		// Close window if user has allowed it from options
-		bool bCloseWithEsc = GetOptionsMgr()->GetBool(OPT_CLOSE_WITH_ESC);
-		if (pMsg->wParam == VK_ESCAPE && bCloseWithEsc)
+		if (pMsg->wParam == VK_ESCAPE)
 		{
-			GetParentFrame()->PostMessage(WM_CLOSE, 0, 0);
+			bool bCloseWithEsc = GetOptionsMgr()->GetBool(OPT_CLOSE_WITH_ESC);
+			if (bCloseWithEsc && !GetMainFrame()->m_bEscShutdown)
+				GetParentFrame()->PostMessage(WM_CLOSE, 0, 0);
 			return false;
 		}
 	}