vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() (#28985)

Problem:  Can't use a blockwise selection with a width for getregion().
Solution: Add support for blockwise selection with width like the return
          value of getregtype() or the "regtype" value of TextYankPost
          (zeertzjq).

closes: vim/vim#14842

afc2295c22
This commit is contained in:
zeertzjq
2024-05-25 05:19:46 +08:00
committed by GitHub
parent 28c04948a1
commit 06347a64ca
5 changed files with 96 additions and 48 deletions

View File

@@ -3536,14 +3536,13 @@ function vim.fn.getreginfo(regname) end
--- The optional argument {opts} is a Dict and supports the
--- following items:
---
--- type Specify the region's selection type
--- (default: "v"):
--- "v" for |charwise| mode
--- "V" for |linewise| mode
--- "<CTRL-V>" for |blockwise-visual| mode
--- type Specify the region's selection type.
--- See |getregtype()| for possible values,
--- except it cannot be an empty string.
--- (default: "v")
---
--- exclusive If |TRUE|, use exclusive selection
--- for the end position
--- for the end position.
--- (default: follow 'selection')
---
--- You can get the last selection type by |visualmode()|.