aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/searchhl_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-21 02:02:32 +0100
committerJustin M. Keyes <justinkz@gmail.com>2025-02-26 23:06:22 +0100
commitbe1fbe38b31b6046d396407c4efbf238941c6b08 (patch)
tree697a429f5ac903d766c2faaf5044fa7a16eeea77 /test/functional/ui/searchhl_spec.lua
parentf4921e2b7deb4812414998a521c33f920f571c20 (diff)
downloadrneovim-be1fbe38b31b6046d396407c4efbf238941c6b08.tar.gz
rneovim-be1fbe38b31b6046d396407c4efbf238941c6b08.tar.bz2
rneovim-be1fbe38b31b6046d396407c4efbf238941c6b08.zip
feat(lua): vim.text.indent()
Problem: Indenting text is a common task in plugins/scripts for presentation/formatting, yet vim has no way of doing it (especially "dedent", and especially non-buffer text). Solution: Introduce `vim.text.indent()`. It sets the *exact* indentation because that's a more difficult (and thus more useful) task than merely "increasing the current indent" (which is somewhat easy with a `gsub()` one-liner).
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r--test/functional/ui/searchhl_spec.lua42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 86490b4527..5479cf6ee6 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -73,10 +73,10 @@ describe('search highlighting', function()
-- 'hlsearch' is enabled by default. #2859
feed('gg/text<cr>')
screen:expect([[
- some {2:^text} |
- more {2:text}stuff |
- stupid{2:texttext}stuff |
- a {2:text} word |
+ some {2:^text} |
+ more {2:text}stuff |
+ stupid{2:texttext}stuff |
+ a {2:text} word |
|
{1:~ }|
/text |
@@ -85,10 +85,10 @@ describe('search highlighting', function()
-- overlapping matches not allowed
feed('3nx')
screen:expect([[
- some {2:text} |
- more {2:text}stuff |
- stupid{2:text}^extstuff |
- a {2:text} word |
+ some {2:text} |
+ more {2:text}stuff |
+ stupid{2:text}^extstuff |
+ a {2:text} word |
|
{1:~ }|
/text |
@@ -96,10 +96,10 @@ describe('search highlighting', function()
feed('ggn*') -- search for entire word
screen:expect([[
- some {2:text} |
- more textstuff |
- stupidtextextstuff |
- a {2:^text} word |
+ some {2:text} |
+ more textstuff |
+ stupidtextextstuff |
+ a {2:^text} word |
|
{1:~ }|
/\<text\> |
@@ -107,10 +107,10 @@ describe('search highlighting', function()
feed_command('nohlsearch')
screen:expect([[
- some text |
- more textstuff |
- stupidtextextstuff |
- a ^text word |
+ some text |
+ more textstuff |
+ stupidtextextstuff |
+ a ^text word |
|
{1:~ }|
:nohlsearch |
@@ -641,7 +641,7 @@ describe('search highlighting', function()
feed_command('/ial te')
screen:expect {
grid = [[
- very {5:spec^ial}{2: te}{6:xt} |
+ very {5:spec^ial}{2: te}{6:xt} |
|
{1:~ }|*4
{4:search hit BOTTOM, continuing at TOP} |
@@ -652,7 +652,7 @@ describe('search highlighting', function()
topline = 0,
botline = 3,
curline = 0,
- curcol = 11,
+ curcol = 9,
linecount = 2,
sum_scroll_delta = 0,
},
@@ -670,7 +670,7 @@ describe('search highlighting', function()
}
command('%foldopen')
screen:expect([[
- very {5:spec^ial}{2: te}{6:xt} |
+ very {5:spec^ial}{2: te}{6:xt} |
|
{1:~ }|*4
{4:search hit BOTTOM, continuing at TOP} |
@@ -678,7 +678,7 @@ describe('search highlighting', function()
feed_command('call clearmatches()')
screen:expect([[
- very spec{2:^ial te}xt |
+ very spec{2:^ial te}xt |
|
{1:~ }|*4
:call clearmatches() |
@@ -688,7 +688,7 @@ describe('search highlighting', function()
-- nonconflicting attributes are combined
feed_command('syntax keyword MyGroup special')
screen:expect([[
- very {5:spec}{7:^ial}{2: te}xt |
+ very {5:spec}{7:^ial}{2: te}xt |
|
{1:~ }|*4
:syntax keyword MyGroup special |