Hi, all.

input() / inputsecret() accept CR/LF character.

--------------
let cr = "I am\nYasuhiro\nMatsumoto"
echo inputdialog("Who are you?:", cr)
--------------

This script close input area automaticaly.
about initstr for input(), we should remove CR/LF characters.

diff -r df01e20e6be2 src/eval.c
--- a/src/eval.c Thu Apr 21 14:27:28 2011 +0200
+++ b/src/eval.c Wed Apr 27 10:04:50 2011 +0900
@@ -12720,7 +12720,22 @@
  {
     defstr = get_tv_string_buf_chk(&argvars[1], buf);
     if (defstr != NULL)
+    {
+ char_u* s = defstr;
+ while (*s != NUL)
+ {
+    if (*s == '\r' || *s == '\n')
+ mch_memmove(s, s + 1, STRLEN(s));
+    else
+#ifdef FEAT_MBYTE
+ s += (*mb_ptr2len)(s);
+#else
+ ++s;
+#endif
+ }
+
  stuffReadbuffSpec(defstr);
+    }
 
     if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN)
     {
--

- Yasuhiro Matsumoto

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

Raspunde prin e-mail lui