Mercurial > vim
comparison src/channel.c @ 8320:e2021d6feeda v7.4.1452
commit https://github.com/vim/vim/commit/18b5d6df10a5f08ffebbec85a1cf2828871e3736
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 28 19:30:24 2016 +0100
patch 7.4.1452
Problem: When a callback adds a syntax item either the redraw doesn't
happen right away or in the GUI the cursor is in the wrong
position for a moment. (Jakson Alves de Aquino)
Solution: Redraw after the callback was invoked.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 28 Feb 2016 19:45:04 +0100 |
parents | 190d8084cb3a |
children | ec940c11f749 |
comparison
equal
deleted
inserted
replaced
8319:84a0b8e6bce6 | 8320:e2021d6feeda |
---|---|
943 call_func(callback, (int)STRLEN(callback), | 943 call_func(callback, (int)STRLEN(callback), |
944 &rettv, 2, argv, 0L, 0L, &dummy, TRUE, NULL); | 944 &rettv, 2, argv, 0L, 0L, &dummy, TRUE, NULL); |
945 clear_tv(&rettv); | 945 clear_tv(&rettv); |
946 | 946 |
947 /* If an echo command was used the cursor needs to be put back where | 947 /* If an echo command was used the cursor needs to be put back where |
948 * it belongs. */ | 948 * it belongs. If highlighting was changed a redraw is needed. */ |
949 update_screen(0); | |
949 setcursor(); | 950 setcursor(); |
950 cursor_on(); | 951 cursor_on(); |
951 out_flush(); | 952 out_flush(); |
953 #ifdef FEAT_GUI | |
954 gui_update_cursor(TRUE, FALSE); | |
955 gui_mch_flush(); | |
956 #endif | |
952 } | 957 } |
953 | 958 |
954 /* | 959 /* |
955 * Return the first buffer from channel "channel"/"part" and remove it. | 960 * Return the first buffer from channel "channel"/"part" and remove it. |
956 * The caller must free it. | 961 * The caller must free it. |