On 1/12/2016 10:48 PM, Christian Brabandt wrote:
...
while(textm =~ '^\s*$') " will always exit from while
> ...
let textm = getline(cline-i)
endwhile
There is no exit condition, once cline-i is smaller than 1.
In that case getline returns an empty string,
Not according to the documentation for :help getline():
When {lnum} is smaller than 1 or bigger than the
number of lines in the buffer, an empty string is
returned.
That is the reason for the comment (will always exit from while).
which happens to match your "^\s*$" and therefore
> the loop happily continues.
--Suresh
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.