Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
16871:e5dab34ded73 | 16872:a836d122231a |
---|---|
147 vim_snprintf((char *)cbbuf, sizeof(cbbuf), | 147 vim_snprintf((char *)cbbuf, sizeof(cbbuf), |
148 "{_ -> popup_close(%d)}", wp->w_id); | 148 "{_ -> popup_close(%d)}", wp->w_id); |
149 if (get_lambda_tv(&ptr, &tv, TRUE) == OK) | 149 if (get_lambda_tv(&ptr, &tv, TRUE) == OK) |
150 { | 150 { |
151 wp->w_popup_timer = create_timer(nr, 0); | 151 wp->w_popup_timer = create_timer(nr, 0); |
152 wp->w_popup_timer->tr_callback = | 152 wp->w_popup_timer->tr_callback.cb_name = |
153 vim_strsave(partial_name(tv.vval.v_partial)); | 153 vim_strsave(partial_name(tv.vval.v_partial)); |
154 func_ref(wp->w_popup_timer->tr_callback); | 154 func_ref(wp->w_popup_timer->tr_callback.cb_name); |
155 wp->w_popup_timer->tr_partial = tv.vval.v_partial; | 155 wp->w_popup_timer->tr_callback.cb_partial = tv.vval.v_partial; |
156 } | 156 } |
157 } | 157 } |
158 #endif | 158 #endif |
159 | 159 |
160 // Option values resulting in setting an option. | 160 // Option values resulting in setting an option. |