From 02e92ab36b9a9c8d439829ebc8ab3144b93a3d17 Mon Sep 17 00:00:00 2001 From: harrybharry Date: Wed, 8 Oct 2008 22:22:02 +0000 Subject: [PATCH] Fix wrap after save as bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@339 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index c7bae7f9b..d046cd21a 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1105,9 +1105,10 @@ bool Notepad_plus::fileSaveAs(BufferID id, bool isSaveCopy) BufferID other = _pNonDocTab->findBufferByName(pfn); if (other == BUFFER_INVALID) //can save, other view doesnt contain buffer { - doSave(bufferID, pfn, isSaveCopy); - buf->setNeedsLexing(true); - return true; + bool res = doSave(bufferID, pfn, isSaveCopy); + //buf->setNeedsLexing(true); //commented to fix wrapping being removed after save as (due to SCI_CLEARSTYLE or something, seems to be Scintilla bug) + //Changing lexer after save seems to work properly + return res; } else //cannot save, other view has buffer already open, activate it {