On Tue, 16 May 2006, Eric Arnold wrote:

Does anybody understand why trailing spaces in an "echon" string don't
actually show up?

echon "\ngimme "
let inp = getchar()
echon nr2char(inp)

I think echo/echon is doing fine. It's getchar() that's eating up
trailing spaces. Compare @a's for:

  :redir @a |  echon "  123    " | call getchar() | redir END
  :redir @a |  echon "\n123    " | call getchar() | redir END
  :redir @a || echon "  123    " | call getchar() | redir END

The "\n" or previous ex command "|" has something to do with it.

(tested on Vim 6.3)
--
Gerald

Reply via email to