summaryrefslogtreecommitdiff
path: root/ui/style.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-10-19Render the Unicode replacement character properlydelthas1-3/+0
Previously, we stopped rendering a line on its first Unicode replacement character, because we used that special value for detecting invalid Unicode bytes. Now that we pre-process incoming strings to replace invalid Unicode bytes with the Unicode replacement character [1], there is no need to stop rendering a string on this character: it should just be passed through as is. [1]: 700139404044730a726af7cd57e3d2dbc07871ea
2022-10-17Fix OSC 8 hyperlink ID formatdelthas1-1/+1
I meant to add 0-padding to avoid spaces.
2022-10-17Add OSC 8 hyperlink IDsdelthas1-4/+6
OSC 8 hyperlink ID support was merged into tcell. We can now use those IDs to help terminal emulators identify links spanning multiple lines, possibly highlighting the whole link whe it is hovered, or creating a single link hotkey for them.
2022-10-14Switch to the upstream tcell implementation of OSC 8 hyperlinkdelthas1-4/+4
tcell has merged OSC support in [1], with support for more terminals than what was added in the tcell fork we used. Now, all terminals with mouse sequences support should receive OSC 8 hyperlinks sequences. [1]: https://github.com/gdamore/tcell/pull/527/commits/e7b14a71dc78721c0f007fd6197262c52c1d4df9 Fixes: https://todo.sr.ht/~taiite/senpai/103
2022-07-25Add support for hex colorsdelthas1-2/+43
2022-04-15Optimize URL regexdelthas1-1/+1
Following a quick local profiling & benchmark, matching links with regexes is by far (>50x) the most time-consuming processing we do, especially on start. Switching to a URL regex with any scheme is faster by a factor of ~x8, probably because there are many less "or" cases between a list of 100+ schemes, instead using a simple character class.
2022-03-29Add HTTPS schema by default to hyperlinksdelthas1-0/+4
2022-02-18Optimize URL parsing performancedelthas1-0/+5
According to a CPU profiling I meade, the regex applied on each incoming message took a substantial part of the CPU time. The slowdown it caused was noticable at startup. This optimizes the URL parsing by eliminating fast-path cases where no dot appears to avoid parsing the line with a regex in those cases.
2022-02-10Rename ColorGrey to ColorGray for consistencyHugo Machet1-1/+1
2021-11-19Fix link value, removing debug query stringdelthas1-1/+1
2021-10-31Mark hyperlinks with the OSC hyperlink terminal escapedelthas1-0/+65
This makes multi-line links properly clickable. See: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2021-10-22Fix ui.StyledStringBuilderHubert Hirtz1-4/+30
2021-09-13More lintsHubert Hirtz1-1/+1
2021-05-26Pick nick colors in terminal color schemeHubert Hirtz1-180/+195
So that the colors go well with the terminal background.
2021-04-27Blacklist more colorsHubert Hirtz1-1/+3
2020-10-26Vertical channel listHubert Hirtz1-0/+19
2020-10-18Display strike-through textHubert Hirtz1-6/+13
2020-10-18Update tcell to v2 andHubert Hirtz1-5/+21
- enable bracketed paste - use hex color codes instead of ansi
2020-08-26Update tcell and support italicsHubert Hirtz1-1/+1
2020-08-26General refactor yayHubert Hirtz1-0/+8
- Centralize message formatting - Make line formatting more flexible - Provide more information in irc events - Refactor command handling - Add a /help command - Make /me reply to last query if from home - Enforce argument for /me - Make BufferList and Editor public - Batch processing of IRC events
2020-08-21ui: Fix color codesHubert Hirtz1-36/+18
2020-08-20ui: Strip formatting codes in notificationsHubert Hirtz1-3/+3
2020-08-06Actually the rune width issue is from alacrittyHubert Hirtz1-3/+1
2020-08-05Support reverse character codeHubert Hirtz1-0/+7
2020-08-05Fix colors not being reset with \x03Hubert Hirtz1-0/+4
2020-08-05Use a custom runewidth.ConditionHubert Hirtz1-1/+13
Because some characters were not using the number of cells runewidth.RuneWidth returned, eg \u2026 and \u2192.
2020-08-04Rework displayHubert Hirtz1-0/+191
- Put timestamps, nicks and messages into separate columns - Print a bar in the "typing" row - Fix word wrapping - Improve channel list display