diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-28 14:40:17 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-28 14:40:17 +1200 |
commit | e24d47cba9efa6289867e04a12241767b880cd12 (patch) | |
tree | 6fbf64d02a6c73a7fa403c3e7f0b93bdb03d4099 /plugin/fixed_join.vim | |
parent | Bump VERSION (diff) | |
parent | Bump VERSION (diff) | |
download | vim-fixed-join-e24d47cba9efa6289867e04a12241767b880cd12.tar.gz vim-fixed-join-e24d47cba9efa6289867e04a12241767b880cd12.zip |
* release/v0.5.0:
Bump VERSION
Revert "Remove useless cursor restoration code"
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 |