From 9c1b242370fa918573fabae994ea5e414ce24083 Mon Sep 17 00:00:00 2001 From: donho Date: Thu, 3 Apr 2008 18:53:07 +0000 Subject: [PATCH] [BUG_FIXED] Fix crash bug when 'Close All But Me' is selected. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@160 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index b3236ed2..d8244ee8 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4686,7 +4686,11 @@ bool Notepad_plus::fileCloseAllButCurrent() for (int i = 0 ; i < curIndex ; i++) if (!fileClose()) + { + curIndex -= i; + _pDocTab->activate(curIndex); return false; + } if (_pEditView->getNbDoc() > 1) {