mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add LanguageMode::toggleLineCommentForBufferRow for toggling single rows
This commit is contained in:
@@ -51,8 +51,8 @@ class Editor extends Model
|
||||
|
||||
@delegatesMethods 'foldAll', 'unfoldAll', 'foldAllAtIndentLevel', 'foldBufferRow',
|
||||
'unfoldBufferRow', 'suggestedIndentForBufferRow', 'autoIndentBufferRow', 'autoIndentBufferRows',
|
||||
'autoDecreaseIndentForBufferRow', 'toggleLineCommentsForBufferRows', 'isFoldableAtBufferRow',
|
||||
toProperty: 'languageMode'
|
||||
'autoDecreaseIndentForBufferRow', 'toggleLineCommentForBufferRow', 'toggleLineCommentsForBufferRows',
|
||||
'isFoldableAtBufferRow', toProperty: 'languageMode'
|
||||
|
||||
constructor: ({@softTabs, initialLine, tabLength, softWrap, @displayBuffer, buffer, registerEditor, suppressCursorCreation}) ->
|
||||
super
|
||||
|
||||
@@ -28,6 +28,9 @@ class LanguageMode
|
||||
constructor: (@editor) ->
|
||||
@buffer = @editor.buffer
|
||||
|
||||
toggleLineCommentForBufferRow: (row) ->
|
||||
@toggleLineCommentsForBufferRows(row, row)
|
||||
|
||||
# Wraps the lines between two rows in comments.
|
||||
#
|
||||
# If the language doesn't have comment, nothing happens.
|
||||
|
||||
Reference in New Issue
Block a user