Mercurial > vim
comparison src/channel.c @ 9064:a86103d4b356 v7.4.1817
commit https://github.com/vim/vim/commit/cefe4f994853c2d4866e2aa4ea3e3f36ab2fea13
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 4 21:49:19 2016 +0200
patch 7.4.1817
Problem: The screen is not updated if a callback is invoked when closing a
channel.
Solution: Invoke redraw_after_callback().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 04 May 2016 22:00:06 +0200 |
parents | 87c2e43a4a12 |
children | 2cd83c854073 |
comparison
equal
deleted
inserted
replaced
9063:030b239e7b25 | 9064:a86103d4b356 |
---|---|
2492 argv[0].vval.v_channel = channel; | 2492 argv[0].vval.v_channel = channel; |
2493 call_func(channel->ch_close_cb, (int)STRLEN(channel->ch_close_cb), | 2493 call_func(channel->ch_close_cb, (int)STRLEN(channel->ch_close_cb), |
2494 &rettv, 1, argv, 0L, 0L, &dummy, TRUE, | 2494 &rettv, 1, argv, 0L, 0L, &dummy, TRUE, |
2495 channel->ch_close_partial, NULL); | 2495 channel->ch_close_partial, NULL); |
2496 clear_tv(&rettv); | 2496 clear_tv(&rettv); |
2497 channel_need_redraw = TRUE; | |
2497 } | 2498 } |
2498 --channel->ch_refcount; | 2499 --channel->ch_refcount; |
2499 | 2500 |
2500 /* the callback is only called once */ | 2501 /* the callback is only called once */ |
2501 vim_free(channel->ch_close_cb); | 2502 vim_free(channel->ch_close_cb); |
2502 channel->ch_close_cb = NULL; | 2503 channel->ch_close_cb = NULL; |
2503 partial_unref(channel->ch_close_partial); | 2504 partial_unref(channel->ch_close_partial); |
2504 channel->ch_close_partial = NULL; | 2505 channel->ch_close_partial = NULL; |
2506 | |
2507 if (channel_need_redraw) | |
2508 { | |
2509 channel_need_redraw = FALSE; | |
2510 redraw_after_callback(); | |
2511 } | |
2505 | 2512 |
2506 /* any remaining messages are useless now */ | 2513 /* any remaining messages are useless now */ |
2507 for (part = PART_SOCK; part <= PART_ERR; ++part) | 2514 for (part = PART_SOCK; part <= PART_ERR; ++part) |
2508 drop_messages(channel, part); | 2515 drop_messages(channel, part); |
2509 } | 2516 } |