@@ -5450,66 +5450,6 @@ buf_spname(buf_T *buf)
5450
5450
return NULL ;
5451
5451
}
5452
5452
5453
- #if defined(FEAT_JOB_CHANNEL ) \
5454
- || defined(FEAT_PYTHON ) || defined(FEAT_PYTHON3 ) \
5455
- || defined(PROTO )
5456
- /*
5457
- * Find a window for buffer "buf".
5458
- * If found OK is returned and "wp" and "tp" are set to the window and tabpage.
5459
- * If not found FAIL is returned.
5460
- */
5461
- static int
5462
- find_win_for_buf (
5463
- buf_T * buf ,
5464
- win_T * * wp ,
5465
- tabpage_T * * tp )
5466
- {
5467
- FOR_ALL_TAB_WINDOWS (* tp , * wp )
5468
- if ((* wp )-> w_buffer == buf )
5469
- goto win_found ;
5470
- return FAIL ;
5471
- win_found :
5472
- return OK ;
5473
- }
5474
-
5475
- /*
5476
- * Find a window that contains "buf" and switch to it.
5477
- * If there is no such window, use the current window and change "curbuf".
5478
- * Caller must initialize save_curbuf to NULL.
5479
- * restore_win_for_buf() MUST be called later!
5480
- */
5481
- void
5482
- switch_to_win_for_buf (
5483
- buf_T * buf ,
5484
- win_T * * save_curwinp ,
5485
- tabpage_T * * save_curtabp ,
5486
- bufref_T * save_curbuf )
5487
- {
5488
- win_T * wp ;
5489
- tabpage_T * tp ;
5490
-
5491
- if (find_win_for_buf (buf , & wp , & tp ) == FAIL )
5492
- switch_buffer (save_curbuf , buf );
5493
- else if (switch_win (save_curwinp , save_curtabp , wp , tp , TRUE) == FAIL )
5494
- {
5495
- restore_win (* save_curwinp , * save_curtabp , TRUE);
5496
- switch_buffer (save_curbuf , buf );
5497
- }
5498
- }
5499
-
5500
- void
5501
- restore_win_for_buf (
5502
- win_T * save_curwin ,
5503
- tabpage_T * save_curtab ,
5504
- bufref_T * save_curbuf )
5505
- {
5506
- if (save_curbuf -> br_buf == NULL )
5507
- restore_win (save_curwin , save_curtab , TRUE);
5508
- else
5509
- restore_buffer (save_curbuf );
5510
- }
5511
- #endif
5512
-
5513
5453
/*
5514
5454
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
5515
5455
*/
@@ -5603,48 +5543,3 @@ wipe_buffer(
5603
5543
if (!aucmd )
5604
5544
unblock_autocmds ();
5605
5545
}
5606
-
5607
- #if defined(FEAT_EVAL ) || defined(PROTO )
5608
- /*
5609
- * Mark references in functions of buffers.
5610
- */
5611
- int
5612
- set_ref_in_buffers (int copyID )
5613
- {
5614
- int abort = FALSE;
5615
- buf_T * bp ;
5616
-
5617
- FOR_ALL_BUFFERS (bp )
5618
- {
5619
- listener_T * lnr ;
5620
- typval_T tv ;
5621
-
5622
- for (lnr = bp -> b_listener ; !abort && lnr != NULL ; lnr = lnr -> lr_next )
5623
- {
5624
- if (lnr -> lr_callback .cb_partial != NULL )
5625
- {
5626
- tv .v_type = VAR_PARTIAL ;
5627
- tv .vval .v_partial = lnr -> lr_callback .cb_partial ;
5628
- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
5629
- }
5630
- }
5631
- # ifdef FEAT_JOB_CHANNEL
5632
- if (!abort && bp -> b_prompt_callback .cb_partial != NULL )
5633
- {
5634
- tv .v_type = VAR_PARTIAL ;
5635
- tv .vval .v_partial = bp -> b_prompt_callback .cb_partial ;
5636
- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
5637
- }
5638
- if (!abort && bp -> b_prompt_interrupt .cb_partial != NULL )
5639
- {
5640
- tv .v_type = VAR_PARTIAL ;
5641
- tv .vval .v_partial = bp -> b_prompt_interrupt .cb_partial ;
5642
- abort = abort || set_ref_in_item (& tv , copyID , NULL , NULL );
5643
- }
5644
- # endif
5645
- if (abort )
5646
- break ;
5647
- }
5648
- return abort ;
5649
- }
5650
- #endif
0 commit comments