From 134920648d17d3e8e1b7f61e4b60fb1aeeefaa1f Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 7 Dec 2014 01:23:05 +0000 Subject: [PATCH] [BUG_FIXED] Make "Text Direction RTL" command and "Text Direction LTR" command work without reloading file. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1302 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/NppCommands.cpp | 7 +++++-- PowerEditor/src/config.model.xml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index f5d3f0437..42924ceac 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2386,8 +2386,11 @@ void Notepad_plus::command(int id) long exStyle = ::GetWindowLongPtr(_pEditView->getHSelf(), GWL_EXSTYLE); exStyle = (id == IDM_EDIT_RTL)?exStyle|WS_EX_LAYOUTRTL:exStyle&(~WS_EX_LAYOUTRTL); ::SetWindowLongPtr(_pEditView->getHSelf(), GWL_EXSTYLE, exStyle); - BufferID buf = _pEditView->getCurrentBufferID(); - doReload(buf, buf->isDirty()); + + // Wrap then !wrap to fix problem of mirror characters + bool isWraped = _pEditView->isWrap(); + _pEditView->wrap(!isWraped); + _pEditView->wrap(isWraped); } break; diff --git a/PowerEditor/src/config.model.xml b/PowerEditor/src/config.model.xml index 244a45541..264040532 100644 --- a/PowerEditor/src/config.model.xml +++ b/PowerEditor/src/config.model.xml @@ -74,6 +74,7 @@ 2 +