2015-09-06 23:36 GMT+03:00 LCD 47 <lcd...@gmail.com>:
> On 6 September 2015, Bram Moolenaar <b...@moolenaar.net> wrote:
>>
>> Lcd wrote:
>>
>> > On 5 September 2015, Tony Mechelynck <antoine.mechely...@gmail.com> wrote:
>> > > Let's say I want to define ,, (two commas) as a digraph for … (U+2026 
>> > > HORIZONTAL ELLIPSIS). At the moment, in [g]vim 7.4.854 (with +multi_byte 
>> > > and 'encoding' set to utf-8),
>> > >         :dig ,, 8230
>> > > does it, but
>> > >         :dig ,, 0x2026
>> > > doesn't (AFAICT, it fails silently). The only way to use the hex value 
>> > > explicitly is at the moment
>> > >         :exec 'dig ,,' 0x2026
>> > > which is ugly.
>> > > Now the Unicode Consortium lists all codepoints by hex value, so the 
>> > > decimal equivalent is losing currency. Even in HTML, where once upon a 
>> > > time &hellip; or &#8230; would have been the only valid entities for 
>> > > that character, &#x2026; is now a third valid alternative. So why not in 
>> > > Vim digraphs?
>> > >
>> > > N.B. Of course, if (let's say) patch 875 fixes it, "cautious" scripts 
>> > > will at first either still use the backward-compatible decimal number 
>> > > (or the :execute workaround), or test
>> > >         :if version > 704 || (version == 704 && has('patch875'))
>> > > but it will be usable manually as soon as compiled-in.
>> >
>> >     Please try the patch below.  It (hopefully) makes the :digraphs
>> > command accept hex and octal values.
>>
>> Thanks!  Would it be too much to ask for a test?  I don't think we
>> have any tests for digraphs, would be useful to have a few basic ones.
>
>     Digraphs depend on the terminal encoding, and that might be a
> problem when running tests.  But even that aside, I'm afraid I have no
> idea how to test digraphs from a script, sorry.

There will be no problems if you ignore the locale and specify
&encoding explicitly. Tests in testdir are not *scripts*, they are
*input* (like -s command-line option, but actually invoked in rather
strange and indirect fashion), so you may simply use ^K there directly
like if you were typing. Otherwise use execute + normal.

>
>     /lcd
>
> --
> --
> 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.

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

Raspunde prin e-mail lui