修复些bug

This commit is contained in:
2026-03-08 19:56:52 +08:00
parent de161899d6
commit b878cc71a3
10 changed files with 604 additions and 13 deletions

View File

@@ -345,11 +345,18 @@ namespace CMLeonOS.Gui.UILib
return;
}
if (markedLinesBegin == -1 || markedLinesEnd == -1) return;
AutoScroll();
for (int i = markedLinesBegin; i <= markedLinesEnd; i++)
int startLine = markedLinesBegin;
int endLine = markedLinesEnd;
if (startLine == -1 || endLine == -1)
{
startLine = (scrollY / fontHeight);
endLine = Math.Min(lines.Count - 1, ((scrollY + Height) / fontHeight));
}
for (int i = startLine; i <= endLine; i++)
{
int lineY = (i * fontHeight) - scrollY;
if (lineY < 0) continue;