Mercurial > vim
comparison src/buffer.c @ 17950:bb0e25a8b5d7 v8.1.1971
patch 8.1.1971: manually enabling features causes build errors
Commit: https://github.com/vim/vim/commit/d570ab95d9ab0616f7d7cff59302617e612eae41
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 3 23:20:05 2019 +0200
patch 8.1.1971: manually enabling features causes build errors
Problem: Manually enabling features causes build errors. (John Marriott)
Solution: Adjust #ifdefs.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Sep 2019 23:30:04 +0200 |
parents | 7e6b7a4f13bc |
children | cf8e0c7e0cb9 |
comparison
equal
deleted
inserted
replaced
17949:286cbea6f0cc | 17950:bb0e25a8b5d7 |
---|---|
43 #endif | 43 #endif |
44 static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file); | 44 static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file); |
45 static void free_buffer(buf_T *); | 45 static void free_buffer(buf_T *); |
46 static void free_buffer_stuff(buf_T *buf, int free_options); | 46 static void free_buffer_stuff(buf_T *buf, int free_options); |
47 static void clear_wininfo(buf_T *buf); | 47 static void clear_wininfo(buf_T *buf); |
48 #if defined(FEAT_JOB_CHANNEL) \ | |
49 || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) | |
50 static int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp); | |
51 #endif | |
52 | 48 |
53 #ifdef UNIX | 49 #ifdef UNIX |
54 # define dev_T dev_t | 50 # define dev_T dev_t |
55 #else | 51 #else |
56 # define dev_T unsigned | 52 # define dev_T unsigned |
5455 } | 5451 } |
5456 | 5452 |
5457 #if defined(FEAT_JOB_CHANNEL) \ | 5453 #if defined(FEAT_JOB_CHANNEL) \ |
5458 || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \ | 5454 || defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \ |
5459 || defined(PROTO) | 5455 || defined(PROTO) |
5460 # define SWITCH_TO_WIN | 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 } | |
5461 | 5474 |
5462 /* | 5475 /* |
5463 * Find a window that contains "buf" and switch to it. | 5476 * Find a window that contains "buf" and switch to it. |
5464 * If there is no such window, use the current window and change "curbuf". | 5477 * If there is no such window, use the current window and change "curbuf". |
5465 * Caller must initialize save_curbuf to NULL. | 5478 * Caller must initialize save_curbuf to NULL. |
5492 { | 5505 { |
5493 if (save_curbuf->br_buf == NULL) | 5506 if (save_curbuf->br_buf == NULL) |
5494 restore_win(save_curwin, save_curtab, TRUE); | 5507 restore_win(save_curwin, save_curtab, TRUE); |
5495 else | 5508 else |
5496 restore_buffer(save_curbuf); | 5509 restore_buffer(save_curbuf); |
5497 } | |
5498 #endif | |
5499 | |
5500 #if defined(FEAT_QUICKFIX) || defined(SWITCH_TO_WIN) || defined(PROTO) | |
5501 /* | |
5502 * Find a window for buffer "buf". | |
5503 * If found OK is returned and "wp" and "tp" are set to the window and tabpage. | |
5504 * If not found FAIL is returned. | |
5505 */ | |
5506 static int | |
5507 find_win_for_buf( | |
5508 buf_T *buf, | |
5509 win_T **wp, | |
5510 tabpage_T **tp) | |
5511 { | |
5512 FOR_ALL_TAB_WINDOWS(*tp, *wp) | |
5513 if ((*wp)->w_buffer == buf) | |
5514 goto win_found; | |
5515 return FAIL; | |
5516 win_found: | |
5517 return OK; | |
5518 } | 5510 } |
5519 #endif | 5511 #endif |
5520 | 5512 |
5521 /* | 5513 /* |
5522 * Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed. | 5514 * Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed. |