From 7a64fd5161f5cd09254260229bd9fbbb64e49b55 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 25 Jul 2022 05:35:30 +0200 Subject: [PATCH] Enhance very long line's performance When document contains a very long line and the wrapped feature is ON, switch off then switch back to this document could take times. This commit reduce the delay largely while switching into the document with very long line. Fix #11942 --- 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 4197b0bfb..78626ed42 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -341,6 +341,10 @@ LRESULT Notepad_plus::init(HWND hwnd) _subEditView.execute(SCI_SETMARGINLEFT, 0, svp._paddingLeft); _subEditView.execute(SCI_SETMARGINRIGHT, 0, svp._paddingRight); + // Improvement of the switching into the wrapped long line document + _mainEditView.execute(SCI_STYLESETCHECKMONOSPACED, STYLE_DEFAULT, true); + _subEditView.execute(SCI_STYLESETCHECKMONOSPACED, STYLE_DEFAULT, true); + TabBarPlus::doDragNDrop(true); if (_toReduceTabBar)