diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index f3128c7f6f..77bed67d5f 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1530,6 +1530,7 @@ void free_buf_options(buf_T *buf, int free_p_ff) clear_string_option(&buf->b_p_qe); buf->b_p_ar = -1; buf->b_p_ul = NO_LOCAL_UNDOLEVEL; + clear_string_option(&buf->b_p_lw); } /* @@ -4255,7 +4256,7 @@ char_u *buf_spname(buf_T *buf) * For location list window, w_llist_ref points to the location list. * For quickfix window, w_llist_ref is NULL. */ - if (find_win_for_buf(buf, &win, &tp) == OK && win->w_llist_ref != NULL) + if (find_win_for_buf(buf, &win, &tp) && win->w_llist_ref != NULL) return (char_u *)_(msg_loclist); else return (char_u *)_(msg_qflist); @@ -4274,17 +4275,17 @@ char_u *buf_spname(buf_T *buf) /* * Find a window for buffer "buf". - * If found OK is returned and "wp" and "tp" are set to the window and tabpage. - * If not found FAIL is returned. + * If found true is returned and "wp" and "tp" are set to the window and tabpage. + * If not found false is returned. */ -int find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp) +bool find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp) { FOR_ALL_TAB_WINDOWS(*tp, *wp) { if ((*wp)->w_buffer == buf) { - return OK; + return true; } } - return FAIL; + return false; } /* |