fix(caret): underline caret too low

This commit is contained in:
Miodec 2024-02-23 21:24:45 +01:00
parent 01aefa91b4
commit 91c30cd889

View file

@ -112,7 +112,11 @@ export async function updatePosition(noAnim = false): Promise<void> {
const diff = letterHeight - caret.offsetHeight;
const newTop = letterPosTop + diff / 2;
let newTop = letterPosTop + diff / 2;
if (Config.caretStyle === "underline") {
newTop = letterPosTop - caret.offsetHeight / 2;
}
let newLeft = letterPosLeft - (fullWidthCaret ? 0 : caretWidth / 2);