0
0
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:
Bram Moolenaar
2016-01-19 23:36:15 +01:00
parent b8060fe862
commit f7edf40448
7 changed files with 187 additions and 44 deletions

View File

@@ -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