Comments (3)
The file entry structure existed before the API, but some things were changed during that time.
The error seems to occur because the winnr
is somehow invalid, which seems strange because I validate and restore the window layout if it's broken before loading buffers. What is even stranger is that the error indicates that the winnr
is neither a number nor a string, but it's still able to be concatenated with the lua string in this line:
diffview.nvim/lua/diffview/file-entry.lua
Line 133 in 0589dc1
This is very difficult to fix without a reproducible scenario, it would be very helpful if you could provide a tarball of a git repo and a commit SHA where this happens.
Otherwise could you at least show the output after you get the error, having applied this patch:
diff --git a/lua/diffview/file-entry.lua b/lua/diffview/file-entry.lua
index 67fca87..246b3ae 100644
--- a/lua/diffview/file-entry.lua
+++ b/lua/diffview/file-entry.lua
@@ -130,6 +130,7 @@ function FileEntry:load_buffers(git_root, left_winid, right_winid)
table.insert(self.created_bufs, bn)
a.nvim_win_set_buf(split.winid, bn)
split.bufid = bn
+ print(vim.inspect(winnr), split.winid, a.nvim_win_is_valid(split.winid), vim.inspect(a.nvim_tabpage_list_wins(0)))
vim.cmd(winnr .. "windo filetype detect")
end
This might at least help figure out what's going on with the winnr
.
from diffview.nvim.
@sindrets will try and get the output for you 👍🏾 it could very well be something strange on my system or config since it seemed to happen regardless of the repository. But I'll dig in and feedback.
from diffview.nvim.
Not sure if this was spurious or due to some config changes I made on my system or what but I haven't been able to reproduce this so I'm going to close this for now as a fluke. If it recurs I'll post back here but it hasn't so far (I mess around with my config a lot so could very easily have been something I did)
from diffview.nvim.
Related Issues (20)
- [features] Quickily close CommitLogView
- [Bug] CTRL-W_T does not move focus to new tab
- [Question] How to open entry of the file panel via lua/command? HOT 1
- [Bug] E5560 on DiffviewOpen `nvim_buf_is_valid must not be called in a lua loop callback`
- No syntax highlighting for changed / deleted / updated lines HOT 2
- [Question] Diff view outside of the multiple repos?
- [Bug] Attempt to index nil when pressing <CR> on first line of keymap popup
- Reverse the order of commits when running `:DiffviewFileHistory --range=origin..HEAD` ? HOT 1
- How to just diff split the current buffer? HOT 1
- [feat][would write PR] use vim.notify for user notifications
- Any way to diff two local folder?
- Feature Idea: Open Commit in Browser
- [Feature Request] Always display the the `Change` and `Staged Change` section
- Feature Idea: Show Changes with git --stat HOT 1
- Feature Request: Close Keymaps for Commit Log Panel
- Feature Request: Toggle Diffview Action HOT 1
- Feature Request: Different Colors for Pushed / Unpushed Changes
- [Question]: view commits changing a file and include other file changes as well
- [Feature Request]
- [Bug] nightly nvim: DiffViewOpen fails to open HOT 5
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 diffview.nvim.