Skip to content

Commit

Permalink
Don't interfere with custom c and = maps
Browse files Browse the repository at this point in the history
Closes #180
  • Loading branch information
tpope committed Mar 21, 2019
1 parent e116ccf commit e779230
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/unimpaired.vim
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ function! s:legacy_option_map(letter) abort
return y . 'o' . a:letter . ':echo "Use ' . y . 'o' . a:letter . ' instead"' . "\<CR>"
endfunction

if empty(maparg('co', 'n'))
if empty(maparg('co', 'n')) && empty(maparg('c', 'n'))
nmap <silent><expr> co <SID>legacy_option_map(nr2char(getchar()))
nnoremap cop <Nop>
endif
if empty(maparg('=o', 'n'))
if empty(maparg('=o', 'n')) && empty(maparg('=', 'n'))
nmap <silent><expr> =o <SID>legacy_option_map(nr2char(getchar()))
nnoremap =op <Nop>
endif
Expand Down

0 comments on commit e779230

Please sign in to comment.