Sunday, March 27, 2011

Re: Missing output from echo command ?

> I'm getting irreproducible/unexplainable results!

If they're not reproducible, we may have trouble helping!

> I set up a test file of ~400 lines of downloaded vim_use articles.
> Some lines: (100,200,250,350) begin with 'From - ...'
> Some lines: (150,230,270,390) are null. {End of header ...}
>
> @ line 150, I try
> :let ln = 999 | echo ln | let ln = ('^From - ','W') | echo ln

That must be missing something. Should there be 'search' before those
parentheses?

> Now I try @ 101
> :let ln = ('^$','W') | echo ln
> expecting to get
> 150
> and cursor moves to line 150
>
> I get the cursor motion, BUT not the expected :echo ln output of 150 !!
> After more playing around, @ 391 I get
> 0
> and no cursor movement

Mmm. This kind of thing is working for me. But if it's stopping working
at some point, we need to try to figure out what makes it stop.

> Also going back to the previous command line:
> :let ln = 999 | echo ln | let ln = ('^From - ','W') | echo ln
> I no longer get the echo outputs. But I do get the cursor moves
> to next ^From - line, UNTIL the last case i.e. @ 350
> Then I get
> 999
> 0
> no cursor movement. i.e. stay on line 350
> ???

That's correct, isn't it? There is no "From - " after line 350.

Can you try to make a small test case with a particular file and exact steps which
can be followed to demonstrate the problem?

Ben.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment