Don't scroll in unfoldAll if there were no folds

This commit is contained in:
Max Brunsfeld
2018-04-25 12:57:59 -07:00
parent 79eab0527a
commit d36c102ca0

View File

@@ -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
}