mirror of
https://github.com/neovim/neovim.git
synced 2026-07-20 16:11:58 +00:00
vim-patch:8.1.1084: cannot delete a match from another window (#12325)
Problem: Cannot delete a match from another window. (Paul Jolly)
Solution: Add window ID argument to matchdelete(), clearmatches(),
getmatches() and setmatches(). (Andy Massimino, closes vim/vim#4178)
aff749145e
This commit is contained in:
@@ -2059,7 +2059,7 @@ chanclose({id}[, {stream}]) Number Closes a channel or one of its streams
|
||||
chansend({id}, {data}) Number Writes {data} to channel
|
||||
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches() none clear all matches
|
||||
clearmatches([{win}]) none clear all matches
|
||||
col({expr}) Number column nr of cursor or mark
|
||||
complete({startcol}, {matches}) none set Insert mode completion
|
||||
complete_add({expr}) Number add completion match
|
||||
@@ -2167,7 +2167,7 @@ getjumplist([{winnr} [, {tabnr}]])
|
||||
getline({lnum}) String line {lnum} of current buffer
|
||||
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
|
||||
getloclist({nr} [, {what}]) List list of location list items
|
||||
getmatches() List list of current matches
|
||||
getmatches([{win}]) List list of current matches
|
||||
getpid() Number process ID of Vim
|
||||
getpos({expr}) List position of cursor, mark, etc.
|
||||
getqflist([{what}]) List list of quickfix items
|
||||
@@ -2259,7 +2259,7 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
||||
matchaddpos({group}, {list}[, {priority}[, {id}]])
|
||||
Number highlight positions with {group}
|
||||
matcharg({nr}) List arguments of |:match|
|
||||
matchdelete({id}) Number delete match identified by {id}
|
||||
matchdelete({id} [, {win}]) Number delete match identified by {id}
|
||||
matchend({expr}, {pat}[, {start}[, {count}]])
|
||||
Number position where {pat} ends in {expr}
|
||||
matchlist({expr}, {pat}[, {start}[, {count}]])
|
||||
@@ -2352,7 +2352,7 @@ setfperm({fname}, {mode} Number set {fname} file permissions to {mode}
|
||||
setline({lnum}, {line}) Number set line {lnum} to {line}
|
||||
setloclist({nr}, {list}[, {action}[, {what}]])
|
||||
Number modify location list using {list}
|
||||
setmatches({list}) Number restore a list of matches
|
||||
setmatches({list} [, {win}]) Number restore a list of matches
|
||||
setpos({expr}, {list}) Number set the {expr} position to {list}
|
||||
setqflist({list}[, {action}[, {what}]]
|
||||
Number modify quickfix list using {list}
|
||||
@@ -3005,9 +3005,11 @@ cindent({lnum}) *cindent()*
|
||||
When {lnum} is invalid -1 is returned.
|
||||
See |C-indenting|.
|
||||
|
||||
clearmatches() *clearmatches()*
|
||||
Clears all matches previously defined for the current window
|
||||
by |matchadd()| and the |:match| commands.
|
||||
clearmatches([{win}]) *clearmatches()*
|
||||
Clears all matches previously defined for the current window
|
||||
by |matchadd()| and the |:match| commands.
|
||||
If {win} is specified, use the window with this number or
|
||||
window ID instead of the current window.
|
||||
|
||||
*col()*
|
||||
col({expr}) The result is a Number, which is the byte index of the column
|
||||
@@ -4602,7 +4604,7 @@ getloclist({nr},[, {what}]) *getloclist()*
|
||||
field is applicable only when called from a location list
|
||||
window.
|
||||
|
||||
getmatches() *getmatches()*
|
||||
getmatches([{win}]) *getmatches()*
|
||||
Returns a |List| with all matches previously defined for the
|
||||
current window by |matchadd()| and the |:match| commands.
|
||||
|getmatches()| is useful in combination with |setmatches()|,
|
||||
@@ -5943,7 +5945,7 @@ matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
|
||||
Defines a pattern to be highlighted in the current window (a
|
||||
"match"). It will be highlighted with {group}. Returns an
|
||||
identification number (ID), which can be used to delete the
|
||||
match using |matchdelete()|.
|
||||
match using |matchdelete()|. The ID is bound to the window.
|
||||
Matching is case sensitive and magic, unless case sensitivity
|
||||
or magicness are explicitly overridden in {pattern}. The
|
||||
'magic', 'smartcase' and 'ignorecase' options are not used.
|
||||
@@ -6043,11 +6045,13 @@ matcharg({nr}) *matcharg()*
|
||||
Highlighting matches using the |:match| commands are limited
|
||||
to three matches. |matchadd()| does not have this limitation.
|
||||
|
||||
matchdelete({id}) *matchdelete()* *E802* *E803*
|
||||
matchdelete({id} [, {win}) *matchdelete()* *E802* *E803*
|
||||
Deletes a match with ID {id} previously defined by |matchadd()|
|
||||
or one of the |:match| commands. Returns 0 if successful,
|
||||
otherwise -1. See example for |matchadd()|. All matches can
|
||||
be deleted in one operation by |clearmatches()|.
|
||||
If {win} is specified, use the window with this number or
|
||||
window ID instead of the current window.
|
||||
|
||||
matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
|
||||
Same as |match()|, but return the index of first character
|
||||
@@ -7420,11 +7424,13 @@ setloclist({nr}, {list}[, {action}[, {what}]]) *setloclist()*
|
||||
only the items listed in {what} are set. Refer to |setqflist()|
|
||||
for the list of supported keys in {what}.
|
||||
|
||||
setmatches({list}) *setmatches()*
|
||||
setmatches({list} [, {win}]) *setmatches()*
|
||||
Restores a list of matches saved by |getmatches() for the
|
||||
current window|. Returns 0 if successful, otherwise -1. All
|
||||
current matches are cleared before the list is restored. See
|
||||
example for |getmatches()|.
|
||||
If {win} is specified, use the window with this number or
|
||||
window ID instead of the current window.
|
||||
|
||||
*setpos()*
|
||||
setpos({expr}, {list})
|
||||
|
||||
Reference in New Issue
Block a user