On 14/03/09 20:37 +0200, Agathoklis D. Hatzimanikas wrote: > Here is how I've made my test: > > > function! TASK1() > sleep 10 > endfunction > > function! TASK2() > sleep 20 > endfunction > > function! Test() > while 1 > try > let command = input("Type a command: ") > try > if command == "" > continue > elseif command == "END" > break > elseif command == "TASK1" > call TASK1() > elseif command == "TASK2" > call TASK2() > else > echo "\nIllegal command:" command > continue > endif > catch /^Vim:Interrupt$/ > echo "\nThis is the nested try/catch/endtry" > echo "Command interrupted" > endtry > catch /^Vim:Interrupt$/ > echo "\nInput interrupted" > break > endtry > endwhile > endfunction > > :call Test() >
Weird. I tried your Test() function, but it cannot be interrupted in my VIM. (VIM - Vi IMproved 7.2 Included patches: 1-141) -- Dasn --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---