Fix toggleLineCommentsInSelection for empty lines

This commit is contained in:
bene
2016-10-29 14:04:30 +02:00
parent a8935bc48a
commit 0411509b43
2 changed files with 8 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ class LanguageMode
toggleLineCommentsForBufferRows: (start, end) ->
scope = @editor.scopeDescriptorForBufferPosition([start, 0])
commentStrings = @editor.getCommentStrings(scope)
return unless commentStrings?
return unless commentStrings?.commentStartString
{commentStartString, commentEndString} = commentStrings
buffer = @editor.buffer