Giter Site home page Giter Site logo

Comments (9)

Frederick888 avatar Frederick888 commented on April 28, 2024 1

@sakhnik Then, again please bear with me just making assumptions here, is it possible to use named buffers for nvim-gdb? They don't need to be actually saved somewhere but only used for bufname matching as somewhat a guard during cleanup, e.g. /tmp/nvim-gdb.session-[0|1|2|...].[src|dbg].

from nvim-gdb.

sakhnik avatar sakhnik commented on April 28, 2024

I'm not sure I understand the issue. One [noname] buffer seems to be present upon nvim launch even without the plugin. Whatever I tried, I couldn't notice any unwanted buffers. Could you please describe the specific steps to reproduce the issue?
asciicast

from nvim-gdb.

Narice avatar Narice commented on April 28, 2024

I'll try to figure out what's causing it, it might be related to a .vimrc option
could it be related to "set hidden"?

from nvim-gdb.

Narice avatar Narice commented on April 28, 2024

for the steps, I'm exactly doing what you did.
And it's a different one from the startup one.
It adds a new buffer each time I'm leaving gdb.

from nvim-gdb.

sakhnik avatar sakhnik commented on April 28, 2024

Well, if I'm using test/init.vim, no "ghosts". But as soon as I add set hidden, I experience the issue.
I'm not sure it'd be easy to tackle.

from nvim-gdb.

Narice avatar Narice commented on April 28, 2024

Maybe just disable hidden while in the process of quitting gdb and then re-enabling it
I'll try it later today

from nvim-gdb.

Frederick888 avatar Frederick888 commented on April 28, 2024

Sorry for bumping an old issue but it seems this problem is still reproducible in my case. I'm running neovim v0.4.3 with the latest nvim-gdb and indeed I've got set hidden in vimrc. Just thinking out loud here but I wonder whether it's possible to just bwipe the buffers used by nvim-gdb during cleanup?

from nvim-gdb.

sakhnik avatar sakhnik commented on April 28, 2024

Yes, probably. The plugin could keep track of the buffers specifically opened for the debugger. But the fix will require careful consideration because leaving "ghost" buffers around is a tiny nuisance in comparison to undesirable obliterations. What if a user edits the source code when debugging?

from nvim-gdb.

sakhnik avatar sakhnik commented on April 28, 2024

I guess this wouldn't be strictly necessary because the plugin could just remember the buffers. Then we could probably distinguish the modified ones from the untouched ones, skip through the unsaved ones etc. I'll have to experiment around.

from nvim-gdb.

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.