Skip to content
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

bug: screen flicker when search witn incsearch on #679

Open
3 tasks done
jackielii opened this issue Dec 25, 2023 · 16 comments
Open
3 tasks done

bug: screen flicker when search witn incsearch on #679

jackielii opened this issue Dec 25, 2023 · 16 comments
Labels
bug Something isn't working stale

Comments

@jackielii
Copy link

jackielii commented Dec 25, 2023

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-1954+g0a598c13b-Homebrew

Operating system/version

macOS 14.0

Describe the bug

I tried stable version of nvim v0.9.4, the issue is not here. With latest nightly, when search with incsearch on, and the word being searched NOT being on screen, the screen flickers

Steps To Reproduce

  1. set incsearch
  2. search a word that's currently not on the screen

Expected Behavior

No flicker.

Also I searched existing issues and seems #3 flickers in the search window, while this flicker is on the main buffer window

Screen.Recording.2023-12-25.at.22.28.29.mov

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "folke/noice.nvim",
    event = "VeryLazy",
    dependencies = {
      -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
      "MunifTanjim/nui.nvim",
      -- OPTIONAL:
      --   `nvim-notify` is only needed, if you want to use the notification view.
      --   If not available, we use `mini` as the fallback
      "rcarriga/nvim-notify",
    },
    opts = {
      presets = {
        bottom_search = true, -- use a classic bottom cmdline for search
        command_palette = false, -- position the cmdline and popupmenu together
        long_message_to_split = true, -- long messages will be sent to a split
        inc_rename = false, -- enables an input dialog for inc-rename.nvim
        lsp_doc_border = true, -- add a border to hover docs and signature help
      },
    },
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Screencast

re-recorded with repo.lua and example file:

flicker.mp4
@jackielii jackielii added the bug Something isn't working label Dec 25, 2023
@roycrippen4
Copy link

roycrippen4 commented Dec 29, 2023

I am also having the same issue on nightly. My screen is flickering in the exact same way as yours @jackielii. It seems like the normal hlsearch behavior of moving the viewport to whatever match it finds is battling with the noice renderer or something. It looks like the viewport is jumping to the match, but noice is trying to pull the viewport back to the original cursor position from when you enter the commandline to initiate the search.

@roycrippen4
Copy link

This issue should be closed. The flickering has stopped since the 0.9.5 release. This is likely an upstream issue and not an issue with noice.

@jackielii
Copy link
Author

I can confirm this doesn't happen on latest HEAD anymore

@yifan0414
Copy link

Encountered the same issue on the Nightly version. When I set nohlsearch, flicker disappear. If not, there will be.

@yifan0414
Copy link

disable noice back to noraml, reopen this issue?

@simeonoff
Copy link

Seems this issue is reproducible with NVIM v0.10.0-dev-2699+gd6f406db4 on macOS.

@jackielii
Copy link
Author

Yes, it's happening again

@jackielii jackielii reopened this Mar 26, 2024
@yavorski
Copy link

Happening/Reproducible again with stable v0.10 now.

yavorski added a commit to yavorski/dotfiles that referenced this issue May 20, 2024
* mini.comment - built in
* diagnostics keaymaps - built in
* update nvim-ts-autotag - does not rely on tree-sitter now
* neovide font sizes changed to floating points instead of pixels
* remove tree-sitter playground
* disable noice - folke/noice.nvim#679
@folke
Copy link
Owner

folke commented May 20, 2024

Will be fixed by neovim/neovim#27950

yavorski added a commit to yavorski/dotfiles that referenced this issue May 20, 2024
* mini.comment - built in - `gc`
* lsp hover - built in - `K`
* diagnostics keymaps - built in - `[d`, `]d`
* update nvim-ts-autotag - does not rely on tree-sitter now
* remove tree-sitter playground
* neovide font sizes changed to floating points instead of pixels
* disable noice - folke/noice.nvim#679
@net
Copy link

net commented Jun 2, 2024

I now get severe flickering of the hlsearch highlight itself when searching on the latest neovim master.

@folke
Copy link
Owner

folke commented Jun 3, 2024

Yeah, noticed that as well. Going back/forward with the cursor during substitute also doesnt work properly.
There's more work being done regarding these things in core.
Hopefully that gets resolved soon

@net
Copy link

net commented Jun 3, 2024

So is everyone on neovim 0.10 with noice just living with the flickers, or is there a workaround I'm missing?

@folke
Copy link
Owner

folke commented Jun 3, 2024

I only see the flickering when lsp progress is doing something. Besides that I dont see it

@folke
Copy link
Owner

folke commented Jun 4, 2024

I just pushed an update that should result in less flickering of hlsearch. Let me know if it helps!

b0ae989c added a commit to b0ae989c/noice.nvim that referenced this issue Jun 4, 2024
@net
Copy link

net commented Jun 5, 2024

Definitely seems much better with 4.0.1 and the latest neovim master! Thank you!

Copy link
Contributor

github-actions bot commented Jul 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

7 participants