fix(treesitter): no injection highlighting on last line #36951

Problem:
If the last visible line in a window is not fully displayed, this line
may not get injection highlighting. This happens because line('w$')
actually means the last *completely displayed* line.

Solution:
Use line('w$') + 1 for the botline.

This reverts 4244a96774
"test: fix failing lsp/utils_spec #36609",
which changed the test based on the wrong behavior.
This commit is contained in:
Jaehwang Jung
2025-12-15 09:01:49 +09:00
committed by GitHub
parent 592582ba48
commit 63737e6e73
2 changed files with 6 additions and 3 deletions

View File

@@ -357,7 +357,7 @@ describe('vim.lsp.util', function()
screen:expect([[
^ |
┌─────────┐{1: }|
│{101:local foo}│{1: }|
│{100:local}{101: }{102:foo}│{1: }|
└─────────┘{1: }|
{1:~ }|*9
|
@@ -384,7 +384,7 @@ describe('vim.lsp.util', function()
screen:expect([[
^ |
┌─────────┐{1: }|
│{101:local foo}│{1: }|
│{100:local}{101: }{102:foo}│{1: }|
└─────────┘{1: }|
{1:~ }|*9
|