@@ -26,31 +26,25 @@ set_ref_in_buffers(int copyID)
2626 FOR_ALL_BUFFERS (bp )
2727 {
2828 listener_T * lnr ;
29- typval_T tv ;
3029
3130 for (lnr = bp -> b_listener ; !abort && lnr != NULL ; lnr = lnr -> lr_next )
32- {
33- if (lnr -> lr_callback .cb_partial != NULL )
34- {
35- tv .v_type = VAR_PARTIAL ;
36- tv .vval .v_partial = lnr -> lr_callback .cb_partial ;
37- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
38- }
39- }
31+ abort = abort || set_ref_in_callback (& lnr -> lr_callback , copyID );
4032# ifdef FEAT_JOB_CHANNEL
41- if (!abort && bp -> b_prompt_callback .cb_partial != NULL )
42- {
43- tv .v_type = VAR_PARTIAL ;
44- tv .vval .v_partial = bp -> b_prompt_callback .cb_partial ;
45- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
46- }
47- if (!abort && bp -> b_prompt_interrupt .cb_partial != NULL )
48- {
49- tv .v_type = VAR_PARTIAL ;
50- tv .vval .v_partial = bp -> b_prompt_interrupt .cb_partial ;
51- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
52- }
33+ if (!abort )
34+ abort = abort || set_ref_in_callback (& bp -> b_prompt_callback , copyID );
35+ if (!abort )
36+ abort = abort || set_ref_in_callback (& bp -> b_prompt_interrupt , copyID );
5337# endif
38+ #ifdef FEAT_COMPL_FUNC
39+ if (!abort )
40+ abort = abort || set_ref_in_callback (& bp -> b_cfu_cb , copyID );
41+ if (!abort )
42+ abort = abort || set_ref_in_callback (& bp -> b_ofu_cb , copyID );
43+ if (!abort )
44+ abort = abort || set_ref_in_callback (& bp -> b_tsrfu_cb , copyID );
45+ #endif
46+ if (!abort )
47+ abort = abort || set_ref_in_callback (& bp -> b_tfu_cb , copyID );
5448 if (abort )
5549 break ;
5650 }
0 commit comments