aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index f0eeca2f10..0653a51f96 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -4414,6 +4414,31 @@ M.funcs = {
returns = 'string[]',
signature = 'getregion({pos1}, {pos2} [, {opts}])',
},
+ getregionpos = {
+ args = { 2, 3 },
+ base = 1,
+ desc = [=[
+ Same as |getregion()|, but returns a list of positions
+ describing the buffer text segments bound by {pos1} and
+ {pos2}.
+ The segments are a pair of positions for every line: >
+ [[{start_pos}, {end_pos}], ...]
+ <
+ The position is a |List| with four numbers:
+ [bufnum, lnum, col, off]
+ "bufnum" is the buffer number.
+ "lnum" and "col" are the position in the buffer. The first
+ column is 1.
+ The "off" number is zero, unless 'virtualedit' is used. Then
+ it is the offset in screen columns from the start of the
+ character. E.g., a position within a <Tab> or after the last
+ character.
+ ]=],
+ name = 'getregionpos',
+ params = { { 'pos1', 'table' }, { 'pos2', 'table' }, { 'opts', 'table' } },
+ returns = 'integer[][][]',
+ signature = 'getregionpos({pos1}, {pos2} [, {opts}])',
+ },
getregtype = {
args = { 0, 1 },
base = 1,