summaryrefslogtreecommitdiff
path: root/ui (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat(ui): Only show nickname once for multiple consecutive messagesfeat/hrefhref/multiline-hide-nickJordan Bracco2022-12-311-0/+16
|
* Print date as dd/mm or mm/dd depending on the user localedelthas2022-11-151-8/+57
| | | | | | Overkill, but this was a nice weekend project :-) Fixes: https://todo.sr.ht/~taiite/senpai/107
* 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
* Clear highlights from MARKREAD when only NotifyNone lines are leftdelthas2022-10-182-10/+16
| | | | | | | | | | | | | | | | | Previously, we did not clear buffers highlight statuses on MARKREAD if there was any unread line after it. This meant that if we received a plain message, than a join message, and some other device sent us a read marker for the plain message, we would still highlight the buffer. But we should not: a join message should not highlight the buffer. This is a recurrent use case because some clients do not display join mesasges and therefore do not send read markers for it. This updates the logic to actually store the notify level (in the line) and uses it to reset the highlight status when only NotifyNone messages (or no messages) are left.
* 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
* Scroll to buffer on zoomNomeji2022-10-132-0/+5
|
* Make the last opened channel visible in the horizontal listdelthas2022-09-141-1/+5
| | | | | | | | When starting senpai, we jump to the last opened buffer. Offset the horizontal target list to make the buffer visible, as if scrolled to with CTRL+N. Fixes: https://todo.sr.ht/~taiite/senpai/100
* Always show the date of the top messagedelthas2022-08-281-15/+20
| | | | | | Even if it is a continuation line. Fixes: https://todo.sr.ht/~taiite/senpai/98
* Show the message date instead of its time on date changedelthas2022-08-162-1/+25
| | | | Fixes: https://todo.sr.ht/~taiite/senpai/17
* Revert to using base colors by default, making extended configurabledelthas2022-08-152-37/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a previous commit, the color scheme for displaying nicks was changed to use more colors (30 rather than 14), using extended colors from the 256 colors set. The issue with this is that most terminal emulators customize the colors of the first 16 colors to make them more readable (eg, a terminal emulator with a light theme will make colors darker, and one with a dark theme will make colors lighter). So the 14 colors used before were usually not the default color codes from the original xterm/X11 spec, but specific colors chosen by the terminal emulator to be particularly readable. In a way, changing the behavior to use colors from the 256 colors set, which is usually not overriden, made them much less readable. Which is why we need a configuration option for this. I conversatively chose to make the default color scheme the previous one, with only the base 16 colors. The 256 colors scheme can be enable by adding to the configuration file: colors { nicks extended }
* Color nicks in the member list the same as in the timelinedelthas2022-08-102-1/+55
| | | | | | | | Also, change the color scheme to use more colors. Now 30 instead of 15, and with the consistent color codes offered by the extended XTerm 256 color scheme. Fixes: https://todo.sr.ht/~taiite/senpai/90
* Add support for soju.im/bouncer-networks-notifydelthas2022-08-102-0/+19
| | | | | | This enables dynamic discovery of new and deleted networks. Fixes: https://todo.sr.ht/~taiite/senpai/71
* Add a config option to beep on highlightKirill Chibisov2022-08-011-0/+4
| | | | | This will allow to bring user attention when you are getting highlighted.
* Add support for hex colorsdelthas2022-07-251-2/+43
|
* Add pane-widths { text } to limit the max line widthdelthas2022-07-252-8/+19
| | | | Fixes: https://todo.sr.ht/~taiite/senpai/87
* Fix crashing when shrinking the text to a zero widthdelthas2022-07-221-0/+3
| | | | | | Thanks steamyalt for the bug report. Fixes: https://todo.sr.ht/~taiite/senpai/86
* Scroll to the channel when changing the horizontal channelNomeji2022-07-222-16/+48
| | | | | | | | | | | | | Previously, when running CTRL+N or CTRL+P to go to the next or previous channel, with the horizontal channel mode, the selected channel could appear offscreen. This patch ensures that we scroll just enough to make the newly selected chan visible. Thanks to Nomeji for his hard work on this. Adapted slightly to refactor existing code to use the newly created width computation routine.
* Reset history when flushing linesdelthas2022-06-041-20/+39
| | | | | | | | | | | Previously, when modifying a line in the history (and then possibly sending it), the history was modified, meaning that when looking up history lines again, instead of seeing a new line, the actual original line had been modified. With this patch, history is always kepy, and modifying a previous line and sending it will add this line to the history, and restore the previous history, after flushing the message.
* Fix crashing on removing last char of backsearch patterndelthas2022-06-041-1/+1
| | | | | | | | | | | | | | To reproduce: - Enter a message - Enter a substring of that message, backsearch it - Press backspace until the substring is cleared - senpai crashes This merely fixes the crash. We could do backsearch better in the future but that's a whole feature overhaul to be done in its own patch. Thanks to paren@disroot.org for helping me find the issue by sending a panic trace :)
* Fix horizontal channel list buffer underline positiondelthas2022-05-101-0/+1
|
* Handle IRC read events correctlyptrcnull2022-04-271-1/+1
| | | | | It should mark the buffer as read if the last message was before or at the "read" event, not after.
* Defer parsing URLs until a buffer is opened at least oncedelthas2022-04-201-2/+11
| | | | | | This heavily reduces CPU load on start, so that we only parse the links of the current buffer hundreds of messages, rather than all of the hundreds of messages * count of buffers.
* Add a config option for unread buffer text colorTim Culverhouse2022-04-202-4/+12
| | | | | | | This patch adds the ability to set a config option for changing the foreground text color of unread buffers (This was refactored slightly by delthas.)
* Enable clicking on a horizontal buffer to switch to itdelthas2022-04-202-0/+27
| | | | | | | This is inspired by a patch from mooff. This keeps the same click & drag behavior as for the vertical channel list.
* Scroll horizontal channel list with the mouse wheeldelthas2022-04-202-4/+23
| | | | | | This is inspired by a patch by mooff. The horizontal channel list can now be scrolled with the mouse wheel.
* Show/hide the channel & member list with F7/F8delthas2022-04-201-22/+59
| | | | | | | This patch is inspired and modified from a patch by mooff. Also this switches the default configuration to *display* the channel & member list by default.
* 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.
* Only send READ for messages received from a channeldelthas2022-04-151-4/+11
| | | | i.e. don't enter an infinite loop when printing disconnection errors :-)
* Implement SEARCHdelthas2022-04-122-31/+77
| | | | | | Also refactor ui/ to support overlays, temporary anonmyous buffers. See: https://github.com/emersion/soju/pull/39
* 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.
* Enable clicking on channel members to open a query with themdelthas2022-02-131-6/+23
|
* Make CTRL+C alternatively clear the input and set '/quit' in itdelthas2022-02-132-0/+17
|
* Fix event collapsingdelthas2022-02-111-1/+1
|
* Add support for the soju.im/read capability and READ commanddelthas2022-02-112-0/+43
| | | | See: https://github.com/emersion/soju/blob/c7f0634ec8ee94425547b159bc36705582151012/doc/read.md
* Rename ColorGrey to ColorGray for consistencyHugo Machet2022-02-101-1/+1
|
* ui: buffers: sort buffer listKalyan Sriram2022-02-101-24/+31
| | | | | Implements sorting of both network names and buffer names inside networks.
* MONITOR user with whom we have an open bufferdelthas2022-02-101-2/+14
|
* ui: use reverse colors for current buffer instead of underlineSimon Ser2021-12-121-5/+3
| | | | I personally find this esthetically more pleasing.
* Merge redundant eventsHubert Hirtz2021-12-062-17/+25
|
* Add support for draft/event-playbackdelthas2021-11-241-22/+31
| | | | | | | | | | - Refactor formatting lines into a function - Store event times in the event - Refactor merging lines into a function - Always merge lines from the history, now that we will add mergeable lines with CHATHISTORY Successfully tested locally.
* Show the current channel topic at the top of the timelinedelthas2021-11-242-13/+41
|
* Fix link value, removing debug query stringdelthas2021-11-191-1/+1
|
* Fix part-ing a channel with duplicate name in other networksdelthas2021-11-162-14/+12
| | | | | If there are multiple channels with the same name in several networks, we should part from the one from the correct network.
* Allow App.Close() and App.Run() to be run concurrentlyHubert Hirtz2021-11-161-1/+7
|
* Revert "Show the current channel topic at the top of the timeline"Hubert Hirtz2021-11-052-40/+12
| | | | | This reverts commit 96340f8c4d91f59f6e39767891f9bb52d7fad329 because of a bug in timeline rendering.
* Show the current channel topic at the top of the timelinedelthas2021-11-042-12/+40
|
* Mark hyperlinks with the OSC hyperlink terminal escapedelthas2021-10-312-0/+71
| | | | | | This makes multi-line links properly clickable. See: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda