def _layout_0(self): self._number_of_windows = 4 self._current_layout = 0 # Open the layout windows.close_all() windows.split() windows.split() windows.focus(2) windows.vsplit() # Put the buffers in the appropriate windows windows.focus(1) buffers.original.open() windows.focus(2) buffers.one.open() windows.focus(3) buffers.two.open() windows.focus(4) buffers.result.open() self.open_hud(5) windows.focus(5)
def _layout_0(self): self._number_of_windows = 1 self._current_layout = 0 # Open the layout windows.close_all() # Put the buffers in the appropriate windows windows.focus(1) self._current_buffer.open() self.open_hud(2) windows.focus(2)
def _layout_1(self): self._number_of_windows = 2 self._current_layout = 1 # Open the layout windows.close_all() windows.split() # Put the buffers in the appropriate windows windows.focus(1) self._current_buffer_first.open() windows.focus(2) self._current_buffer_second.open() self.open_hud(3) windows.focus(3)
def process_result(): windows.close_all() buffers.result.open() lines = [] in_conflict = False for line in buffers.result.lines: if in_conflict: if CONFLICT_MARKER_MARK in line: lines.append(line) if CONFLICT_MARKER_END in line: in_conflict = False continue if CONFLICT_MARKER_START in line: in_conflict = True continue lines.append(line) buffers.result.set_lines(lines)
def _layout_1(self): self._number_of_windows = 3 self._current_layout = 1 # Open the layout windows.close_all() windows.split() windows.split() # Put the buffers in the appropriate windows windows.focus(1) buffers.original.open() windows.focus(2) self._current_mid_buffer.open() windows.focus(3) buffers.result.open() self.open_hud(4) windows.focus(4)