Always use global rootView object

This removes the last few places where rootView was
looked up via jQuery selector and instead just uses
the rootView property available on the window.
This commit is contained in:
Kevin Sawicki
2013-02-15 09:15:45 -08:00
parent 092e5214d0
commit 2910f7798a
5 changed files with 8 additions and 15 deletions

View File

@@ -73,7 +73,7 @@ class AutocompleteView extends SelectList
@editor.abort()
@editor.setSelectedBufferRange(@originalSelectionBufferRange)
@editor.rootView()?.focus() if @miniEditor.isFocused
rootView.focus() if @miniEditor.isFocused
attach: ->
@editor.transact()

View File

@@ -11,7 +11,7 @@ find: (editor) ->
word = editor.getTextInRange(editor.getCursor().getCurrentWordBufferRange())
return [] unless word.length > 0
tagsFile = @getTagsFile(editor.rootView().project)
tagsFile = @getTagsFile(rootView.project)
return [] unless tagsFile
$tags.find(tagsFile, word) or []