Пример #1
0
def ReplaceChunksList_UnsortedChunks_test():
    chunks = [_BuildChunk(1, 11, 1, 11, ')'), _BuildChunk(1, 4, 1, 4, '(')]

    result_buffer = ["CT<10 >> 2> ct"]
    vimsupport.ReplaceChunksList(chunks, result_buffer)

    expected_buffer = ["CT<(10 >> 2)> ct"]
    eq_(expected_buffer, result_buffer)
Пример #2
0
    def _HandleFixitResponse(self):
        if not len(self._response['fixits']):
            vimsupport.EchoText("No fixits found for current line")
        else:
            chunks = self._response['fixits'][0]['chunks']

            vimsupport.ReplaceChunksList(chunks)

            vimsupport.EchoTextVimWidth("FixIt applied " + str(len(chunks)) +
                                        " changes")