From f8bbf6e991d6a5d9768715c0cc915875bc9d9bc9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 29 Sep 2020 01:31:17 +0200 Subject: grappele#Recall(): Remove special handling for visual mode Now that this is an `` 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. --- autoload/grappele.vim | 10 ++-------- plugin/grappele.vim | 4 ++-- 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 GrappeleRecall grappele#Recall('n') -vnoremap GrappeleRecall grappele#Recall('v') +nnoremap GrappeleRecall grappele#Recall() +vnoremap GrappeleRecall grappele#Recall() onoremap GrappeleRecall grappele#ORecall() if !maparg('G', 'n') -- cgit v1.2.3