input() doesn't work when called from normal command

閲覧: 48 回
最初の未読メッセージにスキップ

mattn

未読、
2013/09/19 23:00:352013/09/19
To: vim...@googlegroups.com
Hi.

---
function! s:confirm_and_input()
let a = confirm("Your Sex?", "Male\nFemale")
echo input("Your Name?", )
endfunction

nnoremap <buffer> <c-d> :call <SID>confirm_and_input()<cr>
exe "normal \<c-d>"
---

When :so this script, confirm() works well but input() doesn't.
input() return empty string always. This caused that ex_normal_busy flag is
not zero. I think this should be worked even-though called from normal command. Below is a patch.
Please check.

https://gist.github.com/6632781

- Yasuhiro Matsumoto

Bram Moolenaar

未読、
2013/09/20 16:55:452013/09/20
To: mattn、vim...@googlegroups.com
Thanks. I wonder if there are side effects. There was a reason it was
done the way it is, but I don't immediately recall what it was.

--
"After a few years of marriage a man can look right at a woman
without seeing her and a woman can see right through a man
without looking at him."
- Helen Rowland

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

mattn

未読、
2013/09/21 1:24:092013/09/21
To: vim...@googlegroups.com、mattn
I guess that it is the way to do graceful for displaying without "-- hit return --" when it called from normal command.
全員に返信
投稿者に返信
転送
新着メール 0 件