Giter Site home page Giter Site logo

Comments (3)

midichef avatar midichef commented on June 2, 2024 1

I use it to skip the quitguard. But also the key combination is easier for me to press.

Also, I override the Q binding of quit-sheet-free, and bind it instead to a custom quit function that avoids the quitguard for the current sheet.

from visidata.

midichef avatar midichef commented on June 2, 2024

Here's what I've found so far.

The exception occurs because t.ident is None. I believe this means the thread has not been started.

The thread here t is sort() for a Helpsheet.

Bisect shows the exception first appears in fde0588, where CommandHelpGetter(type(sheet)) is called:

return AttrDict(commands=CommandHelpGetter(type(sheet)),

It creates a HelpSheet:
self.helpsheet = vd.HelpSheet()

And sort() is called from the HelpSheet's afterLoad:
vd.sync(self.sort())

My first thought was that it may be related to recent changes to how threads work in threads.py in the last few months. But I don't think they are related. I tested older versions of threads.py while keeping the rest of the code at the breaking commit (fde0588). Reverting threads.py to the last stable change in March 2023 (1c1a11e) still had the problem of the occasional exception on quitting, as did more recent commits affecting threads.py from October and November 2023. So it's not caused by those recent changes.

Commenting out self.helpsheet.ensureLoaded() does seem to prevent the exception:

self.helpsheet.ensureLoaded()

from visidata.

saulpw avatar saulpw commented on June 2, 2024

It could also be that the thread finishes after it's put into the list of threads to cancel. But if it's not running we can't cancel it anyway. So we can just check for this to avoid the exception.

BTW, do you have a reason to use Ctrl+Q instead of gq? I think the only difference is that it avoids the quitguard, do you want that behavior, or do you prefer the keybinding, or?

from visidata.

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.