stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.36k stars 91 forks source link

bug: cursor disappears after confirming dialog #438

Closed Arisa-Snowbell closed 2 days ago

Arisa-Snowbell commented 3 days ago

Did you check the docs and existing issues?

Neovim version (nvim -v)

0.10.0

Operating system/version

Linux

Describe the bug

After I do some changes, save, dialog to confirm appears and I confirm - the cursor disappears in the oil buffer. I think this b15e4c1e647b9ddbb75a31caeb720b3b3ce4db54 commit has something to do with it.

What is the severity of this bug?

tolerable (can work around it)

Steps To Reproduce

  1. open oil buffer
  2. make changes
  3. save to get confirm dialog
  4. confirm
  5. cursor invisible in oil buffer

Expected Behavior

for the cursor to be visible

Directory structure

No response

Repro

---

Did you check the bug with a clean config?

brattonross commented 2 days ago

This issue happens for me on b15e4c1, but not on b0a6cf9. I think you are correct that it has been introduced by #433

The cursor seems to disappear permanently in all buffers for me after opening an oil dialog in nvim v0.11.0-dev-329+g12c9791e0

stevearc commented 2 days ago

Does this reproduce for you with a minimal init.lua repro file? I don't see this behavior when I try with my config

Arisa-Snowbell commented 2 days ago

Actually no, that's really weird, but it seems more of us are having same issue so it must be something common.

Arisa-Snowbell commented 2 days ago

Removed all plugins from my config, still does it.

I am assuming its reproducible with this config:

vim.g.mapleader = ' '

local opt = vim.opt

opt.shortmess = opt.shortmess + 'I'
opt.smarttab = true
opt.fileencoding = "utf-8"
opt.encoding = "utf-8"
scriptencoding = "utf-8"
opt.relativenumber = true
opt.termguicolors = true
opt.number = true
opt.shell = "dash"
opt.wrap = false
opt.mouse = ""
opt.history = 10000
opt.undolevels = 10000
opt.undofile = true
opt.hlsearch = false
opt.hidden = true
opt.errorbells = false
opt.smartindent = true
opt.incsearch = true
opt.scrolloff = 8
opt.colorcolumn = "120"
opt.signcolumn = "number"
opt.guicursor = ""
opt.clipboard = "unnamedplus"
opt.splitright = true
opt.splitbelow = true
opt.list = true
opt.listchars = "tab:> ,nbsp:¬,extends:»,precedes:«,trail:•"
opt.updatetime = 100
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
Arisa-Snowbell commented 2 days ago

I think its "guicursor" being set to nothing

stevearc commented 2 days ago

Thanks, that was what I needed! Looks like the issue was https://github.com/neovim/neovim/issues/21018. I've added a hack to work around the problem