aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/fixed_join.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugin/fixed_join.vim b/plugin/fixed_join.vim
index b620cc7..7d97682 100644
--- a/plugin/fixed_join.vim
+++ b/plugin/fixed_join.vim
@@ -24,8 +24,14 @@ function! s:FixedJoin()
let l:command = '.,+' . v:count1 . 'join'
execute l:command
- " Restore cursor position
- call cursor(l:lc, l:cc)
+ " 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