aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-09-29 01:31:17 +0200
committerTeddy Wing2020-09-29 01:34:07 +0200
commitf8bbf6e991d6a5d9768715c0cc915875bc9d9bc9 (patch)
treebf7bce33805b8e3f07381d517b32470c7eb1b730
parent145c155e419fdcc73129771d8fbb3c32a77295a8 (diff)
downloadvim-grappele-f8bbf6e991d6a5d9768715c0cc915875bc9d9bc9.tar.bz2
grappele#Recall(): Remove special handling for visual mode
Now that this is an `<expr>` mapping, we don't need any special handling for visual mode as this will be taken care of automatically. Remove the `mode` argument as it's no longer used.
-rw-r--r--autoload/grappele.vim10
-rw-r--r--plugin/grappele.vim4
2 files changed, 4 insertions, 10 deletions
diff --git a/autoload/grappele.vim b/autoload/grappele.vim
index 34971dc..e111409 100644
--- a/autoload/grappele.vim
+++ b/autoload/grappele.vim
@@ -6,15 +6,9 @@ function! grappele#Grappele(line)
return 'G'
endfunction
-function! grappele#Recall(mode)
+function! grappele#Recall()
if exists('s:line')
- let l:line = s:line
-
- if a:mode ==# 'v'
- let l:line = visualmode() . l:line
- endif
-
- return l:line . 'G'
+ return s:line . 'G'
endif
endfunction
diff --git a/plugin/grappele.vim b/plugin/grappele.vim
index 5b6a046..fe531af 100644
--- a/plugin/grappele.vim
+++ b/plugin/grappele.vim
@@ -4,8 +4,8 @@ endif
let g:loaded_grappele = 1
-nnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall('n')
-vnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall('v')
+nnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall()
+vnoremap <silent> <expr> <Plug>GrappeleRecall grappele#Recall()
onoremap <silent> <expr> <Plug>GrappeleRecall grappele#ORecall()
if !maparg('G', 'n')