Skip to content

Commit

Permalink
Fix a LTR setting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Dec 1, 2023
1 parent 0801e5b commit 4c7cd3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions PowerEditor/src/NppIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,17 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode, const wch

int mainIndex2Update = -1;

// no session
if (!session.nbMainFiles() && !session.nbSubFiles())
{
Buffer* buf = getCurrentBuffer();
if (nppParam.getNativeLangSpeaker()->isRTL() && nppParam.getNativeLangSpeaker()->isEditZoneRTL())
buf->setRTL(true);

_mainEditView.changeTextDirection(buf->isRTL());
return true;
}

for (size_t i = 0; i < session.nbMainFiles() ; )
{
const TCHAR *pFn = session._mainViewFiles[i]._fileName.c_str();
Expand Down

0 comments on commit 4c7cd3f

Please sign in to comment.