Comments (5)
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
from ftxui.
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.
- there is no escape sequence for resize event... (at least on linux & xterm) the only way is to handle SIGWINCH signal.
- sounds like a good idea.
from ftxui.
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.
aha, it is already good enough
from ftxui.
Related Issues (20)
- Canvas background
- Introductory example fails to build HOT 2
- Custom event question HOT 2
- Add example to use system ftxui HOT 3
- "Bug or feature" HOT 3
- fatal error: string_view: No such file or directory HOT 4
- How to check if current terminal supports TUI? HOT 2
- include could not find requested file: .../lib/ftxui/cmake/ftxui-targets.cmake HOT 1
- Is there a way to change the Slider 's color? HOT 1
- [doc-bug] Move Documentation Comments From `.cpp` To `.hpp` For Better LSP Support HOT 1
- Slider Bug; 3 line but only 1 line valid HOT 2
- cursor problem HOT 1
- Allow Canvas re-use for optimization HOT 3
- container is passed to renderer as a lambda return value, causing rendering to fail HOT 5
- How to remove focus from an element when hovering with the mouse pointer? HOT 2
- Run-Time Check Failure: Stack Corruption of 'option' Variable HOT 5
- Adding elements in loop HOT 1
- [HELP] - Menu inside frame goes to the top when unfocused HOT 3
- Problems with `Menu`? HOT 2
- When moving the mouse inside the application, a sequence of control characters of the terminal appears. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftxui.