diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 797d4ac26..83fa63773 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -650,6 +650,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa int selection = static_cast(execute(SCI_GETMAINSELECTION, 0, 0)); int caret = static_cast(execute(SCI_GETSELECTIONNCARET, selection, 0)); execute(SCI_SETSELECTION, caret, caret); + execute(SCI_SETSELECTIONMODE, SC_SEL_STREAM); break; } diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index f9f5fd2fc..8fb56a3b2 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -1360,7 +1360,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode) int textHeight = textMetrics.tmHeight; int textDescent = textMetrics.tmDescent; - int Flags = DT_SINGLELINE | DT_NOPREFIX; + int flags = DT_SINGLELINE | DT_NOPREFIX; // This code will read in one character at a time and remove every first ampersand (&). // ex. If input "test && test &&& test &&&&" then output will be "test & test && test &&&". @@ -1379,8 +1379,8 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode) if (_isVertical) { // center text horizontally (rotated text is positioned as if it were unrotated, therefore manual positioning is necessary) - Flags |= DT_LEFT; - Flags |= DT_BOTTOM; + flags |= DT_LEFT; + flags |= DT_BOTTOM; rect.left += (rect.right - rect.left - textHeight) / 2; rect.bottom += textHeight; @@ -1394,8 +1394,8 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode) else { // center text vertically - Flags |= DT_LEFT; - Flags |= DT_TOP; + flags |= DT_LEFT; + flags |= DT_TOP; const int paddingText = ((pDrawItemStruct->rcItem.bottom - pDrawItemStruct->rcItem.top) - (textHeight + textDescent)) / 2; const int paddingDescent = !hasMultipleLines ? ((textDescent + ((isDarkMode || !isSelected) ? 1 : 0)) / 2) : 0; @@ -1415,7 +1415,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode) ::SetTextColor(hDC, textColor); - ::DrawText(hDC, decodedLabel, lstrlen(decodedLabel), &rect, Flags); + ::DrawText(hDC, decodedLabel, lstrlen(decodedLabel), &rect, flags); ::RestoreDC(hDC, nSavedDC); }