|
@@ -36,16 +36,19 @@ def _EnsureBackwardsCompatibility( arguments ):
|
|
|
|
|
|
|
|
|
class CommandRequest( BaseRequest ):
|
|
|
- def __init__( self, arguments, completer_target = None ):
|
|
|
+ def __init__( self, arguments, completer_target = None, extra_data = None ):
|
|
|
super( CommandRequest, self ).__init__()
|
|
|
self._arguments = _EnsureBackwardsCompatibility( arguments )
|
|
|
self._completer_target = ( completer_target if completer_target
|
|
|
else 'filetype_default' )
|
|
|
+ self._extra_data = extra_data
|
|
|
self._response = None
|
|
|
|
|
|
|
|
|
def Start( self ):
|
|
|
request_data = BuildRequestData()
|
|
|
+ if self._extra_data:
|
|
|
+ request_data.update( self._extra_data )
|
|
|
request_data.update( {
|
|
|
'completer_target': self._completer_target,
|
|
|
'command_arguments': self._arguments
|
|
@@ -129,8 +132,8 @@ class CommandRequest( BaseRequest ):
|
|
|
vimsupport.WriteToPreviewWindow( self._response[ 'detailed_info' ] )
|
|
|
|
|
|
|
|
|
-def SendCommandRequest( arguments, completer ):
|
|
|
- request = CommandRequest( arguments, completer )
|
|
|
+def SendCommandRequest( arguments, completer, extra_data = None ):
|
|
|
+ request = CommandRequest( arguments, completer, extra_data )
|
|
|
# This is a blocking call.
|
|
|
request.Start()
|
|
|
request.RunPostCommandActionsIfNeeded()
|