bug: cursor stuck/disappears briefly for each edit #68

Closed
opened 2026-02-10 15:50:45 -06:00 by joshuali925 · 3 comments
joshuali925 commented 2026-02-10 15:50:45 -06:00 (Migrated from github.com)

Did you check docs and existing issues?

  • I have read all the haunt.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of haunt.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0

Operating system/version

MacOS

Describe the bug

after adding annotation, if i make any edit in normal mode (e.g. press x), the cursor disappears for half a second after about half a second

Steps To Reproduce

  1. run nvim -u repro.lua repro.lua
  2. press x, cursor does not blink
  3. press a and add annotation
  4. press x
  5. see cursor blinks once

Expected Behavior

cursor should not blink since it can be distracting

more context: i believe it's related to github.com/TheNoeTrevino/haunt.nvim@cc21621800/lua/haunt/persistence.lua (L160-L176) keep calling get_git_root and get_git_branch

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
    spec = {
        {
            "TheNoeTrevino/haunt.nvim",
            opts = {},
            init = function()
                local haunt = require("haunt.api")
                local map = vim.keymap.set
                map("n", "a", function()
                    haunt.annotate()
                end, { desc = "Annotate" })
            end,
        },
        -- add any other plugins here
    },
})
### Did you check docs and existing issues? - [x] I have read all the haunt.nvim docs - [x] I have updated the plugin to the latest version before submitting this issue - [x] I have searched the existing issues of haunt.nvim - [x] I have searched the existing issues of plugins related to this issue ### Neovim version (nvim -v) NVIM v0.11.0 ### Operating system/version MacOS ### Describe the bug after adding annotation, if i make any edit in normal mode (e.g. press `x`), the cursor disappears for half a second after about half a second ### Steps To Reproduce 1. run `nvim -u repro.lua repro.lua` 2. press `x`, cursor does not blink 3. press `a` and add annotation 4. press `x` 5. see cursor blinks once ### Expected Behavior cursor should not blink since it can be distracting more context: i believe it's related to https://github.com/TheNoeTrevino/haunt.nvim/blob/cc21621800abea48ccef6ffd0331c3ec54e1d6a3/lua/haunt/persistence.lua#L160-L176 keep calling `get_git_root` and `get_git_branch` ### Repro ```lua vim.env.LAZY_STDPATH = ".repro" load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() require("lazy.minit").repro({ spec = { { "TheNoeTrevino/haunt.nvim", opts = {}, init = function() local haunt = require("haunt.api") local map = vim.keymap.set map("n", "a", function() haunt.annotate() end, { desc = "Annotate" }) end, }, -- add any other plugins here }, }) ```
Owner

@joshuali925
Are you exaggerating when you say half a second? I am seeing a small flicker.

@joshuali925 Are you exaggerating when you say half a second? I am seeing a small flicker.
Owner

You were right! I dont see it anymore. Can you switch your branch to nightly and test?

On lazy, its { branch = "nightly" }.

Let me know if it works as expected so i can close this out!

You were right! I dont see it anymore. Can you switch your branch to nightly and test? On lazy, its `{ branch = "nightly" }`. Let me know if it works as expected so i can close this out!
joshuali925 commented 2026-02-23 11:20:45 -06:00 (Migrated from github.com)

@TheNoeTrevino nice, it worked for me as well, thanks!

Are you exaggerating when you say half a second?

My guess is that it depends on CPU and the size of the git repo you are currently in

@TheNoeTrevino nice, it worked for me as well, thanks! > Are you exaggerating when you say half a second? My guess is that it depends on CPU and the size of the git repo you are currently in
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/haunt.nvim#68
No description provided.