diff options
Diffstat (limited to 'plugin/fixed_join.vim')
-rw-r--r-- | plugin/fixed_join.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/fixed_join.vim b/plugin/fixed_join.vim index 1610011..2abb3a0 100644 --- a/plugin/fixed_join.vim +++ b/plugin/fixed_join.vim @@ -31,6 +31,15 @@ function! s:FixedJoin() let l:command = l:cursor_line . ',' . l:join_line . 'join' execute l:command + " Return the cursor to the saved position (Vim 6.0 fallback) + if exists('*cursor') + call cursor(l:cursor_line, l:cursor_col) + else + execute 'normal! ' + \ . l:cursor_line . 'G' + \ . l:cursor_col . '|' + endif + endfunction " Create modeless mapping target for the function just defined |