Comments (18)
Been using for a while, didn't seem to happen anymore. I guess it should be safe to close it, sorry for the delay in answering.
from neogit.
@bfredl do you know what could cause this? I can sometimes reproduce this 100% (when certain conditions are met, which I don't know yet) on windows, but never on linux.
Doing <from>,<to>fold
is the source of the problem.
I can record a video for you if this could help you.
from neogit.
To me, on linux, it gives me a segfault if I enable diff 3/4 when I have something staged. I'm not sure it's the same issue, but definitely it looks like so.
from neogit.
To me, on linux, it gives me a segfault if I enable diff 3/4 when I have something staged. I'm not sure it's the same issue, but definitely it looks like so.
Can you reproduce this with a different repo? For me this is happening completely random and I don't know what the problem is.
from neogit.
It happened to me on three different repos, one being this, one being my dotfiles and another is a java codebase. Completely different repos.
from neogit.
Is it always the same position (like 4th staged change or something like that)?
For me it has happend when only 1 file was unstaged or when I had a lot of files open.
from neogit.
1 or more staged, sometimes not even staged, but I guess it's probably something else. Im assuming it's on gits side, when getting the patches, rather than on displaying...
from neogit.
It has to do something with fold
though. When I remove the folds it doesn't crash anymore. This is overall very weird.
from neogit.
Modified lua/neogit/status.lua
@@ -59,7 +59,7 @@ local function insert_diff(section, change)
return
end
- vim.cmd("normal zd")
+ --vim.cmd("normal zd")
if not change.diff_content then
if section.name == "staged_changes" then
Ok, I've isolated it to this line. When I comment this command, it never breaks for me.
from neogit.
I don't know the intent of this zd
command, but it seems from my manual testing that neogit works well without it.
from neogit.
zd
deletes the fold under the current line. I honestly don't remember why I delete the fold under the current line. Do you know of any way to get a backtrace for the vim crash? The debug and log features don't really return anything useful for me.
Edit: I think we need zd
, because each change has an empty fold in the beginning, which has to be deleted (I think).
from neogit.
I found that by accident by manually running zd
and getting an error message (something like no fold to be deleted). Is there a way to check if there's actually a fold there before you run zd
?
Do you know of any way to get a backtrace for the vim crash?
Unfortunately no.
Another alternative would be to test without the shorthand version vim.cmd
, using vim.api.nvim_command
. this can be helpful to isolate where is the issue.
from neogit.
I just tested without the zd
and it still crashes for me. I only don't crash when i remove the create_fold
calls.
from neogit.
Manually doing the <start>,<end>fold
excommand with the same arguments also crashes neovim for me, so this has to do something with neovim.
from neogit.
Ok, so maybe we're having different issues on Windows and Linux :/
from neogit.
which neovim version are you using?
from neogit.
I've been using master, latest build from today.
from neogit.
@hkupty are you still encountering the issue? I haven't had this bug in a while and thinking about closing this issue.
from neogit.
Related Issues (20)
- Async errors + Neogit showing outdated state: neogit/lib/buffer.lua:349: Invalid buffer id: 44 HOT 15
- "Recent commits" section does not show if there are unmerged commits HOT 3
- ...al/share/nvim/lazy/neogit/lua/neogit/lib/item_filter.lua:18: bad argument #1 to 'new' (table expected, got boolean)
- `attempt to compare nil with number` when staging via visual-lines selection HOT 1
- Neogit showing incorrect/duplicate data in status buffer HOT 11
- Neogit starts producing errors when calling `neogit.open` twice from different `pwd`, OR when using a zsh terminal that runs the `powerlevel10k` theme
- regression: using neogit with external prompt for SSH freezes neovim HOT 4
- Opening the diff to a commit results in an error HOT 1
- regression in `:Neogit cwd=<cwd>` HOT 5
- Override palette in config HOT 1
- Status - Mapping of `o` is broken now HOT 1
- `use_default_keymaps = false` does not do anything HOT 1
- Setting a hotkey to `false` errors out at startup
- Neogit fails to start when an untracked file name is just a number
- Some neogit buffers break `statuscolumn` HOT 1
- Can't handle `typechange`
- Chevron rendering issues? HOT 1
- exception when initing a new repo (windows + wsl) HOT 1
- Unnamed buffers left in buffer list after closing Neogit
- Fails to parse diffs with submodule changes HOT 1
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 neogit.