mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
Improved CodeEditor cursor behaviour.
This commit is contained in:
parent
effe92f6e7
commit
c1b2a69a93
3 changed files with 31 additions and 13 deletions
|
|
@ -34,18 +34,18 @@ BEGIN_JUCE_NAMESPACE
|
|||
class CodeDocumentLine
|
||||
{
|
||||
public:
|
||||
CodeDocumentLine (const String& line_,
|
||||
CodeDocumentLine (const tchar* const line_,
|
||||
const int lineLength_,
|
||||
const int numNewLineChars,
|
||||
const int lineStartInFile_)
|
||||
: line (line_),
|
||||
: line (line_, lineLength_),
|
||||
lineStartInFile (lineStartInFile_),
|
||||
lineLength (lineLength_),
|
||||
lineLengthWithoutNewLines (lineLength_ - numNewLineChars)
|
||||
{
|
||||
}
|
||||
|
||||
~CodeDocumentLine() throw()
|
||||
~CodeDocumentLine()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +85,8 @@ public:
|
|||
++pos;
|
||||
}
|
||||
|
||||
newLines.add (new CodeDocumentLine (String (t + startOfLine, pos - startOfLine),
|
||||
pos - startOfLine, numNewLineChars,
|
||||
startOfLine));
|
||||
newLines.add (new CodeDocumentLine (t + startOfLine, pos - startOfLine,
|
||||
numNewLineChars, startOfLine));
|
||||
}
|
||||
|
||||
jassert (pos == text.length());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue