@@ -70,9 +70,10 @@ def run(self):
70
70
if self .process :
71
71
self .process .terminate ()
72
72
73
- if 'show_query' in self .options and self .options ['show_query' ]:
74
- formattedQueryInfo = self ._formatShowQuery (self .query , queryTimerStart , queryTimerEnd )
75
- self .callback (formattedQueryInfo )
73
+ if 'show_query' in self .options :
74
+ if 'enabled' in self .options ['show_query' ] and self .options ['show_query' ]['enabled' ]:
75
+ formattedQueryInfo = self ._formatShowQuery (self .query , queryTimerStart , queryTimerEnd )
76
+ self .callback (formattedQueryInfo + '\n ' )
76
77
77
78
return
78
79
@@ -93,13 +94,13 @@ def run(self):
93
94
'replace' ).replace ('\r ' , '' )
94
95
95
96
if 'show_query' in self .options :
96
- queryPlacement = self .options ['show_query' ].get ('placement' , 'disabled' )
97
- if isinstance (queryPlacement , str ) and queryPlacement != 'disabled' :
97
+ if 'enabled' in self .options ['show_query' ] and self .options ['show_query' ]['enabled' ]:
98
98
formattedQueryInfo = self ._formatShowQuery (self .query , queryTimerStart , queryTimerEnd )
99
+ queryPlacement = self .options ['show_query' ].get ('placement' , 'top' )
99
100
if queryPlacement == 'top' :
100
101
resultString = "{0}\n {1}" .format (formattedQueryInfo , resultString )
101
102
elif queryPlacement == 'bottom' :
102
- resultString = "{0}\n {1}" .format (resultString , formattedQueryInfo )
103
+ resultString = "{0}{1}\n " .format (resultString , formattedQueryInfo )
103
104
104
105
self .callback (resultString )
105
106
0 commit comments