view src/testdir/test_channel_write.py @ 18408:50c0a9fb07ae v8.1.2198

patch 8.1.2198: crash when using :center in autocommand Commit: https://github.com/vim/vim/commit/396b7c78c0fd9cd07528963b18c27398491df40d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 21 23:08:59 2019 +0200 patch 8.1.2198: crash when using :center in autocommand Problem: Crash when using :center in autocommand. Solution: Bail out early for an empty line. (Dominique pelle, closes https://github.com/vim/vim/issues/5095)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Oct 2019 23:15:03 +0200
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