diff options
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 4eefb29b17..7b6f82569a 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -808,16 +808,37 @@ describe(":substitute, inccommand=split", function() ]]) end) - it("'hlsearch' highlights the substitution, 'cursorline' does not", function() - execute("set hlsearch") - execute("set cursorline") -- Should NOT appear in the preview window. - feed(":%s/tw") + it("'hlsearch' is active, 'cursorline' is not", function() + execute("set hlsearch cursorline") + feed("gg") + + -- Assert that 'cursorline' is active. screen:expect([[ + {16:^Inc substitution on }| + two lines | Inc substitution on | - {9:tw}{16:o lines }| + two lines | | {15:~ }| {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :set hlsearch cursorline | + ]]) + + feed(":%s/tw") + -- 'cursorline' is NOT active during preview. + screen:expect([[ + Inc substitution on | + {9:tw}o lines | + Inc substitution on | + {9:tw}o lines | + | {11:[No Name] [+] }| |2| {9:tw}o lines | |4| {9:tw}o lines | |