# HG changeset patch # User Steve Losh # Date 1308014916 14400 # Node ID d4684baf9cfecc9f43f67bb9164b31e6d6b96c77 # Parent 3386390489305c98d2a8adc755a9e75733d666de Add use hunk functionality for Compare and Path modes. diff -r 338639048930 -r d4684baf9cfe plugin/threesomelib/modes.py --- a/plugin/threesomelib/modes.py Mon Jun 13 21:18:06 2011 -0400 +++ b/plugin/threesomelib/modes.py Mon Jun 13 21:28:36 2011 -0400 @@ -604,11 +604,17 @@ if buffers.one not in active and buffers.two not in active: return + current_diff = self._current_diff_mode + with windows.remain(): + self._diff_1() # diff the windows + if buffers.current == buffers.result: vim.command('diffget') elif buffers.current in (buffers.one, buffers.two): vim.command('diffput') + self.diff(current_diff) + def goto_result(self): self.key_result() @@ -765,7 +771,16 @@ def key_use(self): - pass + current_diff = self._current_diff_mode + with windows.remain(): + self._diff_3() # diff the middle and result windows + + if buffers.current == buffers.result: + vim.command('diffget') + elif buffers.current in (buffers.one, buffers.two): + vim.command('diffput') + + self.diff(current_diff) def goto_result(self):