Git Product home page Git Product logo

Comments (5)

chrisant996 avatar chrisant996 commented on June 5, 2024 1

I see, yes. I'll change how it parses OSC codes so it doesn't assume a single digit anymore.

Also, the sample Lua script has problems -- it is important to remove the \001 and \002 sequences from the Lua script:

  1. Clink automatically adds \001 and \002 characters where needed for the Readline library. If you manually add them as well, then you're doubling them up as \001\001 and \002\002, and the Readline library can get confused about the width of the prompt and whether/where it wraps to a new line, which can cause garbled output while typing input at the command promtp.
  2. In the clink.print() case they are literally printed to the terminal (the Readline library is not involved, so they go straight to the terminal without being stripped).

The \001 and \002 stuff is specific to Readline, and not to anything else. Clink automatically handles adding them; you shouldn't add them yourself.

from clink.

chrisant996 avatar chrisant996 commented on June 5, 2024

If they're stripped, then it means Clink doesn't recognize the terminal program, and was forced to fall back to its own built-in terminal emulator.

See the terminal.emulation setting.

from clink.

krzysdz avatar krzysdz commented on June 5, 2024

I was testing it with Windows Terminal Dev (microsoft/terminal@48eee4d, build from CI) with terminal.emulation = native and now tested with emulate too, but it didn't change anything.

from clink.

krzysdz avatar krzysdz commented on June 5, 2024

Thank you and thanks for the remarks regarding \001 and \002!

from clink.

chrisant996 avatar chrisant996 commented on June 5, 2024

It was simpler than I anticipated: unrecognized OSC codes were accidentally reported as though they were recognized. But the code that tried to handled recognized OSC codes didn't know what to do with them, so they got accidentally stripped. The fix is simply to accurately report whether OSC codes are recognized.

from clink.

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.