Yasuhiro Matsumoto wrote:
> If the text is given from script by routine, user don't know that CR/LF
> effect this problem.
> In unix format text file, you often see ^M in a file. In the case that the
> line include ^M like following,
>
> ---------------
> 1+1=
> 1+2=^M
> 1+3=
> ---------------
>
> If you type following in line:2.
>
> :let answer = input("Answer?: ", getline("."))
>
> Most people expect showing prompt. But answer is not 1+2=3 or else.
> Answer will be "1+2=".
OK, I see. One might argue that the line should be filtered, but when
that is forgotten the behavior is indeed strange.
> You may think that "THIS IS NOT A BUG". But there is difference between
> input() and inputdialog()
> inputdialog() show a gui dialog. then it don't appear this problem.
> I guess that this should be fixed.
> Of course, I don't beleave my patch is BEST. For example, one of solution
> that replace ^M to ^V^M for typeahead.
I think it's better to replace CR, NL and ESC in stuffReadbuffSpec().
Would there be any other characters that cause problems?
--
hundred-and-one symptoms of being an internet addict:
33. You name your children Eudora, Mozilla and Dotcom.
/// 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