comparison src/channel.c @ 8579:556817999955 v7.4.1579

commit https://github.com/vim/vim/commit/a3dc5e92dcb79bdc4f0103e6eb91de4c7a6ee9a7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 15 23:19:14 2016 +0100 patch 7.4.1579 Problem: Missing changes in channel.c Solution: Include the changes.
author Christian Brabandt <cb@256bit.org>
date Tue, 15 Mar 2016 23:30:06 +0100
parents fec8655cf1bf
children d762390fb27b
comparison
equal deleted inserted replaced
8578:44fc12f442da 8579:556817999955
1283 1283
1284 call_func(callback, (int)STRLEN(callback), 1284 call_func(callback, (int)STRLEN(callback),
1285 &rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL); 1285 &rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL);
1286 clear_tv(&rettv); 1286 clear_tv(&rettv);
1287 1287
1288 /* If an echo command was used the cursor needs to be put back where 1288 redraw_after_callback();
1289 * it belongs. If highlighting was changed a redraw is needed. */
1290 update_screen(0);
1291 setcursor();
1292 cursor_on();
1293 out_flush();
1294 #ifdef FEAT_GUI
1295 if (gui.in_use)
1296 {
1297 gui_update_cursor(TRUE, FALSE);
1298 gui_mch_flush();
1299 }
1300 #endif
1301 } 1289 }
1302 1290
1303 /* 1291 /*
1304 * Return the first buffer from channel "channel"/"part" and remove it. 1292 * Return the first buffer from channel "channel"/"part" and remove it.
1305 * The caller must free it. 1293 * The caller must free it.
3022 channel_get_timeout(channel_T *channel, int part) 3010 channel_get_timeout(channel_T *channel, int part)
3023 { 3011 {
3024 return channel->ch_part[part].ch_timeout; 3012 return channel->ch_part[part].ch_timeout;
3025 } 3013 }
3026 3014
3027 /*
3028 * Get a callback from "arg". It can be a Funcref or a function name.
3029 * When "arg" is zero return an empty string.
3030 * Return NULL for an invalid argument.
3031 */
3032 static char_u *
3033 get_callback(typval_T *arg, partial_T **pp)
3034 {
3035 if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL)
3036 {
3037 *pp = arg->vval.v_partial;
3038 return (*pp)->pt_name;
3039 }
3040 *pp = NULL;
3041 if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING)
3042 return arg->vval.v_string;
3043 if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
3044 return (char_u *)"";
3045 EMSG(_("E921: Invalid callback argument"));
3046 return NULL;
3047 }
3048
3049 static int 3015 static int
3050 handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo) 3016 handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo)
3051 { 3017 {
3052 char_u *val = get_tv_string(item); 3018 char_u *val = get_tv_string(item);
3053 3019