Skip to content

Commit 159df7c

Browse files
author
Ben Dean-Kawamura
committed
Fix for descriptions before noremap mappings
Before it would set the key incorrectly for comments_by_id if you had a noremap mapping. For example nnoremap <Leader>a would have the key "nnore_a"
1 parent efea0e2 commit 159df7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/follow-my-lead.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function! FMLAddDescription(src, mappings)
6565
let lines_with_index = map(deepcopy(src_lines), '[v:key, v:val]')
6666
let comments_by_id = {}
6767
for [idx, line] in lines_with_index
68-
let lhs = matchlist(line, '\c\m^\(\a*\)map.*<leader>\(\S\+\)')
68+
let lhs = matchlist(line, '\c\m^\(\a\?\)\a*map.*<leader>\(\S\+\)')
6969
if(!empty(lhs))
7070
let prev_line = src_lines[idx - 1]
7171
let comment = matchlist(prev_line, '^"\s*\(.*\)')

0 commit comments

Comments
 (0)