-
-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: hyperlink
support.
#665
Conversation
See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). FTXUI support proposed by @aaleino in [#662](#662). API: ```cpp auto link = text("Click here") | hyperlink("https://github.com/FTXUI") ``` Fixed:#662
Hello @aaleino, Could you please take a look? This stores the hyperlink string into every cells. Most likely with string optimization, this shouldn't translate into using too much memory when not used. I ran a benchmark. This makes FTXUI screen rendering 50% slower. On my laptop, on a 128x128 We go from 15'000fps to 7'500fps on a 80x80 grid. There are still plenty of room for other work. It might be fine. We might also find ways to improve it over time. We could store the string separately and store only its index. Benchmark (after)
Benchmark (before)
|
In the latest patchset, I am now storing a |
Thanks a lot, that was fast! It has been awhile since I used FTXUI, but i tried it by modifying the example modal_dialog.cpp:
It compiled but the hyperlink does not show? Is the test incorrect? |
It seems to work. Here is what I get with your example: out-2023-06-04_17.36.57.mp4My terminal emulator |
Ah, my mistake, I was running the example under tmux which had apparently captured the escape code. Running in windows terminal without tmux worked fine. Then I think it works intuitively and I will definitely use this feature. I will start to incorporate this into my source code. Thank you very much! |
See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). FTXUI support proposed by @aaleino in [#662](#662). API: ```cpp auto link = text("Click here") | hyperlink("https://github.com/FTXUI") ``` Fixed:#662
See the OSC 8 page. FTXUI support proposed by @aaleino in #662.
API:
Fixed:#662