Giter VIP home page Giter VIP logo

Comments (4)

ardagnir avatar ardagnir commented on May 28, 2024 1

Tab should be fixed now in python and ipython. Control C is still broken.

from athame.

ardagnir avatar ardagnir commented on May 28, 2024 1

Fixed in 1.0 branch.

from athame.

ardagnir avatar ardagnir commented on May 28, 2024

Tab is also broken in Python shell, but I'm still looking into why. I
haven't used iPython; I'll have to see what is wrong with Ctrl-c. Thanks
for letting me know!
On May 29, 2016 5:03 AM, "infokiller" [email protected] wrote:

Without athame, the behaviour of these keys is as following:

  • Tab: inserts a tab
  • Ctrl-c: cancels the current line edit and KeyboardInterrupt is
    printed

With athame in insert mode:

  • Tab: in the beginning of the line it inserts a tab correctly, but
    seem to think that a new line is edited- the -- INSERT -- is gone
    until I type anything. When I start typing anything after the tab it goes
    into insert mode again but starts from the beginning of the line, ignoring
    the tab (like cc was used in vim).
  • Ctrl-c: if this is the first thing I do on a new line, before the --
    INSERT -- indicator appears, it works as expected. However after the
    indicator appears it seems to ignore the Ctrl-c untill I press return, at
    which point I get the KeyboardInterrupt message.

Using IPython 4.0.1.

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#31, or mute the thread
https://github.com/notifications/unsubscribe/ACUkPkX8h_dCFJfW-RRvGYtvc0yhQQqXks5qGVZfgaJpZM4IpPza
.

from athame.

ardagnir avatar ardagnir commented on May 28, 2024

Changing to just cover python because ipython now uses prompt_toolkit instead of readline (covered in #35).

The reason this is non-trivial to fix is that:

  1. control C sends a SIGINT instead of a keypress. This signal is handled by python.
  2. python doesn't tell readline about signals like bash does, so athame can't just use readline code to tell if it got the signal.
  3. python doesn't give control back to readline until it gets another keypress, so if we give control back to it after every key like normal readline, we break CursorHold, imaps timing out, anything async, etc among other problems.

from athame.

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.