mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
Introjucer: minor internal stuff.
This commit is contained in:
parent
2d441a63ee
commit
fb29acf1fa
5 changed files with 20 additions and 33 deletions
|
|
@ -75,7 +75,10 @@ void SourceCodeEditor::highlightLine (int lineNum, int characterIndex)
|
|||
{
|
||||
if (lineNum <= editor->getFirstLineOnScreen()
|
||||
|| lineNum >= editor->getFirstLineOnScreen() + editor->getNumLinesOnScreen() - 1)
|
||||
editor->scrollToLine (jmax (lineNum - editor->getNumLinesOnScreen() / 3, 0));
|
||||
{
|
||||
editor->scrollToLine (jmax (0, jmin (lineNum - editor->getNumLinesOnScreen() / 3,
|
||||
editor->getDocument().getNumLines() - editor->getNumLinesOnScreen())));
|
||||
}
|
||||
|
||||
editor->moveCaretTo (CodeDocument::Position (&editor->getDocument(), lineNum - 1, characterIndex), false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue