Comments (9)
Still can't reproduce. Since both noice and lualine are part of LazyVim which is used by thousands of people, I would also be very surprised there's an interop issue there.
Feel free to open an issue in the noice repo with a minimal repro as instructed in the issue template.
from lualine.nvim.
Added some guards around the failing line and it seems to clear this up:
diff --git a/lua/lualine.lua b/lua/lualine.lua
index 6093049..e75f79e 100644
--- a/lua/lualine.lua
+++ b/lua/lualine.lua
@@ -426,8 +426,13 @@ local function refresh(opts)
and vim.fn.win_gettype(refresh_real_curwin) == 'popup'
and refresh_real_curwin
or win
- local stl_cur = vim.api.nvim_win_call(refresh_real_curwin, M.statusline)
+
+ local win_is_num = type(refresh_real_curwin) == "number"
+ local win_is_valid = win_is_num and vim.api.nvim_win_is_valid(refresh_real_curwin)
+
+ local stl_cur = win_is_valid and vim.api.nvim_win_call(refresh_real_curwin, M.statusline) or ""
local stl_last = modules.nvim_opts.get_cache('statusline', { window = set_win })
+
if stl_cur or stl_last then
modules.nvim_opts.set('statusline', stl_cur, { window = set_win })
end
There's probably a better fix that would answer why refresh_real_curwin
is ocassionally:
- nil
- an invalid window id (perhaps a race happening somewhere?)
from lualine.nvim.
@liath Indeed this fix kind of works, but is hiding the status line.
@folke is there something that can be related to Noice?
Regardless of how many splits are there, the Invalid window id: 1001
is always the error cause.
from lualine.nvim.
I reverted my change to see if I could find a better solution but can't seem to reproduce now. I pulled updates fwiw, maybe it'll help you @refLog2112
from lualine.nvim.
I dont see this issse. What are the exact steps to reproduce this using Noice and lualine?
from lualine.nvim.
@folke Here are the steps with a little demo
from lualine.nvim.
The issue seems to be a job started with plenary. Closing this issue.
from lualine.nvim.
@refLog2112 Running into the same issue. Would you mind sharing what your fix was?
from lualine.nvim.
@AlexvZyl I see that you have also a plenary job that does the git compare and put it the lualine. Actually, I just disabled that section for now, and all was fine.
-- Run job to get git.
local result = Job:new({
command = 'git',
cwd = curr_dir,
args = { 'rev-list', '--left-right', '--count', 'HEAD...@{upstream}' },
})
:sync(100)[1]
{
U.get_git_compare,
separator = ' ',
padding = 0,
color = text_hl,
},
My guess is that plenary creates a window id which no longer exists after the job is done.
from lualine.nvim.
Related Issues (20)
- Bug: User runtime path doesn't have priority on Windows
- Feat: Show tab number by default unless the tab is renamed HOT 1
- Feat: More flexible way to disable lualine or enable extensions
- Bug: flickering / blinking when `globalstatus = true` HOT 1
- docs: typo on wiki HOT 1
- Bug: Icons show white separator HOT 1
- Bug: on_click option not working in components 'buffers' and 'tabs'
- Feat: Ability to use extensions in winbars and tabline
- Question how to not override DAP UI control buttons? HOT 3
- Bug: evil_lualine little padding...
- Bug: fugitive extension sets statusline but not tabline
- Bug: globalstatus attribute display error
- Bug: Git diff doesn't work if file name contains spaces
- Feat: Optimize counting of diagnostics with new `vim.diagnostic.count()` (nvim 0.10+)
- Bug: quickfix extension crashes on %
- Bug: Lualine configurations are not applied HOT 2
- Bug: Hitting <C-l> does not immediately clear results from searchcount component
- Bug: q! is very slowly
- Bug: fugitive file is same as normal file if path=0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lualine.nvim.