fix: can't show info tips if the first line contains errors

This commit is contained in:
Roy Qu 2024-03-30 10:56:18 +08:00
parent 91b8695b6e
commit d76ef859c5
2 changed files with 3 additions and 4 deletions

View File

@ -2030,6 +2030,7 @@ void Editor::onTooltipTimer()
}
}
// Get subject
bool isIncludeLine = false;
bool isIncludeNextLine = false;

View File

@ -588,8 +588,7 @@ bool QSynEdit::pointToLine(const QPoint &point, int &line)
|| (point.y() > clientTop()+clientHeight())) {
return false;
}
line = rowToLine(
yposToRow(point.y() / mTextHeight));
line = rowToLine(yposToRow(point.y()));
return true;
}
@ -718,8 +717,7 @@ BufferCoord QSynEdit::displayToBufferPos(const DisplayCoord &p) const
if (p.row<1)
return result;
// Account for code folding
if (useCodeFolding())
result.line = foldRowToLine(p.row);
result.line = rowToLine(p.row);
// Account for tabs
if (result.line <= mDocument->count() ) {
result.ch = xposToGlyphStartChar(result.line,p.x);