Code Monkey home page Code Monkey logo

Comments (6)

carlosala avatar carlosala commented on June 15, 2024 1

Is it reproducible as well if you're not in a git repository? Try in $HOME, for example.

from ohmyzsh.

mcornella avatar mcornella commented on June 15, 2024 1

I think terminal's application mode (smkx) is not yet ready when the prompt hasn't been drawn. If we bind a specific key sequence without using $terminfo we might have issues cross-terminal, i.e. when a different terminal emulator sends a different key sequence or the same for a different key combination.

We might be able to fix this one instance, but let's be vigilant for other issues.

from ohmyzsh.

marcospgp avatar marcospgp commented on June 15, 2024

Also if one holds the enter key, there is inconsistency in the line breaks - some have the shell prompt, some don't:

image

from ohmyzsh.

marcospgp avatar marcospgp commented on June 15, 2024

Is it reproducible as well if you're not in a git repository? Try in $HOME, for example.

Yes, the up arrow being stuck on a single command yes, the incosistency in line breaks, no.

Also it might be a bit harder to reproduce due to the reduced delay when pressing enter, so requires faster timing than when on a git repo it seems.

Also I could not reproduce it with ctrl + c, just enter.

from ohmyzsh.

carlosala avatar carlosala commented on June 15, 2024

The inconsistency with spacing is related to how the prompt is loaded (it checks git status before drawing). Basically if you manage to click enter before drawing it happens. You can reproduce it easier executing PROMPT+='(sleep 2)'.
That thing of pressing the up arrow, I can reproduce it as well. The problem is that the character sent to the terminal when the prompt is not drawn yet is ^[[A instead of ^[[OA, which in my case is the one that matches with "${terminfo[kcuu1]}".
Here we're setting that only for "${terminfo[kcuu1]}", and not ^[[A.

from ohmyzsh.

carlosala avatar carlosala commented on June 15, 2024

@mcornella what do you think about this? Should we bind as well ^[[A to avoid this behaviour?

from ohmyzsh.

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.