Skip to content

Commit fe1feb8

Browse files
committed
Fix Data.Dict.max_by after Vim v9.1.1684
cause: vim/vim@3b3b936 Convert values pass to max() from String to Number.
1 parent 8078a42 commit fe1feb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/vital/__vital__/Data/Dict.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ endfunction
9898

9999
function! s:_max_by(dict, expr) abort
100100
let dict = s:swap(map(copy(a:dict), a:expr))
101-
let key = dict[max(keys(dict))]
101+
let key = dict[max(map(keys(dict), 'v:val + 0'))]
102102
return [key, a:dict[key]]
103103
endfunction
104104

0 commit comments

Comments
 (0)