minor update
This commit is contained in:
parent
4f312b8de4
commit
07d5d4be98
|
@ -287,7 +287,7 @@ int QSynEdit::maxScrollWidth() const
|
||||||
{
|
{
|
||||||
int maxWidth = mDocument->maxLineWidth();
|
int maxWidth = mDocument->maxLineWidth();
|
||||||
if (maxWidth <= 0)
|
if (maxWidth <= 0)
|
||||||
return INT_MAX; //all inlines invalid. Next paintEvent() will update it.
|
return maxWidth; //all inlines invalid. Next paintEvent() will update it.
|
||||||
if (useCodeFolding())
|
if (useCodeFolding())
|
||||||
maxWidth += stringWidth(syntaxer()->foldString(""),maxWidth);
|
maxWidth += stringWidth(syntaxer()->foldString(""),maxWidth);
|
||||||
if (mOptions.testFlag(eoScrollPastEol))
|
if (mOptions.testFlag(eoScrollPastEol))
|
||||||
|
@ -3090,6 +3090,8 @@ void QSynEdit::updateHScrollbar()
|
||||||
if (mScrollBars == ScrollStyle::ssBoth || mScrollBars == ScrollStyle::ssHorizontal) {
|
if (mScrollBars == ScrollStyle::ssBoth || mScrollBars == ScrollStyle::ssHorizontal) {
|
||||||
nMin = 0;
|
nMin = 0;
|
||||||
nMax = maxScrollWidth();
|
nMax = maxScrollWidth();
|
||||||
|
if (nMax<=0)
|
||||||
|
return;
|
||||||
nPage = viewWidth();
|
nPage = viewWidth();
|
||||||
nPos = mLeftPos;
|
nPos = mLeftPos;
|
||||||
horizontalScrollBar()->setMinimum(nMin);
|
horizontalScrollBar()->setMinimum(nMin);
|
||||||
|
@ -3340,8 +3342,8 @@ void QSynEdit::uncollapse(PCodeFoldingRange FoldRange)
|
||||||
|
|
||||||
// Redraw fold mark
|
// Redraw fold mark
|
||||||
invalidateGutterLines(FoldRange->fromLine, INT_MAX);
|
invalidateGutterLines(FoldRange->fromLine, INT_MAX);
|
||||||
updateVScrollbar();
|
|
||||||
updateHScrollbar();
|
updateHScrollbar();
|
||||||
|
updateVScrollbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSynEdit::collapse(PCodeFoldingRange FoldRange)
|
void QSynEdit::collapse(PCodeFoldingRange FoldRange)
|
||||||
|
|
Loading…
Reference in New Issue