bug: float.default = true creates duplicate windows #282

Closed
opened 2026-03-30 17:29:11 +00:00 by llakala · 1 comment
llakala commented 2026-03-30 17:29:11 +00:00

Prerequisites

Neovim version

NVIM v0.12.0-dev
Build type: Release
LuaJIT 2.1.1741730670
Run "nvim -V1 -v" for more info

Operating system

NixOS Unstable

Description

The title ends up drawing over itself when using float.default:
Image
This seems to be because there's now two windows being drawn. When going to a parent directory and then typing <C-c>, the old window is revealed behind the new one. I assume that we're just not deleting an old window somewhere that we should.

Steps to reproduce

  1. Set your config to:
vim.g.canola = {
  float = {
    default = true,
  },
}
  1. Run :Canola
  2. Press - to navigate up a directory
  3. Observe that the window is drawing over itself

Minimal reproduction

Using the minimal reproduction template is giving me this error:

Error in /home/emanresu/Documents/projects/meovim/repro.lua:                                                                                       
E5113: Lua chunk: /home/emanresu/Documents/projects/meovim/repro.lua:3: module 'lazy.nvim' not found:                                              
        no field package.preload['lazy.nvim']                                                                                                      
        no file './lazy/nvim.lua'                                                                                                                  
        no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/luajit-2.1/lazy/nvim.lua'                                 
        no file '/usr/local/share/lua/5.1/lazy/nvim.lua'                                                                                           
        no file '/usr/local/share/lua/5.1/lazy/nvim/init.lua'                                                                                      
        no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/lua/5.1/lazy/nvim.lua'                                    
        no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/lua/5.1/lazy/nvim/init.lua'                               
        no file './lazy/nvim.so'                                                                                                                   
        no file '/usr/local/lib/lua/5.1/lazy/nvim.so'                                                                                              
        no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/lib/lua/5.1/lazy/nvim.so'                                       
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                
        no file './lazy.so'                                                                                                                        
        no file '/usr/local/lib/lua/5.1/lazy.so'                                                                                                   
        no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/lib/lua/5.1/lazy.so'                                            
        no file '/usr/local/lib/lua/5.1/loadall.so'

So not sure on this repro tester. But I'm pretty confident it's a Canola problem.

### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/canola.nvim/issues) - [x] I have updated to the latest version ### Neovim version ```text NVIM v0.12.0-dev Build type: Release LuaJIT 2.1.1741730670 Run "nvim -V1 -v" for more info ``` ### Operating system NixOS Unstable ### Description The title ends up drawing over itself when using `float.default`: <img width="581" height="59" alt="Image" src="https://github.com/user-attachments/assets/7b38c5bd-4499-4d88-a035-1aa01df5dd14" /> This seems to be because there's now two windows being drawn. When going to a parent directory and then typing `<C-c>`, the old window is revealed behind the new one. I assume that we're just not deleting an old window somewhere that we should. ### Steps to reproduce 1. Set your config to: ```lua vim.g.canola = { float = { default = true, }, } ``` 2. Run `:Canola` 3. Press `-` to navigate up a directory 4. Observe that the window is drawing over itself ### Minimal reproduction Using the minimal reproduction template is giving me this error: ```lua Error in /home/emanresu/Documents/projects/meovim/repro.lua: E5113: Lua chunk: /home/emanresu/Documents/projects/meovim/repro.lua:3: module 'lazy.nvim' not found: no field package.preload['lazy.nvim'] no file './lazy/nvim.lua' no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/luajit-2.1/lazy/nvim.lua' no file '/usr/local/share/lua/5.1/lazy/nvim.lua' no file '/usr/local/share/lua/5.1/lazy/nvim/init.lua' no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/lua/5.1/lazy/nvim.lua' no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/share/lua/5.1/lazy/nvim/init.lua' no file './lazy/nvim.so' no file '/usr/local/lib/lua/5.1/lazy/nvim.so' no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/lib/lua/5.1/lazy/nvim.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './lazy.so' no file '/usr/local/lib/lua/5.1/lazy.so' no file '/nix/store/zrmg8bj9lxkl7bi19k19jydk73xxk3rs-luajit-2.1.1741730670/lib/lua/5.1/lazy.so' no file '/usr/local/lib/lua/5.1/loadall.so' ``` So not sure on this repro tester. But I'm pretty confident it's a Canola problem.
barrettruth commented 2026-03-30 18:21:10 +00:00

😭 thanks for your patience - fixing htis and the minimal reproduction.

:sob: thanks for your patience - fixing htis and the minimal reproduction.
Sign in to join this conversation.
No description provided.