view src/testdir/test_channel_write.py @ 23586:8c5374ec8a3d v8.2.2335

patch 8.2.2335: Vim9: "silent return" does not restore command modifiers Commit: https://github.com/vim/vim/commit/7cd24227c02afdb4249db406e2174eda1e6b36b4 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 12 18:58:39 2021 +0100 patch 8.2.2335: Vim9: "silent return" does not restore command modifiers Problem: Vim9: "silent return" does not restore command modifiers. Solution: Resture command modifiers before returning. (closes https://github.com/vim/vim/issues/7649)
author Bram Moolenaar <Bram@vim.org>
date Tue, 12 Jan 2021 19:00:07 +0100
parents 5cd9ba96561d
children
line wrap: on
line source

#!/usr/bin/python
#
# Program that writes a number to stdout repeatedly
#
# This requires Python 2.6 or later.

from __future__ import print_function
import sys
import time

if __name__ == "__main__":

    done = 0
    while done < 10:
        done = done + 1
        print(done)
        sys.stdout.flush()
        time.sleep(0.05)  # sleep 50 msec