On Sun, 14 May 2006, Yakov Lerner wrote:

On 5/14/06, Jared <[EMAIL PROTECTED]> wrote:
I have a simple question that I can't seem to figure out.  When I use the
echo command to echo a statement on my open window, it simply displays that
message in the status bar.  However, if I use echo in a function, it adds
"Please ENTER or type command to continue" after it.

How do I make it not do that?  Eg, I just want it to display the message,
not prompt me to press a key.

Try 2 things
(1) add :redraw before the :echo in question
(2) if that doesn't help, make message shorter.
I noticed that if message is longer than screen width-15,
it cases the prompt.

You could also readjust the height of the command-line dynamically:

  let msg = "str"
  let len = strlen(substitute(msg, ".", "x", "g"))
  let t_ch = &cmdheight
  let &cmdheight = len / (&columns - 15) + 1
  echo msg
  let &cmdheight = t_ch

See ":help 'cmdheight'" & ":help strlen()".

HTH :)
--
Gerald

Reply via email to