From 70660eb608eea7a9c85a4bfb08761ffd6bfbc887 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 30 Jul 2022 16:28:31 +0200 Subject: [PATCH] Add carret block after option Fix #11944 --- PowerEditor/src/NppBigSwitch.cpp | 9 ++++++++- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index aa63ef994..b75a34b76 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1634,13 +1634,20 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa _mainEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth); _subEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth); } - else + else if (nppGUI._caretWidth == 4) { _mainEditView.execute(SCI_SETCARETWIDTH, 1); _subEditView.execute(SCI_SETCARETWIDTH, 1); _mainEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK); _subEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK); } + else // nppGUI._caretWidth == 5 + { + _mainEditView.execute(SCI_SETCARETWIDTH, 1); + _subEditView.execute(SCI_SETCARETWIDTH, 1); + _mainEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK | CARETSTYLE_BLOCK_AFTER); + _subEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK | CARETSTYLE_BLOCK_AFTER); + } return TRUE; } diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 25107468a..ee20761d7 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -789,7 +789,7 @@ intptr_t CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM ::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast(TEXT("2"))); ::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast(TEXT("3"))); ::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast(TEXT("Block"))); - + ::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast(TEXT("Block After"))); ::SendMessage(::GetDlgItem(_hSelf, IDC_WIDTH_COMBO), CB_SETCURSEL, nppGUI._caretWidth, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_FOLDINGTOGGLE, BM_SETCHECK, nppGUI._enableFoldCmdToggable, 0);