|
@@ -662,9 +662,12 @@ void UITextInput::setSyntaxHighlighter(UITextInputSyntaxHighlighter *syntaxHighl
|
|
|
void UITextInput::doMultilineResize() {
|
|
void UITextInput::doMultilineResize() {
|
|
|
|
|
|
|
|
if(multiLine) {
|
|
if(multiLine) {
|
|
|
|
|
+ int bufferOffset = -linesContainer->position.y/ ( lineHeight+lineSpacing);
|
|
|
|
|
+ int realLineOffset = wordWrapLines[bufferOffset].actualLineNumber;
|
|
|
if(width != lastResizeWidth) {
|
|
if(width != lastResizeWidth) {
|
|
|
updateWordWrap(0, lines.size()-1);
|
|
updateWordWrap(0, lines.size()-1);
|
|
|
}
|
|
}
|
|
|
|
|
+ showLine(realLineOffset, true);
|
|
|
renumberLines();
|
|
renumberLines();
|
|
|
restructLines();
|
|
restructLines();
|
|
|
readjustBuffer();
|
|
readjustBuffer();
|
|
@@ -1645,6 +1648,8 @@ void UITextInput::showLine(unsigned int lineNumber, bool top) {
|
|
|
if(!multiLine) {
|
|
if(!multiLine) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ scrollContainer->setContentSize(width, (((wordWrapLines.size()+1) * ((lineHeight+lineSpacing)))) + padding);
|
|
|
|
|
|
|
|
if(top) {
|
|
if(top) {
|
|
|
scrollContainer->setScrollValue(0.0, ((((offsetLineNumber) * ((lineHeight+lineSpacing)))) + padding)/(scrollContainer->getContentSize().y-scrollContainer->getHeight()));
|
|
scrollContainer->setScrollValue(0.0, ((((offsetLineNumber) * ((lineHeight+lineSpacing)))) + padding)/(scrollContainer->getContentSize().y-scrollContainer->getHeight()));
|