summaryrefslogtreecommitdiff
path: root/ui/style.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Render the Unicode replacement character properlydelthas2022-10-191-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
* Fix OSC 8 hyperlink ID formatdelthas2022-10-171-1/+1
| | | | I meant to add 0-padding to avoid spaces.
* Add OSC 8 hyperlink IDsdelthas2022-10-171-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.
* Switch to the upstream tcell implementation of OSC 8 hyperlinkdelthas2022-10-141-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
* Add support for hex colorsdelthas2022-07-251-2/+43
|
* Optimize URL regexdelthas2022-04-151-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.
* Add HTTPS schema by default to hyperlinksdelthas2022-03-291-0/+4
|
* Optimize URL parsing performancedelthas2022-02-181-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.
* Rename ColorGrey to ColorGray for consistencyHugo Machet2022-02-101-1/+1
|
* Fix link value, removing debug query stringdelthas2021-11-191-1/+1
|
* Mark hyperlinks with the OSC hyperlink terminal escapedelthas2021-10-311-0/+65
| | | | | | This makes multi-line links properly clickable. See: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
* Fix ui.StyledStringBuilderHubert Hirtz2021-10-221-4/+30
|
* More lintsHubert Hirtz2021-09-131-1/+1
|
* Pick nick colors in terminal color schemeHubert Hirtz2021-05-261-180/+195
| | | | So that the colors go well with the terminal background.
* Blacklist more colorsHubert Hirtz2021-04-271-1/+3
|
* Vertical channel listHubert Hirtz2020-10-261-0/+19
|
* Display strike-through textHubert Hirtz2020-10-181-6/+13
|
* Update tcell to v2 andHubert Hirtz2020-10-181-5/+21
| | | | | - enable bracketed paste - use hex color codes instead of ansi
* Update tcell and support italicsHubert Hirtz2020-08-261-1/+1
|
* General refactor yayHubert Hirtz2020-08-261-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
* ui: Fix color codesHubert Hirtz2020-08-211-36/+18
|
* ui: Strip formatting codes in notificationsHubert Hirtz2020-08-201-3/+3
|
* Actually the rune width issue is from alacrittyHubert Hirtz2020-08-061-3/+1
|
* Support reverse character codeHubert Hirtz2020-08-051-0/+7
|
* Fix colors not being reset with \x03Hubert Hirtz2020-08-051-0/+4
|
* Use a custom runewidth.ConditionHubert Hirtz2020-08-051-1/+13
| | | | | Because some characters were not using the number of cells runewidth.RuneWidth returned, eg \u2026 and \u2192.
* Rework displayHubert Hirtz2020-08-041-0/+191
- Put timestamps, nicks and messages into separate columns - Print a bar in the "typing" row - Fix word wrapping - Improve channel list display