Git Product home page Git Product logo

Comments (5)

codehz avatar codehz commented on July 21, 2024

I think it can be called by user..
but the another problem is the Clear method cannot clear the screen when the new size is smaller than old size.. it will leave some unwanted lines like this
image

from ftxui.

ArthurSonzogni avatar ArthurSonzogni commented on July 21, 2024

Thanks for reporting this! Yes it was a known problem. It needs to be fixed.

About 1, yes we can use SIGWINCH. Alternatively, I am wondering if there is a terminal escape sequence I could send so that it will send us back any "resize event" automatically. I will have to check the documentation:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

About 2. I think we can send a terminal escape code to "disable line wrapping". Then the terminal won't break the document on resize.
I think it is:
DISABLE_LINE_WRAP = "\e[?45h"
ENABLE_LINE_WRAP = "\e[?7h"

from ftxui.

codehz avatar codehz commented on July 21, 2024
  1. there is no escape sequence for resize event... (at least on linux & xterm) the only way is to handle SIGWINCH signal.
  2. sounds like a good idea.

from ftxui.

ArthurSonzogni avatar ArthurSonzogni commented on July 21, 2024

I applied 1.. It should work now.

I tried 2.
However it didn't improve things.
In some terminals like xterm, lines are not wrapping on window resize.
In other like gnome-terminal, lines are wrapped, even if I try disabling it.

from ftxui.

codehz avatar codehz commented on July 21, 2024

aha, it is already good enough

from ftxui.

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.