-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No highlight with forward leap on last line in buffer #248
Comments
I think this can be the quickfix diff --git a/lua/leap/highlight.lua b/lua/leap/highlight.lua
index 753d403..09040bf 100644
--- a/lua/leap/highlight.lua
+++ b/lua/leap/highlight.lua
@@ -58,8 +58,10 @@ M["apply-backdrop"] = function(self, backward_3f, _3ftarget_windows)
local function _11_()
if backward_3f then
return {{win_top, 0}, {curline, curcol}}
- else
+ elseif curline ~= win_bot then
return {{curline, inc(curcol)}, {win_bot, -1}}
+ else
+ return {{curline, inc(curcol)}, {win_bot, vim.fn.col("$")}}
end
end
local _let_12_ = _11_() With debug prints, on last line we were highlight from f.e. from print(string.format("start = (%d, %d), finish = (%d, %d)", start[1], start[2], finish[1], finish[2])) before |
This also works diff --git a/lua/leap/highlight.lua b/lua/leap/highlight.lua
index 753d403..403bb7c 100644
--- a/lua/leap/highlight.lua
+++ b/lua/leap/highlight.lua
@@ -59,7 +59,7 @@ M["apply-backdrop"] = function(self, backward_3f, _3ftarget_windows)
if backward_3f then
return {{win_top, 0}, {curline, curcol}}
else
- return {{curline, inc(curcol)}, {win_bot, -1}}
+ return {{curline, inc(curcol)}, {win_bot + 1, -1}}
end
end
local _let_12_ = _11_() But highlighting after last line feels a bit hacky |
Hi, thanks for the report! I can reproduce on 0.10.1 stable, but the problem seems to be fixed on 0.11. |
Oh, I'm on 0.10.1. Out of curiosity I checked that they added explicit check for |
As in title, if I press "s" for forward leap while cursor is on last line in the file, no highlighting is applied (neither text becomes grey via link to Comment nor possible targets are purple/pink).
Same goes for f/t from flit (but S/F/T work in first and last line in buffer).
The text was updated successfully, but these errors were encountered: