Coder Social home page Coder Social logo

Comments (18)

hkupty avatar hkupty commented on July 20, 2024 1

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

@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.

hkupty avatar hkupty commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

hkupty avatar hkupty commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

hkupty avatar hkupty commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

hkupty avatar hkupty commented on July 20, 2024
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.

hkupty avatar hkupty commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

hkupty avatar hkupty commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

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.

hkupty avatar hkupty commented on July 20, 2024

Ok, so maybe we're having different issues on Windows and Linux :/

from neogit.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

which neovim version are you using?

from neogit.

hkupty avatar hkupty commented on July 20, 2024

I've been using master, latest build from today.

from neogit.

TimUntersberger avatar TimUntersberger commented on July 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.