Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions python/ycm/client/command_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__( self,
self._location = location


def Start( self ):
def Start( self, handler = 'run_completer_command' ):
if self._location is not None:
self._request_data = BuildRequestDataForLocation( *self._location )
elif self._bufnr is not None:
Expand All @@ -62,7 +62,7 @@ def Start( self ):
} )
self._response_future = self.PostDataToHandlerAsync(
self._request_data,
'run_completer_command' )
handler )


def Done( self ):
Expand Down Expand Up @@ -198,6 +198,18 @@ def _HandleFixitResponse( self ):
vimsupport.ReplaceChunks(
chosen_fixit[ 'chunks' ],
silent = self._command == 'Format' )
while chosen_fixit[ 'keep_going' ]:
self.Start( handler = 'next_fixit' )
response = self.HandleFuture( self._response_future,
display_message = not self._silent )
if response is None:
return
fixits = response[ 'fixits' ]
assert len( fixits ) == 1
chosen_fixit = fixits[ 0 ]
vimsupport.ReplaceChunks(
chosen_fixit[ 'chunks' ],
silent = self._command == 'Format' )
except RuntimeError as e:
vimsupport.PostVimMessage( str( e ) )

Expand Down
Loading