summary refs log tree commit diff
path: root/ui.c
AgeCommit message (Collapse)Author
2021-01-29Only skip setting swap in windowShowC. McEnroe
With the early return, mainUpdate doesn't get called in cases where other functions expect windowShow to call it, such as when closing or moving windows.
2021-01-28Move threshold and mute indicators directly after numberC. McEnroe
I don't know why I ruled this out originally, it's more visually pleasing to me now especially that threshold is likely to remain set at "+" for a long time.
2021-01-27Save window time display toggleC. McEnroe
2021-01-27Measure timestamp width using ncursesC. McEnroe
This allows for non-ASCII characters in timestamps, and simplifies things by including the trailing space in the width.
2021-01-27Change default timestamp format to %XC. McEnroe
This respects the user's locale settings.
2021-01-27Add toggleable display of timestampsC. McEnroe
2021-01-26Only list up until scroll position with M-lC. McEnroe
2021-01-26Preserve scroll position across reflowsC. McEnroe
Finally! Changing the message visibility threshold doesn't totally screw up scroll position. Neither do horizontal resizes, but vertical resizes drift because the value of windowTop() changes before and after... The scroll position is anchored to the top of the window. It's arbitrary whether to anchor the top or the bottom, but other scrolling commands like M-p and C-r are anchored to the top, so this is consistent.
2021-01-26Rename and move scroll functions closer to where they are usedC. McEnroe
2021-01-26Factor out windowReflowC. McEnroe
2021-01-25Disable notify in restricted modeC. McEnroe
catgirl shouldn't try to execute a command if it is misconfigured with both restrict and notify.
2021-01-25Don't print timestamps for blank lines in bufferListC. McEnroe
2021-01-21Simplify windowUpdate loops and factor out windowTopC. McEnroe
No idea why I made that more complicated than it had to be looping backwards.
2021-01-19Don't lose swapped window when navigating to current bufferJeremy O'Brien
2021-01-19Use Warm heat for manually inserted blank linesC. McEnroe
Oops, forgot about these.
2021-01-17Use Warm heat for blank lines 1.5C. McEnroe
So they're not hidden by M-+.
2021-01-16Save and load window visibility thresholdsC. McEnroe
2021-01-16Restore toggling ignore with M--C. McEnroe
So that pressing M-- repeatedly maintains the previous behavior.
2021-01-16Generalize ignore toggling to visibility thresholdC. McEnroe
2021-01-11Save and load the URL ring in the save file 1.4C. McEnroe
2020-10-12Avoid eating C-c while connectingC. McEnroe
Split UI initialization into two steps either side of the call to connect, so that C-c works as interrupt while it's blocked.
2020-10-09Factor out styleStripC. McEnroe
2020-09-09Silence set-but-unused warning 1.2C. McEnroe
getyx is so annoying this way.
2020-09-07Add blank line to unread if there are already unreadC. McEnroe
This fixes the inconsistent M-u behaviour when catgirl is restarting and reconnecting to pounce, for example.
2020-09-07Call uiWrite to insert blank linesC. McEnroe
It only used to use different code to avoid adding the blank line to the soft buffer.
2020-09-06Add C-r, C-s for basic scrollback searchC. McEnroe
2020-09-03Add M-n, M-p to jump to highlightsC. McEnroe
2020-09-03Fix M-u behaviour difference before and after reflowC. McEnroe
2020-09-02Recalculate unreadHard on reflowC. McEnroe
2020-09-02Give blank lines timestampsC. McEnroe
Otherwise the zero timestamps totally break save data loading! Bad!
2020-09-02Hide ignored messages at the soft -> hard buffer layerC. McEnroe
This restores normal scrolling behaviour.
2020-09-02Still add ignored lines to unreadHardC. McEnroe
Scrolling is still affected by hidden lines (which I'm not sure yet is good or not), so for M-u to work it needs to count ignored lines.
2020-09-02Actually insert blank lines in the soft bufferC. McEnroe
So they can be preserved forever!
2020-09-02Reimplement split scrollingC. McEnroe
2020-09-02Fix inserting blank lines BEFORE the new messageC. McEnroe
2020-09-02Only call windowUpdate when the shown window needs updatingC. McEnroe
2020-09-02Call wclear on resizeC. McEnroe
Otherwise artefects can appear when resizing to smaller width with wide characters at the right edge of the window.
2020-09-02Fix line wrapping in various waysC. McEnroe
Never split a codepoint, don't set wrapping point unless we're not already wrapping, wrap on any unicode whitespace, only clear rest of line if still on the same line...
2020-09-02Render one main window from buffersC. McEnroe
Still missing: split scrolling and preserving a blank on reflow either from resize or ignore toggling. Anecdata: on one of my instances of catgirl, RAM usage of the previous release was ~30M, RAM usage of this commit was ~12M.
2020-09-01Invert meaning of unreadHard/unreadSoft to match new buffer codeC. McEnroe
Not sure why I had named them this way. Hard means hard-wrapped.
2020-09-01Factor buffer out of uiC. McEnroe
In preparation for doing line wrapping outside of ncurses.
2020-09-01Move styleParse out of uiC. McEnroe
2020-08-04Say "OpenSSL" in additional permission noticesC. McEnroe
LibreSSL is "a modified version of that library".
2020-07-30Replace catf with something that tracks lenC. McEnroe
Also the old catf would be broken with -DNDEBUG oops!
2020-07-23Initialize numHot, numWarmC. McEnroe
For some reason gcc thinks that numWarm might be used uninitialized. It's fine with numHot though, strangely.
2020-07-12Keep scrolled up windows in status lineC. McEnroe
2020-06-11Call static_assert by _Static_assertC. McEnroe
OpenBSD assert.h does not #define static_assert, and this is the only thing that prevents catgirl from compiling without any issues there.
2020-06-08Add additional permission for linking with LibreSSLC. McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-05-26Don't send zero-width characters to ncursesC. McEnroe
2020-05-25Define constants for window geometryC. McEnroe
Also fixes uiDraw so that the split lines and marker don't overlap the main window, although that wasn't causing any real problems.