Mercurial > vim
view runtime/tools/blink.c @ 21445:ae23caa42dac v8.2.1273
patch 8.2.1273: MS-Windows: terminal test may leave file behind
Commit: https://github.com/vim/vim/commit/c69950ac17225d07f973b39d5b0eb94291077808
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 22 22:23:40 2020 +0200
patch 8.2.1273: MS-Windows: terminal test may leave file behind
Problem: MS-Windows: terminal test may leave file behind.
Solution: Wait a moment for process to end before deleting the file.
(Taro Muraoka, closes #6513)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Jul 2020 22:30:03 +0200 |
parents | 64035abb986b |
children |
line wrap: on
line source
/* * An extremely simple program to make the cursor blink in an xterm. * This is useful when the cursor is hard to spot in a highlighted file. * Start in the background: "blink&" Stop by killing it. * Bram Moolenaar 980109 (based on an idea from John Lange). */ #include <stdio.h> #include <unistd.h> int main(void) { while (1) { printf("\e[?25h"); fflush(stdout); usleep(400000); /* on time */ printf("\e[?25l"); fflush(stdout); usleep(250000); /* off time */ } return 0; }