Hi,

I tried `:let &t_PS="\e[200~"` to set 't_PS' without using the raw escape code,
but it failed with E355.  I didn't know that there are two types of 't_*'
options: output code options and key code options. I found the following
comment in option.c:
    /* terminal key codes are not in here */
Therefore this seems to be an intended behavior. However I couldn't find the
reason in the document. So, is there any reasons that `:let &` cannot be used
for key code options?

I think that it should be documented that `:let &` cannot be used for key code
options. Please check the attached patch.

P.S. I can use `:exec "set t_PS=\e[200~"` instead of `:let &`.

Regards,
Ken Takata

-- 
-- 
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.
# HG changeset patch
# Parent  ab286322c7a76d78a06a927d487a953f173cdc35

diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -8953,6 +8953,9 @@ 7. Commands						*expression-commands*
 			Example: >
 				:let &path = &path . ',/usr/local/include'
 
+<			Note: This cannot be used for setting key code options
+			|terminal-key-codes|.
+
 :let &{option-name} .= {expr1}
 			For a string option: Append {expr1} to the value.
 			Does not insert a comma like |:set+=|.
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -242,7 +242,7 @@ But any non-empty string means that the 
 that the flag is not set.  't_CS' works like this too, but it isn't a termcap
 flag.
 
-OUTPUT CODES
+OUTPUT CODES						*terminal-output-codes*
 	option	meaning	~
 
 	t_AB	set background color (ANSI)			*t_AB* *'t_AB'*
@@ -325,7 +325,7 @@ Added by Vim (there are no standard code
 	t_BD	disable bracketed paste mode			*t_BD* *'t_BD'*
 		|xterm-bracketed-paste|
 
-KEY CODES
+KEY CODES						*terminal-key-codes*
 Note: Use the <> form if possible
 
 	option	name		meaning	~

Raspunde prin e-mail lui