mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
TextEditor: Fix caret size in first and last position when line spacing is non-unity
This commit is contained in:
parent
d2d5e9bdd2
commit
56b7b7621e
1 changed files with 2 additions and 2 deletions
|
|
@ -2164,7 +2164,7 @@ float TextEditor::getJustificationOffsetX() const
|
|||
|
||||
TextEditor::CaretEdge TextEditor::getDefaultCursorEdge() const
|
||||
{
|
||||
return { { getJustificationOffsetX(), 0.0f }, currentFont.getHeight() };
|
||||
return { { getJustificationOffsetX(), 0.0f }, currentFont.getHeight() * lineSpacing };
|
||||
}
|
||||
|
||||
TextEditor::CaretEdge TextEditor::getCursorEdge (const CaretState& tempCaret) const
|
||||
|
|
@ -2183,7 +2183,7 @@ TextEditor::CaretEdge TextEditor::getCursorEdge (const CaretState& tempCaret) co
|
|||
const auto& lastParagraph = textStorage->back().value;
|
||||
|
||||
return { { getJustificationOffsetX(), lastParagraph->getTop() + lastParagraph->getHeight() },
|
||||
currentFont.getHeight() };
|
||||
currentFont.getHeight() * lineSpacing };
|
||||
}
|
||||
|
||||
return getTextSelectionEdge (visualIndex, tempCaret.getEdge());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue