Skip to content

Commit

Permalink
improv: highlight cursor only for nvim < 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ggandor committed Mar 20, 2024
1 parent 9441924 commit 04f744b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/flit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ local function flit(f_args)
-- Custom targets callback, ~90% of it replicating what Leap does by default.

local function get_input()
vim.cmd('echo ""')
local hl = require('leap.highlight')
if vim.v.count == 0 and not (f_args.unlabeled and vim.fn.mode(1):match('o')) then
hl['apply-backdrop'](hl, l_args.backward)
end
hl['highlight-cursor'](hl)
if vim.fn.has('nvim-0.10') == 0 then -- leap#70
hl['highlight-cursor'](hl)
end
vim.cmd('redraw')
local ch = require('leap.util')['get-input-by-keymap']({str = '>'})
hl['cleanup'](hl, { vim.fn.win_getid() })
Expand Down

0 comments on commit 04f744b

Please sign in to comment.