Add editor:toggle-soft-tabs event

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-10-26 11:52:53 -06:00
parent 487245311e
commit 3a067bcd71

View File

@@ -140,6 +140,7 @@ class Editor extends View
'core:close': @close
'editor:save': @save
'editor:newline-below': @insertNewlineBelow
'editor:toggle-soft-tabs': @toggleSoftTabs
'editor:toggle-soft-wrap': @toggleSoftWrap
'editor:fold-all': @foldAll
'editor:unfold-all': @unfoldAll
@@ -532,6 +533,9 @@ class Editor extends View
@activeEditSession.setScrollTop(@scrollTop())
@activeEditSession.setScrollLeft(@scrollView.scrollLeft())
toggleSoftTabs: ->
@activeEditSession.setSoftTabs(not @activeEditSession.softTabs)
toggleSoftWrap: ->
@setSoftWrap(not @activeEditSession.getSoftWrap())