Add Editor::selectionFlashDuration rather than magic number

This commit is contained in:
Ben Ogle
2014-07-03 17:36:45 -07:00
parent e5f800ef35
commit 48b6c24882
3 changed files with 3 additions and 2 deletions

View File

@@ -146,6 +146,7 @@ class Editor extends Model
selections: null
suppressSelectionMerging: false
updateBatchDepth: 0
selectionFlashDuration: 500
@delegatesMethods 'suggestedIndentForBufferRow', 'autoIndentBufferRow', 'autoIndentBufferRows',
'autoDecreaseIndentForBufferRow', 'toggleLineCommentForBufferRow', 'toggleLineCommentsForBufferRows',

View File

@@ -83,7 +83,7 @@ class Selection extends Model
@cursor.needsAutoscroll = false if @needsAutoscroll?
@marker.setBufferRange(bufferRange, options)
@autoscroll() if @needsAutoscroll and @editor.manageScrollPosition
@decoration.flash('flash', 500) if needsFlash
@decoration.flash('flash', @editor.selectionFlashDuration) if needsFlash
# Public: Returns the starting and ending buffer rows the selection is
# highlighting.