mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
vim-patch:8.1.1739: deleted match highlighting not updated in other window
Problem: Deleted match highlighting not updated in other window.
Solution: Mark the window for refresh. (closes vim/vim#4720) Also fix that
ambi-width check clears with wrong attributes.
06029a857a
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
" Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(),
|
" Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(),
|
||||||
" matchaddpos(), matcharg(), matchdelete(), and setmatches().
|
" matchaddpos(), matcharg(), matchdelete(), and setmatches().
|
||||||
|
|
||||||
|
source screendump.vim
|
||||||
|
|
||||||
function Test_match()
|
function Test_match()
|
||||||
highlight MyGroup1 term=bold ctermbg=red guibg=red
|
highlight MyGroup1 term=bold ctermbg=red guibg=red
|
||||||
highlight MyGroup2 term=italic ctermbg=green guibg=green
|
highlight MyGroup2 term=italic ctermbg=green guibg=green
|
||||||
@@ -248,4 +250,26 @@ func Test_matchaddpos_using_negative_priority()
|
|||||||
set hlsearch&
|
set hlsearch&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_matchdelete_other_window()
|
||||||
|
if !CanRunVimInTerminal()
|
||||||
|
throw 'Skipped: cannot make screendumps'
|
||||||
|
endif
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
call setline(1, 'Hello Vim world')
|
||||||
|
let mid = matchadd('Error', 'world', 1)
|
||||||
|
let winid = win_getid()
|
||||||
|
new
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XscriptMatchDelete')
|
||||||
|
let buf = RunVimInTerminal('-S XscriptMatchDelete', #{rows: 12})
|
||||||
|
call term_wait(buf)
|
||||||
|
call term_sendkeys(buf, ":call matchdelete(mid, winid)\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_matchdelete_1', {})
|
||||||
|
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('XscriptMatchDelete')
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -6680,7 +6680,7 @@ int match_delete(win_T *wp, int id, int perr)
|
|||||||
rtype = VALID;
|
rtype = VALID;
|
||||||
}
|
}
|
||||||
xfree(cur);
|
xfree(cur);
|
||||||
redraw_later(rtype);
|
redraw_win_later(wp, rtype);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user