Mercurial > vim
comparison src/ex_docmd.c @ 24428:9299d21d1d5d v8.2.2754
patch 8.2.2754: :sleep! does not always hide the cursor
Commit: https://github.com/vim/vim/commit/09f067fca38c9f89ad088e8c096c4df3998575e2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 11 13:29:18 2021 +0200
patch 8.2.2754: :sleep! does not always hide the cursor
Problem: :sleep! does not always hide the cursor.
Solution: Add the cursor_is_asleep flag. (Jeremy Lerner, closes https://github.com/vim/vim/issues/8097,
closes #7998)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 11 Apr 2021 13:30:06 +0200 |
parents | a97fb00978f6 |
children | 602e528a8e43 |
comparison
equal
deleted
inserted
replaced
24427:e255d418a91d | 24428:9299d21d1d5d |
---|---|
7368 // should wait after waiting for a bit. | 7368 // should wait after waiting for a bit. |
7369 ELAPSED_INIT(start_tv); | 7369 ELAPSED_INIT(start_tv); |
7370 # endif | 7370 # endif |
7371 | 7371 |
7372 if (hide_cursor) | 7372 if (hide_cursor) |
7373 cursor_off(); | 7373 cursor_sleep(); |
7374 else | 7374 else |
7375 cursor_on(); | 7375 cursor_on(); |
7376 | 7376 |
7377 out_flush_cursor(FALSE, FALSE); | 7377 out_flush_cursor(FALSE, FALSE); |
7378 while (!got_int && done < msec) | 7378 while (!got_int && done < msec) |
7420 | 7420 |
7421 // If CTRL-C was typed to interrupt the sleep, drop the CTRL-C from the | 7421 // If CTRL-C was typed to interrupt the sleep, drop the CTRL-C from the |
7422 // input buffer, otherwise a following call to input() fails. | 7422 // input buffer, otherwise a following call to input() fails. |
7423 if (got_int) | 7423 if (got_int) |
7424 (void)vpeekc(); | 7424 (void)vpeekc(); |
7425 | |
7426 if (hide_cursor) | |
7427 cursor_unsleep(); | |
7425 } | 7428 } |
7426 | 7429 |
7427 /* | 7430 /* |
7428 * ":winsize" command (obsolete). | 7431 * ":winsize" command (obsolete). |
7429 */ | 7432 */ |