Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 19728:41a1ea967a97 v8.2.0420
patch 8.2.0420: Vim9: cannot interrupt a loop with CTRL-C
Commit: https://github.com/vim/vim/commit/f1ec378b014efb9897422c40369a6462163a512a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 20 19:37:47 2020 +0100
patch 8.2.0420: Vim9: cannot interrupt a loop with CTRL-C
Problem: Vim9: cannot interrupt a loop with CTRL-C.
Solution: Check for CTRL-C once in a while. Doesn't fully work yet.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 20 Mar 2020 19:45:03 +0100 |
parents | ad37a198a708 |
children | fe8ba2f82f59 |
comparison
equal
deleted
inserted
replaced
19727:b803ef430f8b | 19728:41a1ea967a97 |
---|---|
940 result ..= cnt .. '_' | 940 result ..= cnt .. '_' |
941 endwhile | 941 endwhile |
942 assert_equal('1_3_', result) | 942 assert_equal('1_3_', result) |
943 enddef | 943 enddef |
944 | 944 |
945 def Test_interrupt_loop() | 945 " def Test_interrupt_loop() |
946 let x = 0 | 946 " let x = 0 |
947 while 1 | 947 " while 1 |
948 x += 1 | 948 " x += 1 |
949 if x == 100 | 949 " if x == 100 |
950 feedkeys("\<C-C>", 'L') | 950 " feedkeys("\<C-C>", 'L') |
951 endif | 951 " endif |
952 endwhile | 952 " endwhile |
953 enddef | 953 " enddef |
954 | 954 |
955 def Test_substitute_cmd() | 955 def Test_substitute_cmd() |
956 new | 956 new |
957 setline(1, 'something') | 957 setline(1, 'something') |
958 :substitute(some(other( | 958 :substitute(some(other( |