matchparen: do not use hard-coded match id (#13393)
* matchparen: do not use hard-coded match id
Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().
For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).
closes: #13381
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 4fa26e0..983d995 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 9.0. Last change: 2023 Feb 04
+*pattern.txt* For Vim version 9.0. Last change: 2023 Oct 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1461,10 +1461,11 @@
Just like |:match| above, but set a separate match. Thus
there can be three matches active at the same time. The match
with the lowest number has priority if several match at the
- same position.
- The ":3match" command is used by the |matchparen| plugin. You
- are suggested to use ":match" for manual matching and
- ":2match" for another plugin.
+ same position. It uses the match id 3.
+ The ":3match" command is used by (older Vims) |matchparen|
+ plugin. You are suggested to use ":match" for manual matching
+ and ":2match" for another plugin or even better make use of
+ the more flexible |matchadd()| (and similar) functions instead.
==============================================================================
11. Fuzzy matching *fuzzy-matching*