Skip to content

Commit 9fb216a

Browse files
Fix <count><motion> not working after v2.5.13
Fixes unblevable#84 After v2.5.13 <count><motion> stopped working because the new behavior of executing normal mode motions instead of returning them failed to take into account any <count> applied to the command. This fixes the issue by also appending the value of v:count to the normal mode command being executed.
1 parent 4371a23 commit 9fb216a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/quick-scope.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*quick-scope.txt* Highlight unique character targets for f/F and t/T motions.
22
*quick-scope*
33

4-
Version: 2.5.13
4+
Version: 2.5.14
55
Homepage: https://github.com/unblevable/quick-scope
66
Authors: Brian Le (unblevable)
77
Bradford Smith (https://github.com/bradford-smith94)
@@ -273,6 +273,9 @@ http://github.com/unblevable/quick-scope/issues
273273

274274
Version Date Release Notes~
275275
|---------|-----------|-----------------------------------------------------------|
276+
2.5.14 2022-01-27 * Fixed
277+
- Fixed highlight on keys mode <count><motion> not
278+
working after v2.5.13
276279
2.5.13 2021-12-28 * Fixed
277280
- Fixed normal mode errors of E523 when using highlight
278281
on keys and Ctrl-c mapping restoration when using pipe

plugin/quick_scope.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ else
8282
execute printf(mapmode . ' <expr> <Plug>(QuickScope%s) quick_scope#Ready() . quick_scope#Aim("%s") . quick_scope#Reload() . quick_scope#DoubleTap()', motion, motion)
8383
endfor
8484
" Using <expr> for normal mode mappings can cause problems (#80)
85-
execute printf('nnoremap <silent> <Plug>(QuickScope%s) :<C-U>call quick_scope#Ready() \| execute "normal!" quick_scope#Aim("%s") \| call quick_scope#Reload() \| call quick_scope#DoubleTap()<CR>', motion, motion)
85+
execute printf('nnoremap <silent> <Plug>(QuickScope%s) :<C-U>call quick_scope#Ready() \| execute "normal!" v:count . quick_scope#Aim("%s") \| call quick_scope#Reload() \| call quick_scope#DoubleTap()<CR>', motion, motion)
8686
endfor
8787
for motion in filter(g:qs_highlight_on_keys, "v:val =~# '^[fFtT]$'")
8888
for mapmode in ['nmap', 'omap', 'xmap']

0 commit comments

Comments
 (0)