From 1182371e0718505c1f8755360c4918de7e031982 Mon Sep 17 00:00:00 2001 From: Scott Sumner <30118311+sasumner@users.noreply.github.com> Date: Sun, 12 Jul 2020 15:12:48 -0400 Subject: [PATCH] Allow user to start making a stream selection and then change to column block Allow user to start making a stream selection and then change to column block by pressing ALT key during mouse or keyboard selection. Fix #8555, close #8557 --- PowerEditor/src/Notepad_plus.cpp | 4 ++++ PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index a87477fe9..393b49199 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -323,6 +323,10 @@ LRESULT Notepad_plus::init(HWND hwnd) _mainEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH); _subEditView.execute(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH); + // allow user to start selecting as a stream block, then switch to a column block by adding Alt keypress + _mainEditView.execute(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true); + _subEditView.execute(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true); + // Let Scintilla deal with some of the folding functionality _mainEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW); _subEditView.execute(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_SHOW); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 266ed0761..98ff523b2 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2341,6 +2341,9 @@ void FindReplaceDlg::findAllIn(InWhat op) _pFinder->_scintView.execute(SCI_SETUSETABS, true); _pFinder->_scintView.execute(SCI_SETTABWIDTH, 4); + // allow user to start selecting as a stream block, then switch to a column block by adding Alt keypress + _pFinder->_scintView.execute(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true); + // get the width of FindDlg RECT findRect; ::GetWindowRect(_pFinder->getHSelf(), &findRect); @@ -2446,6 +2449,9 @@ Finder * FindReplaceDlg::createFinder() pFinder->_scintView.execute(SCI_SETUSETABS, true); pFinder->_scintView.execute(SCI_SETTABWIDTH, 4); + // allow user to start selecting as a stream block, then switch to a column block by adding Alt keypress + pFinder->_scintView.execute(SCI_SETMOUSESELECTIONRECTANGULARSWITCH, true); + // get the width of FindDlg RECT findRect; ::GetWindowRect(pFinder->getHSelf(), &findRect);