From 17ac3088d3c401e800d7f56a12cdd2bed78d5bb8 Mon Sep 17 00:00:00 2001 From: cathook Date: Thu, 20 Nov 2014 08:24:44 +0800 Subject: fix "o" command in vim --- vim/plugin/shrvim.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/plugin/shrvim.vim b/vim/plugin/shrvim.vim index 0d2b4fe..070a35f 100644 --- a/vim/plugin/shrvim.vim +++ b/vim/plugin/shrvim.vim @@ -25,7 +25,6 @@ let g:shrvim_auto_sync_level = 3 autocmd! InsertLeave * call _ShrVimAutoSync(1) autocmd! CursorMoved * call _ShrVimAutoSync(1) autocmd! CursorHold * call _ShrVimAutoSync(1) -autocmd! InsertEnter * call _ShrVimAutoSync(2) autocmd! CursorMovedI * call _ShrVimAutoSync(3) autocmd! CursorHoldI * call _ShrVimAutoSync(3) @@ -461,6 +460,8 @@ class VimLinesInfo(object): for last in range(orig_rows - 1, first - 1, -1): if orig_lines[last] != self._lines[last + delta]: break + else: + last -= 1 return [(first, last + 1, self._lines[first : last + delta + 1])] def apply_patch(self, patch_info): -- cgit v1.2.3