mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
patch 7.4.1143
Problem: Can't sort on floating point numbers.
Solution: Add the "f" flag to ":sort". (Alex Jakushev) Also add the "f"
flag to sort().
This commit is contained in:
@@ -17,3 +17,7 @@ func Test_sort_numbers()
|
||||
call assert_equal([3, 13, 28], sort([13, 28, 3], 'N'))
|
||||
call assert_equal(['3', '13', '28'], sort(['13', '28', '3'], 'N'))
|
||||
endfunc
|
||||
|
||||
func Test_sort_float()
|
||||
call assert_equal([0.28, 3, 13.5], sort([13.5, 0.28, 3], 'f'))
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user