Skip to content

Commit ebaca59

Browse files
committedMar 31, 2020
Preliminary support for this keywording above below
1 parent 494fed8 commit ebaca59

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎queries/argument.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,12 @@ def case_two(self,view_information,query_description, extra = {}):
200200
# <vertical_direction> <ndir> <adjective> argument <argument_index>
201201
###############################################################
202202
selection = self._get_selection(view_information,extra)
203-
vertical_direction = query_description["vertical_direction"]
204-
ndir = query_description["ndir"]
203+
if "vertical_direction" in query_description:
204+
vertical_direction = query_description["vertical_direction"]
205+
ndir = query_description["ndir"]
206+
else:
207+
vertical_direction = "upwards"
208+
ndir = 0
205209

206210

207211
build = self.general_build if self.general_build else line_partial(selection[0])
@@ -228,7 +232,7 @@ def case_two(self,view_information,query_description, extra = {}):
228232
sharing_physical = alternative_logical_lines not in [[] ,[statement_node]]
229233

230234
priority = {"root_lexical_order":1} if ( statement_node.first_token.start[0] != origin.first_token.start[0]
231-
or sharing_physical) else {}
235+
or sharing_physical or ndir) else {}
232236
result, alternatives = self.process_line(
233237
q = query_description,
234238
root = statement_node if not sharing_physical else statement_node.parent,

0 commit comments

Comments
 (0)
Please sign in to comment.