aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-28 14:40:17 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-28 14:40:17 +1200
commite24d47cba9efa6289867e04a12241767b880cd12 (patch)
tree6fbf64d02a6c73a7fa403c3e7f0b93bdb03d4099
parentBump VERSION (diff)
parentBump VERSION (diff)
downloadvim-fixed-join-e24d47cba9efa6289867e04a12241767b880cd12.tar.gz
vim-fixed-join-e24d47cba9efa6289867e04a12241767b880cd12.zip
Merge branch 'release/v0.5.0'HEADv0.5.0master
* release/v0.5.0: Bump VERSION Revert "Remove useless cursor restoration code"
-rw-r--r--VERSION2
-rw-r--r--plugin/fixed_join.vim9
2 files changed, 10 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 267577d..8f0916f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.4.1
+0.5.0
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