On Fr, 12 Jun 2015, Christian Brabandt wrote:

> Bram,
> :h expr-string states
> 
> ,----
> | \u....      character specified with up to 4 hex numbers, stored according
> |         to the current value of 'encoding' (e.g., "\u02a4")
> | \U....      same as \u.... 
> `----
> 
> However when using i_Ctrl-V_digit, one can use 'U' for up to 8 
> characters and using \%U also takes up to 8 digits.
> 
> So I think, it makes sense to have \U in a quoted string also accept up 
> to 8 characters. 

Updated patch, including documentation attached.

Best,
Christian
-- 
Als wir noch dünner waren, standen wir uns näher.
                -- Georg Kreisler

-- 
-- 
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.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1021,7 +1021,7 @@ A string constant accepts these special 
 \X.	same as \x.
 \u....	character specified with up to 4 hex numbers, stored according to the
 	current value of 'encoding' (e.g., "\u02a4")
-\U....	same as \u....
+\U....	same as \u but allows up to 8 hex numbers.
 \b	backspace <BS>
 \e	escape <Esc>
 \f	formfeed <FF>
diff --git a/src/eval.c b/src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
@@ -5745,8 +5745,10 @@ get_string_tv(arg, rettv, evaluate)
 
 			      if (c == 'X')
 				  n = 2;
+			      else if (*p == 'u')
+				  n = 4;
 			      else
-				  n = 4;
+				  n = 8;
 			      nr = 0;
 			      while (--n >= 0 && vim_isxdigit(p[1]))
 			      {

Raspunde prin e-mail lui