view runtime/tools/blink.c @ 9772:560291211303 v7.4.2161

commit https://github.com/vim/vim/commit/7ab6defcafe017a3ad58580a3e56dab705b1ed8b Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 22:51:13 2016 +0200 patch 7.4.2161 Problem: Expression test fails without conceal feature. Solution: Only check "conceal" with the conceal feature.
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Aug 2016 23: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;
}