C. McEnroe
422fe6cd29
Move threshold and mute indicators directly after number
...
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-28 01:49:41 -05:00
C. McEnroe
5dde56d692
Save window time display toggle
2021-01-27 15:35:26 -05:00
C. McEnroe
b4c26a2cab
Measure timestamp width using ncurses
...
This allows for non-ASCII characters in timestamps, and simplifies
things by including the trailing space in the width.
2021-01-27 14:55:31 -05:00
C. McEnroe
d6ff9e53cf
Change default timestamp format to %X
...
This respects the user's locale settings.
2021-01-27 14:18:20 -05:00
C. McEnroe
c118c594e3
Add toggleable display of timestamps
2021-01-27 00:15:46 -05:00
C. McEnroe
604de4ff5a
Only list up until scroll position with M-l
2021-01-26 23:08:58 -05:00
C. McEnroe
d7d4572220
Preserve scroll position across reflows
...
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-26 22:33:16 -05:00
C. McEnroe
a18ced53df
Rename and move scroll functions closer to where they are used
2021-01-26 19:53:38 -05:00
C. McEnroe
76670b2fb1
Factor out windowReflow
2021-01-26 19:33:17 -05:00
C. McEnroe
bd210e0f35
Disable notify in restricted mode
...
catgirl shouldn't try to execute a command if it is misconfigured
with both restrict and notify.
2021-01-25 18:27:07 -05:00
C. McEnroe
86b79096e0
Don't print timestamps for blank lines in bufferList
2021-01-25 17:27:54 -05:00
C. McEnroe
6ee0aea9e5
Simplify windowUpdate loops and factor out windowTop
...
No idea why I made that more complicated than it had to be looping
backwards.
2021-01-21 11:57:23 -05:00
Jeremy O'Brien
1fbc8fe394
Don't lose swapped window when navigating to current buffer
2021-01-19 12:14:43 -05:00
C. McEnroe
965b6987a9
Use Warm heat for manually inserted blank lines
...
Oops, forgot about these.
2021-01-19 10:50:55 -05:00
C. McEnroe
06683aa4e3
Use Warm heat for blank lines
...
So they're not hidden by M-+.
2021-01-17 00:35:59 -05:00
C. McEnroe
1a1fe1fb7a
Save and load window visibility thresholds
2021-01-16 13:09:55 -05:00
C. McEnroe
43b1dba720
Restore toggling ignore with M--
...
So that pressing M-- repeatedly maintains the previous behavior.
2021-01-16 13:05:01 -05:00
C. McEnroe
d05872303e
Generalize ignore toggling to visibility threshold
2021-01-16 12:58:16 -05:00
C. McEnroe
51c92f94ff
Save and load the URL ring in the save file
2021-01-11 18:05:22 -05:00
C. McEnroe
59006d18bb
Avoid eating C-c while connecting
...
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-12 19:25:08 -04:00
C. McEnroe
c48672313b
Factor out styleStrip
2020-10-09 18:45:52 -04:00
C. McEnroe
ef59e235eb
Silence set-but-unused warning
...
getyx is so annoying this way.
2020-09-09 18:04:41 -04:00
C. McEnroe
cf42595515
Add blank line to unread if there are already unread
...
This fixes the inconsistent M-u behaviour when catgirl is restarting and
reconnecting to pounce, for example.
2020-09-07 22:21:41 -04:00
C. McEnroe
4ca49debb1
Call uiWrite to insert blank lines
...
It only used to use different code to avoid adding the blank line to the
soft buffer.
2020-09-07 22:13:09 -04:00
C. McEnroe
f0fe44f355
Add C-r, C-s for basic scrollback search
2020-09-06 20:40:29 -04:00
C. McEnroe
49e626b2f3
Add M-n, M-p to jump to highlights
2020-09-03 16:37:31 -04:00
C. McEnroe
dbc0c3ef40
Fix M-u behaviour difference before and after reflow
2020-09-03 15:50:39 -04:00
C. McEnroe
0968a8ac7c
Recalculate unreadHard on reflow
2020-09-02 21:29:03 -04:00
C. McEnroe
a46fbea0ec
Give blank lines timestamps
...
Otherwise the zero timestamps totally break save data loading! Bad!
2020-09-02 19:31:05 -04:00
C. McEnroe
96386adac3
Hide ignored messages at the soft -> hard buffer layer
...
This restores normal scrolling behaviour.
2020-09-02 18:51:07 -04:00
C. McEnroe
99612ad8eb
Still add ignored lines to unreadHard
...
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-02 16:52:57 -04:00
C. McEnroe
d00b3d3b70
Actually insert blank lines in the soft buffer
...
So they can be preserved forever!
2020-09-02 16:29:38 -04:00
C. McEnroe
9679c7474e
Reimplement split scrolling
2020-09-02 16:06:34 -04:00
C. McEnroe
a0c8a46c75
Fix inserting blank lines BEFORE the new message
2020-09-02 15:57:36 -04:00
C. McEnroe
6fe5368ec7
Only call windowUpdate when the shown window needs updating
2020-09-02 15:50:13 -04:00
C. McEnroe
17898622e3
Call wclear on resize
...
Otherwise artefects can appear when resizing to smaller width with wide
characters at the right edge of the window.
2020-09-02 02:18:04 -04:00
C. McEnroe
a84c9cdda7
Fix line wrapping in various ways
...
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-02 01:57:51 -04:00
C. McEnroe
149cafc5ab
Render one main window from buffers
...
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-02 00:27:16 -04:00
C. McEnroe
8d1d758053
Invert meaning of unreadHard/unreadSoft to match new buffer code
...
Not sure why I had named them this way. Hard means hard-wrapped.
2020-09-01 20:56:09 -04:00
C. McEnroe
ded2b6afb6
Factor buffer out of ui
...
In preparation for doing line wrapping outside of ncurses.
2020-09-01 20:36:50 -04:00
C. McEnroe
a98fd70aac
Move styleParse out of ui
2020-09-01 18:05:17 -04:00
C. McEnroe
814c36223a
Say "OpenSSL" in additional permission notices
...
LibreSSL is "a modified version of that library".
2020-08-04 12:19:14 -04:00
C. McEnroe
4c1b1fc6a3
Replace catf with something that tracks len
...
Also the old catf would be broken with -DNDEBUG oops!
2020-07-30 14:37:46 -04:00
C. McEnroe
ed7d5c0f34
Initialize numHot, numWarm
...
For some reason gcc thinks that numWarm might be used uninitialized.
It's fine with numHot though, strangely.
2020-07-23 00:22:36 -04:00
C. McEnroe
787771bebb
Keep scrolled up windows in status line
2020-07-12 09:38:52 -04:00
C. McEnroe
e8f1b928b7
Call static_assert by _Static_assert
...
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-11 15:33:59 -04:00
C. McEnroe
721c3a9ee6
Add additional permission for linking with LibreSSL
...
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-06-08 17:48:07 -04:00
C. McEnroe
88e2197a8f
Don't send zero-width characters to ncurses
2020-05-26 15:18:55 -04:00
C. McEnroe
b352f5965b
Define constants for window geometry
...
Also fixes uiDraw so that the split lines and marker don't overlap the
main window, although that wasn't causing any real problems.
2020-05-25 13:51:09 -04:00
C. McEnroe
53f206f7e0
Tweak status line formatting
2020-05-24 12:34:23 -04:00