@@ -533,13 +533,13 @@ def change_count(self, view):
533
533
def on_activated (self , view ):
534
534
logger .view_debug (view , "enter on_activated " + str (view .id ()))
535
535
if is_special_view (view ):
536
- if NavToCommand .navto_panel_started :
536
+ if TypescriptNavToCommand .navto_panel_started :
537
537
# The current view is the QuickPanel. Set insert_text_finished to false to suppress
538
538
# handling in on_modified
539
- NavToCommand .insert_text_finished = False
540
- view .run_command ("insert" , {"characters" : NavToCommand .input_text })
539
+ TypescriptNavToCommand .insert_text_finished = False
540
+ view .run_command ("insert" , {"characters" : TypescriptNavToCommand .input_text })
541
541
# Re-enable the handling in on_modified
542
- NavToCommand .insert_text_finished = True
542
+ TypescriptNavToCommand .insert_text_finished = True
543
543
544
544
if not self .about_to_close_all :
545
545
info = self .getInfo (view )
@@ -835,14 +835,14 @@ def on_modified(self, view):
835
835
# it is a special view
836
836
if is_special_view (view ):
837
837
logger .log .debug ("enter on_modified: special view. started: %s, insert_text_finished: %s" %
838
- (NavToCommand .navto_panel_started , NavToCommand .insert_text_finished ))
838
+ (TypescriptNavToCommand .navto_panel_started , TypescriptNavToCommand .insert_text_finished ))
839
839
840
- if NavToCommand .navto_panel_started and NavToCommand .insert_text_finished :
840
+ if TypescriptNavToCommand .navto_panel_started and TypescriptNavToCommand .insert_text_finished :
841
841
new_content = view .substr (sublime .Region (0 , view .size ()))
842
- sublime .active_window ().run_command ("nav_to " , {'input_text' : new_content })
842
+ sublime .active_window ().run_command ("typescript_nav_to " , {'input_text' : new_content })
843
843
844
844
logger .log .debug ("exit on_modified: special view. started: %s, insert_text_finished: %s" %
845
- (NavToCommand .navto_panel_started , NavToCommand .insert_text_finished ))
845
+ (TypescriptNavToCommand .navto_panel_started , TypescriptNavToCommand .insert_text_finished ))
846
846
# it is a normal view
847
847
else :
848
848
info = self .getInfo (view )
@@ -1621,7 +1621,8 @@ def run(self, text):
1621
1621
formatRange (text , view , rblineStart , ralineEnd )
1622
1622
1623
1623
1624
- class NavToCommand (sublime_plugin .WindowCommand ):
1624
+ class TypescriptNavToCommand (sublime_plugin .WindowCommand ):
1625
+
1625
1626
navto_panel_started = False
1626
1627
1627
1628
# indicate if the insert_text command has finished pasting text into the textbox.
@@ -1646,19 +1647,19 @@ def is_enabled(self):
1646
1647
def run (self , input_text = "" ):
1647
1648
logger .log .debug ("start running navto with text: %s" % input_text )
1648
1649
1649
- NavToCommand .reset_already = False
1650
+ TypescriptNavToCommand .reset_already = False
1650
1651
1651
1652
self .window .run_command ("hide_overlay" )
1652
1653
1653
- if NavToCommand .reset_already :
1654
- NavToCommand .reset_already = False
1654
+ if TypescriptNavToCommand .reset_already :
1655
+ TypescriptNavToCommand .reset_already = False
1655
1656
else :
1656
1657
logger .log .debug ("reset in run" )
1657
- NavToCommand .reset ()
1658
- NavToCommand .reset_already = True
1658
+ TypescriptNavToCommand .reset ()
1659
+ TypescriptNavToCommand .reset_already = True
1659
1660
1660
- NavToCommand .input_text = input_text
1661
- NavToCommand .navto_panel_started = True
1661
+ TypescriptNavToCommand .input_text = input_text
1662
+ TypescriptNavToCommand .navto_panel_started = True
1662
1663
1663
1664
# Text used for querying is not always equal to the input text. This is because the quick
1664
1665
# panel will disappear if an empty list is provided, and we want to avoid this. Therefore
@@ -1673,14 +1674,14 @@ def run(self, input_text = ""):
1673
1674
1674
1675
def on_done (self , index ):
1675
1676
logger .log .debug ("enter on_done. input_text: %s, started: %s, insert_text_finished: %s" %
1676
- (NavToCommand .input_text , NavToCommand .navto_panel_started , NavToCommand .insert_text_finished ))
1677
+ (TypescriptNavToCommand .input_text , TypescriptNavToCommand .navto_panel_started , TypescriptNavToCommand .insert_text_finished ))
1677
1678
1678
- if NavToCommand .reset_already :
1679
- NavToCommand .reset_already = False
1679
+ if TypescriptNavToCommand .reset_already :
1680
+ TypescriptNavToCommand .reset_already = False
1680
1681
else :
1681
1682
logger .log .debug ("reset in on_done" )
1682
- NavToCommand .reset ()
1683
- NavToCommand .reset_already = True
1683
+ TypescriptNavToCommand .reset ()
1684
+ TypescriptNavToCommand .reset_already = True
1684
1685
1685
1686
if index >= 0 :
1686
1687
item = self .items [index ]
@@ -1689,7 +1690,7 @@ def on_done(self, index):
1689
1690
self .window .open_file (file_at_location , sublime .ENCODED_POSITION )
1690
1691
1691
1692
logger .log .debug ("exit on_done. input_text: %s, started: %s, insert_text_finished: %s" %
1692
- (NavToCommand .input_text , NavToCommand .navto_panel_started , NavToCommand .insert_text_finished ))
1693
+ (TypescriptNavToCommand .input_text , TypescriptNavToCommand .navto_panel_started , TypescriptNavToCommand .insert_text_finished ))
1693
1694
1694
1695
def format_navto_result (self , item_list ):
1695
1696
0 commit comments