Fix regression of multi-edit cursors placed wrongly issue
Fix #15126, close #15129pull/15133/head^2
parent
78c7c3e645
commit
1e19719f8f
|
@ -650,6 +650,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
|||
int selection = static_cast<int>(execute(SCI_GETMAINSELECTION, 0, 0));
|
||||
int caret = static_cast<int>(execute(SCI_GETSELECTIONNCARET, selection, 0));
|
||||
execute(SCI_SETSELECTION, caret, caret);
|
||||
execute(SCI_SETSELECTIONMODE, SC_SEL_STREAM);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue