Mercurial > vim
diff src/popupwin.c @ 16872:a836d122231a v8.1.1437
patch 8.1.1437: code to handle callbacks is duplicated
commit https://github.com/vim/vim/commit/3a97bb3f0f8bd118ae23f1c97e55d84ff42eef20
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 1 13:28:35 2019 +0200
patch 8.1.1437: code to handle callbacks is duplicated
Problem: Code to handle callbacks is duplicated.
Solution: Add callback_T and functions to deal with it.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Jun 2019 13:30:07 +0200 |
parents | 0154363d3b98 |
children | da5f5836e90c |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -149,10 +149,10 @@ apply_options(win_T *wp, buf_T *buf UNUS if (get_lambda_tv(&ptr, &tv, TRUE) == OK) { wp->w_popup_timer = create_timer(nr, 0); - wp->w_popup_timer->tr_callback = + wp->w_popup_timer->tr_callback.cb_name = vim_strsave(partial_name(tv.vval.v_partial)); - func_ref(wp->w_popup_timer->tr_callback); - wp->w_popup_timer->tr_partial = tv.vval.v_partial; + func_ref(wp->w_popup_timer->tr_callback.cb_name); + wp->w_popup_timer->tr_callback.cb_partial = tv.vval.v_partial; } } #endif