Mercurial > vim
comparison runtime/doc/builtin.txt @ 30570:86683eee58ac v9.0.0620
patch 9.0.0620: matchaddpos() can only add up to 8 matches
Commit: https://github.com/vim/vim/commit/50faf02f43d7f1a56ec2023028fca7c72dbce83e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 29 12:50:17 2022 +0100
patch 9.0.0620: matchaddpos() can only add up to 8 matches
Problem: matchaddpos() can only add up to 8 matches.
Solution: Allocate the array of positions. (closes https://github.com/vim/vim/issues/11248)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 29 Sep 2022 14:00:09 +0200 |
parents | 0827d3d6d8c0 |
children | 66de6909e102 |
comparison
equal
deleted
inserted
replaced
30569:c9568bf9c963 | 30570:86683eee58ac |
---|---|
5916 |col()| would return). The character at this position will | 5916 |col()| would return). The character at this position will |
5917 be highlighted. | 5917 be highlighted. |
5918 - A list with three numbers, e.g., [23, 11, 3]. As above, but | 5918 - A list with three numbers, e.g., [23, 11, 3]. As above, but |
5919 the third number gives the length of the highlight in bytes. | 5919 the third number gives the length of the highlight in bytes. |
5920 | 5920 |
5921 The maximum number of positions in {pos} is 8. | |
5922 | |
5923 Returns -1 on error. | 5921 Returns -1 on error. |
5924 | 5922 |
5925 Example: > | 5923 Example: > |
5926 :highlight MyGroup ctermbg=green guibg=green | 5924 :highlight MyGroup ctermbg=green guibg=green |
5927 :let m = matchaddpos("MyGroup", [[23, 24], 34]) | 5925 :let m = matchaddpos("MyGroup", [[23, 24], 34]) |