Mercurial > vim
comparison src/channel.c @ 12244:d0b039e2ed56 v8.0.1002
patch 8.0.1002: unnecessarily updating screen after timer callback
commit https://github.com/vim/vim/commit/02e177d3e85e089ebdfba1a7d937150cffcb287a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 26 23:43:28 2017 +0200
patch 8.0.1002: unnecessarily updating screen after timer callback
Problem: Unnecessarily updating screen after timer callback.
Solution: Check if calling the timer sets must_redraw.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 26 Aug 2017 23:45:04 +0200 |
parents | 24abce52ad20 |
children | 337690672bda |
comparison
equal
deleted
inserted
replaced
12243:c91be926abaf | 12244:d0b039e2ed56 |
---|---|
2885 --channel->ch_refcount; | 2885 --channel->ch_refcount; |
2886 | 2886 |
2887 if (channel_need_redraw) | 2887 if (channel_need_redraw) |
2888 { | 2888 { |
2889 channel_need_redraw = FALSE; | 2889 channel_need_redraw = FALSE; |
2890 redraw_after_callback(); | 2890 redraw_after_callback(TRUE); |
2891 } | 2891 } |
2892 | 2892 |
2893 if (!channel->ch_drop_never) | 2893 if (!channel->ch_drop_never) |
2894 /* any remaining messages are useless now */ | 2894 /* any remaining messages are useless now */ |
2895 for (part = PART_SOCK; part < PART_IN; ++part) | 2895 for (part = PART_SOCK; part < PART_IN; ++part) |
4128 } | 4128 } |
4129 | 4129 |
4130 if (channel_need_redraw) | 4130 if (channel_need_redraw) |
4131 { | 4131 { |
4132 channel_need_redraw = FALSE; | 4132 channel_need_redraw = FALSE; |
4133 redraw_after_callback(); | 4133 redraw_after_callback(TRUE); |
4134 } | 4134 } |
4135 | 4135 |
4136 --safe_to_invoke_callback; | 4136 --safe_to_invoke_callback; |
4137 | 4137 |
4138 return ret; | 4138 return ret; |
5228 } | 5228 } |
5229 | 5229 |
5230 if (channel_need_redraw) | 5230 if (channel_need_redraw) |
5231 { | 5231 { |
5232 channel_need_redraw = FALSE; | 5232 channel_need_redraw = FALSE; |
5233 redraw_after_callback(); | 5233 redraw_after_callback(TRUE); |
5234 } | 5234 } |
5235 } | 5235 } |
5236 | 5236 |
5237 /* | 5237 /* |
5238 * Create a job and return it. Implements job_start(). | 5238 * Create a job and return it. Implements job_start(). |