From 50d2ee157dc13eba23e04518b0e84020d3f748c9 Mon Sep 17 00:00:00 2001 From: Jonathan Lovera Date: Sun, 25 Feb 2018 10:15:21 +1100 Subject: [PATCH] editor.getScopedSettingsDelegate removed Atom 1.24 Reference to #11 ... Looks like editor.getScopedSettingsDelegate was removed in Atom 1.24 --- lib/figlet.coffee | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/figlet.coffee b/lib/figlet.coffee index 1b9499a..1c82a4d 100644 --- a/lib/figlet.coffee +++ b/lib/figlet.coffee @@ -65,7 +65,15 @@ module.exports = # Then, for the remaining string, we'll check whether there's a comment # or not scope = editor.scopeDescriptorForBufferPosition([start.row, 0]) - {commentStartString, commentEndString} = editor.languageMode.commentStartAndEndStringsForScope?(scope) ? editor.getCommentStrings(scope) + + {commentStartString, commentEndString} = ( + editor.languageMode.commentStartAndEndStringsForScope?(scope) ? + editor.getCommentStrings?(scope) ? + editor.getScopedSettingsDelegate?().getCommentStrings(scope) ? + editor.tokenizedBuffer.commentStringsForPosition( + editor.getCursorBufferPosition() + ); + ) if commentStartString? commentStartRegexString = escapeRegExp(commentStartString).replace(/(\s+)$/, '')