view runtime/tools/blink.c @ 33649:88cad94caef9

runtime(doc): Fix typos in several documents (#13420) Commit: https://github.com/vim/vim/commit/5985879e3c36383155f84649fa42d06813a1893e Author: h_east <h.east.727@gmail.com> Date: Wed Oct 25 22:47:05 2023 +0900 runtime(doc): Fix typos in several documents (https://github.com/vim/vim/issues/13420) * Fix typos in several documents * Update runtime/doc/terminal.txt Co-authored-by: K.Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 25 Oct 2023 16:00:07 +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;
}