Omit a count of 1 for mappings
This fixes motions like % whose meanings change when a count is supplied
This commit is contained in:
parent
d069729b1a
commit
b1cae9237e
@ -326,10 +326,10 @@ endfunction
|
|||||||
|
|
||||||
highlight default link ExchangeRegion IncSearch
|
highlight default link ExchangeRegion IncSearch
|
||||||
|
|
||||||
nnoremap <silent> <expr> <Plug>(Exchange) ':<C-u>set operatorfunc=<SID>exchange_set<CR>'.v:count1.'g@'
|
nnoremap <silent> <expr> <Plug>(Exchange) ':<C-u>set operatorfunc=<SID>exchange_set<CR>'.(v:count1 == 1 ? '' : v:count1).'g@'
|
||||||
vnoremap <silent> <Plug>(Exchange) :<C-u>call <SID>exchange_set(visualmode(), 1)<CR>
|
vnoremap <silent> <Plug>(Exchange) :<C-u>call <SID>exchange_set(visualmode(), 1)<CR>
|
||||||
nnoremap <silent> <Plug>(ExchangeClear) :<C-u>call <SID>exchange_clear()<CR>
|
nnoremap <silent> <Plug>(ExchangeClear) :<C-u>call <SID>exchange_clear()<CR>
|
||||||
nnoremap <silent> <expr> <Plug>(ExchangeLine) ':<C-u>set operatorfunc=<SID>exchange_set<CR>'.v:count1.'g@_'
|
nnoremap <silent> <expr> <Plug>(ExchangeLine) ':<C-u>set operatorfunc=<SID>exchange_set<CR>'.(v:count1 == 1 ? '' : v:count1).'g@_'
|
||||||
|
|
||||||
command! XchangeHighlightToggle call s:highlight_toggle()
|
command! XchangeHighlightToggle call s:highlight_toggle()
|
||||||
command! XchangeHighlightEnable call s:highlight_toggle(1)
|
command! XchangeHighlightEnable call s:highlight_toggle(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user