diff options
-rw-r--r-- | src/nvim/buffer.c | 9 | ||||
-rw-r--r-- | src/nvim/option.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 9806623433..c05090bbf6 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1741,12 +1741,15 @@ int buflist_findpat( int toggledollar; if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) { - if (*pattern == '%') + if (*pattern == '%') { match = curbuf->b_fnum; - else + } else { match = curwin->w_alt_fnum; - if (diffmode && !diff_mode_buf(buflist_findnr(match))) + } + buf_T *found_buf = buflist_findnr(match); + if (diffmode && !(found_buf && diff_mode_buf(found_buf))) { match = -1; + } } /* * Try four ways of matching a listed buffer: diff --git a/src/nvim/option.c b/src/nvim/option.c index 4bf7ec5405..0f6874e941 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2077,7 +2077,7 @@ static void didset_options2(void) (void)highlight_changed(); // Parse default for 'clipboard'. - opt_strings_flags(p_cb, p_cb_values, &cb_flags, true); + (void)opt_strings_flags(p_cb, p_cb_values, &cb_flags, true); // Parse default for 'fillchars'. (void)set_chars_option(&p_fcs); |