hydra.nvim icon indicating copy to clipboard operation
hydra.nvim copied to clipboard

Bug: When reaching top of buffer amaranth hydra exits.

Open Aleod-m opened this issue 2 years ago • 1 comments

Upon reaching of the top of the buffer using u in this hydra it exits but the hint is still present. No error seems to happen.

Hydra({
     name = "Move",
     mode = "n", 
     body = "<Space>z",
     config = {
         timeout = false,
         color = 'amaranth',
     },
     heads = {
        -- Move Up and Down 
        { "u"    , "<C-u>"},
        { "d"    , "<C-d>", {desc = "^/v"} },
        { "l"    , "zh"},
        { "r"    , "zl", {desc = "</>"}},

        -- Move Faster
        { "U"    , "<C-b>"},
        { "D"    , "<C-f>", {desc = "page ^/v"}},
        { "R"    , "zL"},
        { "L"    , "zR", {desc = "half screen </>"}},

        -- Move view around cursor
        { "t"    , "zt"},
        { "b"    , "zb", {desc = "around line ^/v"}},
        { "m"    , "zz", {desc = "middle"}},
        { "l"    , "zs"},
        { "r"    , "ze", {desc = "</>"}},
    },
})

Aleod-m avatar Jul 05 '22 09:07 Aleod-m

I have similar problem, hydra exit upon reaching of the top or the end of the buffer, without error.

local scroll = Hydra({ mode = 'n', heads = {
    { 'u', '5k' },
    { 'e', '5j' },
  } })

  map({ 'n', 'x' }, "<C-e>", function() scroll:activate() fn.execute("normal! 5j") end)
  map({ 'n', 'x' }, "<C-u>", function() scroll:activate() fn.execute("normal! 5k") end)

Runeword avatar Sep 11 '22 20:09 Runeword

I finally figured out how to fix it!

anuvyklack avatar Sep 18 '22 15:09 anuvyklack