Mercurial > vim
comparison src/gui.c @ 9848:664276833670 v7.4.2199
commit https://github.com/vim/vim/commit/107abd2ca53c31fd3bb40d77ff296e98eaae2975
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 12 14:08:25 2016 +0200
patch 7.4.2199
Problem: In the GUI the cursor is hidden when redrawing any window,
causing flicker.
Solution: Only undraw the cursor when updating the window it's in.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 12 Aug 2016 14:15:05 +0200 |
parents | bc591685594a |
children | ccb6461b82df |
comparison
equal
deleted
inserted
replaced
9847:9dd04cad0feb | 9848:664276833670 |
---|---|
1962 * When ScreenLines[] is invalid, updating the cursor should not be done, it | 1962 * When ScreenLines[] is invalid, updating the cursor should not be done, it |
1963 * produces wrong results. Call gui_dont_update_cursor() before that code and | 1963 * produces wrong results. Call gui_dont_update_cursor() before that code and |
1964 * gui_can_update_cursor() afterwards. | 1964 * gui_can_update_cursor() afterwards. |
1965 */ | 1965 */ |
1966 void | 1966 void |
1967 gui_dont_update_cursor(void) | 1967 gui_dont_update_cursor(int undraw) |
1968 { | 1968 { |
1969 if (gui.in_use) | 1969 if (gui.in_use) |
1970 { | 1970 { |
1971 /* Undraw the cursor now, we probably can't do it after the change. */ | 1971 /* Undraw the cursor now, we probably can't do it after the change. */ |
1972 gui_undraw_cursor(); | 1972 if (undraw) |
1973 gui_undraw_cursor(); | |
1973 can_update_cursor = FALSE; | 1974 can_update_cursor = FALSE; |
1974 } | 1975 } |
1975 } | 1976 } |
1976 | 1977 |
1977 void | 1978 void |