Loading ...
Sorry, an error occurred while loading the content.
 

echo getting erased.

Expand Messages
  • Devin Weaver
    If always had trouble with echo not printing but this one really stumpped me. I need some help figuring out what I m doing wrong. Here s the function: function
    Message 1 of 2 , Dec 6, 2000
      If always had trouble with echo not printing but this one really stumpped me. I
      need some help figuring out what I'm doing wrong.

      Here's the function:
      function MyFunc( )
      normal! zz
      echohl WarningMsg
      echo "Hello World!"
      echohl None
      endfunction

      Now if I run GVIM like this:

      gvim -u NONE -U NONE large_text_file.txt

      then the first thing I do is :set nocp
      and then type in the above function.

      Then I scroll down a few pages and place the cursor above or below the center
      line (So the zz command is forced to move the viewport) Then run the funtion
      you'll see that helloworld is not printed.

      Any Ideas?

      --
      If VIM were a woman, I'd marry her. Slim, organized, helpful and beautiful;
      what's not to like?
    • Zdenek Sekera
      ... No idea, I just want to say that I have seen this very problem many times over, not only on 6.0 which I have reported (you don t say which vim version you
      Message 2 of 2 , Dec 6, 2000
        Devin Weaver wrote:
        >
        > If always had trouble with echo not printing but this one really stumpped me. I
        > need some help figuring out what I'm doing wrong.
        >
        > Here's the function:
        > function MyFunc( )
        > normal! zz
        > echohl WarningMsg
        > echo "Hello World!"
        > echohl None
        > endfunction
        >
        > Now if I run GVIM like this:
        >
        > gvim -u NONE -U NONE large_text_file.txt
        >
        > then the first thing I do is :set nocp
        > and then type in the above function.
        >
        > Then I scroll down a few pages and place the cursor above or below the center
        > line (So the zz command is forced to move the viewport) Then run the funtion
        > you'll see that helloworld is not printed.
        >
        > Any Ideas?

        No idea, I just want to say that I have seen this very problem many
        times over,
        not only on 6.0 which I have reported (you don't say which vim version
        you are
        running). Many times it helps to put another 'echo "something really
        useless"'
        behind the echo you *really* want to see, sometimes you need more of
        those and
        sometimes a batch of echo's disappears without any recovery (that I
        found).
        This is particularly annoying when you are debugging a script and you
        getting
        out messages that look like *randonly chosen* from a sequence of your
        debug
        echo's.

        ---Zdenek
      Your message has been successfully submitted and would be delivered to recipients shortly.