diff --git a/src/text-editor.js b/src/text-editor.js index b1e0980f8..efa7353e0 100644 --- a/src/text-editor.js +++ b/src/text-editor.js @@ -4093,7 +4093,7 @@ class TextEditor { // Extended: Unfold all existing folds. unfoldAll () { const result = this.displayLayer.destroyAllFolds() - this.scrollToCursorPosition() + if (result.length > 0) this.scrollToCursorPosition() return result }