Hi list,

How to reproduce:

Create a func:

func! Ywtest()
    redraw | let txt = matchstr(input("Foo: "), '^\s*\zs.*')
    while txt == ''
        let txt = matchstr(input("Foo: "), '^\s*\zs')
    endwhile
endfunc

Run it: :call Ywtest()

Then in the first prompt, hit enter to enter a blank string, then func will
prompt again, now input some string, hit enter again, you will find the while
loop will nerver end from now on.

If I remove the matchstr() part, func runs well, what's wrong with it?

-- 
Regards,
Yue Wu

Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University
No.24, Tongjia Xiang Street, Nanjing 210009, China

-- 
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

Reply via email to