Skip to content

Commit

Permalink
setl matchpairs=
Browse files Browse the repository at this point in the history
To avoid highlighting of [ and ] in the floating windows. This started
as of Neovim #21227. The same handling was added for Vim as a
precaution. Although it had the same patch, the issue was not present.
  • Loading branch information
dstein64 committed Apr 13, 2023
1 parent 5b4356e commit 6638aad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions autoload/win.vim
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ function! s:OpenPopup(text, highlight, row, col)
\ 'col': a:col,
\ }
let l:winid = popup_create(a:text, l:options)
let l:buf = winbufnr(l:winid)
call setbufvar(l:buf, '&matchpairs', '')
elseif s:floatwin
if has_key(s:, 'floatwin_avail_bufnrs') && len(s:floatwin_avail_bufnrs) > 0
let l:buf = s:floatwin_avail_bufnrs[-1]
call remove(s:floatwin_avail_bufnrs, -1)
if has_key(s:, 'floatwin_avail_bufnrs') && !empty(s:floatwin_avail_bufnrs)
let l:buf = remove(s:floatwin_avail_bufnrs, -1)
else
let l:buf = nvim_create_buf(0, 1)
call nvim_buf_set_option(l:buf, 'matchpairs', '')
endif
call nvim_buf_set_lines(l:buf, 0, -1, 1, [a:text])
let l:options = {
Expand Down

0 comments on commit 6638aad

Please sign in to comment.