| @@ -677,6 +677,7 @@ void CodeEditorComponent::scrollToLineInternal (int newFirstLineOnScreen) | |||||
| updateCachedIterators (firstLineOnScreen); | updateCachedIterators (firstLineOnScreen); | ||||
| rebuildLineTokensAsync(); | rebuildLineTokensAsync(); | ||||
| pimpl->handleUpdateNowIfNeeded(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1039,14 +1040,16 @@ bool CodeEditorComponent::moveCaretToStartOfLine (const bool selecting) | |||||
| bool CodeEditorComponent::moveCaretToEnd (const bool selecting) | bool CodeEditorComponent::moveCaretToEnd (const bool selecting) | ||||
| { | { | ||||
| newTransaction(); | newTransaction(); | ||||
| moveCaretTo (CodeDocument::Position (document, std::numeric_limits<int>::max(), std::numeric_limits<int>::max()), selecting); | |||||
| moveCaretTo (CodeDocument::Position (document, std::numeric_limits<int>::max(), | |||||
| std::numeric_limits<int>::max()), selecting); | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool CodeEditorComponent::moveCaretToEndOfLine (const bool selecting) | bool CodeEditorComponent::moveCaretToEndOfLine (const bool selecting) | ||||
| { | { | ||||
| newTransaction(); | newTransaction(); | ||||
| moveCaretTo (CodeDocument::Position (document, caretPos.getLineNumber(), std::numeric_limits<int>::max()), selecting); | |||||
| moveCaretTo (CodeDocument::Position (document, caretPos.getLineNumber(), | |||||
| std::numeric_limits<int>::max()), selecting); | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -1057,13 +1060,9 @@ bool CodeEditorComponent::deleteBackwards (const bool moveInWholeWordSteps) | |||||
| cut(); // in case something is already highlighted | cut(); // in case something is already highlighted | ||||
| moveCaretTo (document.findWordBreakBefore (caretPos), true); | moveCaretTo (document.findWordBreakBefore (caretPos), true); | ||||
| } | } | ||||
| else | |||||
| else if (selectionStart == selectionEnd && ! skipBackwardsToPreviousTab()) | |||||
| { | { | ||||
| if (selectionStart == selectionEnd) | |||||
| { | |||||
| if (! skipBackwardsToPreviousTab()) | |||||
| selectionStart.moveBy (-1); | |||||
| } | |||||
| selectionStart.moveBy (-1); | |||||
| } | } | ||||
| cut(); | cut(); | ||||
| @@ -1114,7 +1113,8 @@ bool CodeEditorComponent::deleteForwards (const bool moveInWholeWordSteps) | |||||
| bool CodeEditorComponent::selectAll() | bool CodeEditorComponent::selectAll() | ||||
| { | { | ||||
| newTransaction(); | newTransaction(); | ||||
| selectRegion (CodeDocument::Position (document, std::numeric_limits<int>::max(), std::numeric_limits<int>::max()), | |||||
| selectRegion (CodeDocument::Position (document, std::numeric_limits<int>::max(), | |||||
| std::numeric_limits<int>::max()), | |||||
| CodeDocument::Position (document, 0, 0)); | CodeDocument::Position (document, 0, 0)); | ||||
| return true; | return true; | ||||
| } | } | ||||