Commit a0466e2c authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Don't show vertical scrollbar for single line controls.

The vertical scrollbar is not shown when the ES_MULTILINE style isn't used, unless ES_DISBALENOSCROLL is also used.
parent b9b9835f
......@@ -1071,7 +1071,8 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0;
bScrollBarWillBeVisible = (editor->nTotalLength > editor->sizeWindow.cy
&& (editor->styleFlags & WS_VSCROLL))
&& (editor->styleFlags & WS_VSCROLL)
&& (editor->styleFlags & ES_MULTILINE))
|| (editor->styleFlags & ES_DISABLENOSCROLL);
if (bScrollBarIsVisible != bScrollBarWillBeVisible)
ITextHost_TxShowScrollBar(editor->texthost, SB_VERT,
......@@ -1174,7 +1175,8 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
/* Update vertical scrollbar */
bScrollBarWasVisible = editor->vert_si.nMax > editor->vert_si.nPage;
bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy;
bScrollBarWillBeVisible = editor->nTotalLength > editor->sizeWindow.cy &&
(editor->styleFlags & ES_MULTILINE);
if (editor->vert_si.nPos && !bScrollBarWillBeVisible)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment