Am 21.08.2014 um 03:50 schrieb mattn:
About making list sorted by string of one of value.
echo "3" < "3 0"
This is TRUE, then:
echo MapSort([{"foo":{"bar": "3"}}, {"foo":{"bar": "3 0"}}],
'v:val["foo"]["bar"]')
We expecet it should be kept:
[{"foo":{"bar": "3"}}, {"foo":{"bar": "3 0"}}]
But results are:
[{'foo': {'bar': '3 0'}}, {'foo': {'bar': '3'}}]
We need to escape string to avoid to handle index as value.
I don't think so.
I don't want to need to provide this function in all plugins. Just
want to get it in official sort function.
The reason is:
:echo sort(['3 0', '3 0 1'])
['3 0 1', '3 0']
I'd expect ['3 0', '3 0 1'].
:echo '3 0' < '3 0 1'
1
Bug in sort() function?
--
Andy
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.