1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 05:20:04 +08:00

Make [SPC] as space in sort

This commit is contained in:
Shidong Wang 2019-02-18 22:30:24 +08:00
parent 5939e592a5
commit 3e64fdb1b7

View File

@ -264,8 +264,8 @@ endfunction " }}}
" icon -> number -> A-Za-z
" 65-90 97-122
function! s:compare_key(i1, i2) abort
let a = char2nr(a:i1)
let b = char2nr(a:i2)
let a = char2nr(a:i1 ==# '[SPC]' ? ' ' : a:i1)
let b = char2nr(a:i2 ==# '[SPC]' ? ' ' : a:i2)
if a - b == 32 && a >= 97 && a <= 122
return -1
elseif b - a == 32 && b >= 97 && b <= 122