Don't apply all editor bindings to mini editors

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-06-15 17:49:21 -07:00
parent c02e5bbdbf
commit db833a4782

View File

@@ -83,7 +83,6 @@ class Editor extends View
bindKeys: ->
editorBindings =
'save': @save
'move-right': @moveCursorRight
'move-left': @moveCursorLeft
'move-down': @moveCursorDown
@@ -96,7 +95,6 @@ class Editor extends View
'select-down': @selectDown
'select-word': @selectWord
'newline': @insertNewline
'newline-below': @insertNewlineBelow
'tab': @insertTab
'indent-selected-rows': @indentSelectedRows
'outdent-selected-rows': @outdentSelectedRows
@@ -110,19 +108,6 @@ class Editor extends View
'paste': @paste
'undo': @undo
'redo': @redo
'toggle-soft-wrap': @toggleSoftWrap
'fold-all': @foldAll
'toggle-fold': @toggleFold
'fold-selection': @foldSelection
'unfold': => @unfoldCurrentRow()
'split-left': @splitLeft
'split-right': @splitRight
'split-up': @splitUp
'split-down': @splitDown
'close': @close
'show-next-buffer': @loadNextEditSession
'show-previous-buffer': @loadPreviousEditSession
'move-to-top': @moveCursorToTop
'move-to-bottom': @moveCursorToBottom
'move-to-beginning-of-line': @moveCursorToBeginningOfLine
@@ -137,7 +122,25 @@ class Editor extends View
'select-to-end-of-word': @selectToEndOfWord
'select-to-beginning-of-word': @selectToBeginningOfWord
'select-all': @selectAll
'toggle-line-comments': @toggleLineCommentsInSelection
if not @mini
_.extend editorBindings,
'save': @save
'newline-below': @insertNewlineBelow
'toggle-soft-wrap': @toggleSoftWrap
'fold-all': @foldAll
'toggle-fold': @toggleFold
'fold-selection': @foldSelection
'unfold': => @unfoldCurrentRow()
'split-left': @splitLeft
'split-right': @splitRight
'split-up': @splitUp
'split-down': @splitDown
'close': @close
'show-next-buffer': @loadNextEditSession
'show-previous-buffer': @loadPreviousEditSession
'toggle-line-comments': @toggleLineCommentsInSelection
for name, method of editorBindings
do (name, method) =>