> 2017年5月11日木曜日 21時52分48秒 UTC+9 Bram Moolenaar: > > Ken Hamada wrote: > > > > > Hi list, I noticed that E16 occurs with regexp. > > > > > > set re=1 > > > echo '' =~# '[\uff-\uf0]' > > > E16: Invalid range > > > echo '' =~# '[\u3000-\u4000]' > > > E16: Invalid range > > > > > > I think this is unintuitive error message because E16 reminds us the > > > range of > > > commands (for example :0buffer). So I suggest two exclusive options: > > > > > > - Add a note that the error can occur with regexp at :h E16. > > > - Change the error message and number. > > > > From the old days a bit of memory was saved by limiting the number of > > error messages. Now that we are more interested in useful errors, > > splitting off specific cases is useful. > > > > > BTW the behaviour *Limit to a range of 256 chars* differs due to the > > > regex engine version. > > > I could not tell the difference until I dived into the source code. I > > > would like some warning to be written regarding this topic around :h > > > /[. > > > > I thought this was mentioned somewhere, but can't find it right now. > > Please suggest an improvement. > > Thank you Bram and Ken Tanaka. > > I think creating a new error number will be better. > Here's the patch. What do you think?
Now that we are at it, we can make it more specific: One error for the reverse range and one for a too large range. It's also nice to have a test for these. -- Communication is one of the most compli..., eh, well, it's hard. You know what I mean. Not? /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
