@@ -680,6 +680,7 @@ def __init__(self, instance):
680
680
"current_il_index" ,
681
681
"current_il_function" ,
682
682
"current_il_instruction" ,
683
+ "current_il_instructions" ,
683
684
"current_il_basic_block"
684
685
}
685
686
self .locals = BlacklistedDict (
@@ -709,6 +710,7 @@ def __init__(self, instance):
709
710
self .active_file_offset = None
710
711
self .active_dbg = None
711
712
self .active_il_index = 0
713
+ self .selection_start_il_index = 0
712
714
self .active_il_function = None
713
715
714
716
self .locals .blacklist_enabled = False
@@ -899,6 +901,9 @@ def update_locals(self):
899
901
elif action_handler is not None :
900
902
action_context = action_handler .actionContext ()
901
903
904
+ if view is not None :
905
+ self .selection_start_il_index = view .getSelectionStartILInstructionIndex ()
906
+
902
907
token_state = None
903
908
token = None
904
909
var = None
@@ -935,15 +940,26 @@ def update_locals(self):
935
940
except :
936
941
self .locals ["current_il_instruction" ] = None
937
942
943
+ invalid_il_index = 0xffffffffffffffff
944
+ if invalid_il_index not in (self .active_il_index , self .selection_start_il_index ):
945
+ il_start = min (self .active_il_index , self .selection_start_il_index )
946
+ il_end = max (self .active_il_index , self .selection_start_il_index )
947
+ self .locals ["current_il_instructions" ] = (self .active_il_function [i ] for i in \
948
+ range (il_start , il_end + 1 ))
949
+ else :
950
+ self .locals ["current_il_instructions" ] = None
951
+
938
952
if self .locals ["current_il_instruction" ]:
939
953
self .locals ["current_il_basic_block" ] = self .locals ["current_il_instruction" ].il_basic_block
940
954
else :
941
955
self .locals ["current_il_instruction" ] = None
956
+ self .locals ["current_il_instructions" ] = None
942
957
self .locals ["current_il_basic_block" ] = None
943
958
else :
944
959
self .locals ["current_il_index" ] = None
945
960
self .locals ["current_il_function" ] = None
946
961
self .locals ["current_il_instruction" ] = None
962
+ self .locals ["current_il_instructions" ] = None
947
963
self .locals ["current_il_basic_block" ] = None
948
964
self .active_il_function = None
949
965
@@ -971,6 +987,7 @@ def update_locals(self):
971
987
self .locals ["current_il_index" ] = None
972
988
self .locals ["current_il_function" ] = None
973
989
self .locals ["current_il_instruction" ] = None
990
+ self .locals ["current_il_instructions" ] = None
974
991
self .locals ["current_il_basic_block" ] = None
975
992
976
993
self .locals .blacklist_enabled = True
0 commit comments