It works.  Thanks.

On 6/18/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:

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)

It appears this is because getchar() doesn't flush the output and
position the cursor.  Try this patch:

*** ../../vim-7.0.017/src/eval.c        Sat May 13 13:36:47 2006
--- eval.c      Sat Jun 17 15:28:15 2006
***************
*** 9792,9797 ****
--- 9792,9801 ----
      varnumber_T               n;
      int                       error = FALSE;

+     /* Flush any pending messages and position cursor. */
+     out_flush();
+     windgoto(msg_row, msg_col);
+
      ++no_mapping;
      ++allow_keys;
      if (argvars[0].v_type == VAR_UNKNOWN)

--
Why doesn't Tarzan have a beard?

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to