From d36c102ca09fac19e43e64050ec722200829f8d5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 25 Apr 2018 12:57:59 -0700 Subject: [PATCH] Don't scroll in unfoldAll if there were no folds --- src/text-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }