Mercurial > vim
comparison src/gui.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 | b37d22c73eca |
children | 4ae10e6c3a9c |
comparison
equal
deleted
inserted
replaced
24427:e255d418a91d | 24428:9299d21d1d5d |
---|---|
1118 gui_check_pos(); | 1118 gui_check_pos(); |
1119 if (!gui.cursor_is_valid || force | 1119 if (!gui.cursor_is_valid || force |
1120 || gui.row != gui.cursor_row || gui.col != gui.cursor_col) | 1120 || gui.row != gui.cursor_row || gui.col != gui.cursor_col) |
1121 { | 1121 { |
1122 gui_undraw_cursor(); | 1122 gui_undraw_cursor(); |
1123 | |
1124 // If a cursor-less sleep is ongoing, leave the cursor invisible | |
1125 if (cursor_is_sleeping()) | |
1126 return; | |
1127 | |
1123 if (gui.row < 0) | 1128 if (gui.row < 0) |
1124 return; | 1129 return; |
1125 #ifdef HAVE_INPUT_METHOD | 1130 #ifdef HAVE_INPUT_METHOD |
1126 if (gui.row != gui.cursor_row || gui.col != gui.cursor_col) | 1131 if (gui.row != gui.cursor_row || gui.col != gui.cursor_col) |
1127 im_set_position(gui.row, gui.col); | 1132 im_set_position(gui.row, gui.col); |