commits
Default PIE to null, which then let's the zig compiler choose a default
value. The option is exposed to let packagers choose true or false,
otherwise default to whatever zig has chosen.
Fixes: 92383c2d7bf1
Fixes: #13
fix: Don't mark current channel as read when clicking on it
This would cause the channel to be marked as read if you held down
your mouse button for a bit too long.
All unread messages are highlighted with a gray background. This is
currently the same color used on mouse hover, simply because it was easy
to copy.
A channel is marked read when:
* You switch channel (either via mouse or keyboard); or
* you send a message.
This means that new messages _from others in the channel_ will remain
unread until you either:
* send a message; or
* change the current channel.
Future improvements:
* Add a keybinding to mark the channel read (easy-ish)
* Mark a message as read as soon as it's received if the terminal window
(and thus comlink itself) is focused (harder).
* Mark a channel read on window focus (easy-ish).
- This might actually not be nice? I wouldn't want a channel to be
marked read as soon as I focus the window in case there's a long
scrollback I want to catch up on.
We weren't popping fields off the stack, so when we reffed the config
table we actually were referencing something else. The config table
would get garbage collected, causing issues on reconnect.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Prevent garbage collection of commands and config tables by referencing
them in the global registry.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
We only clean up clients in Debug mode so we can check for memory leaks
without failing for this. We don't care about it in any other mode since
we are exiting anyways and we want to do it fast. If we destroy, our
readthread could panic so we don't do it unless we have to.
I first attempted to use a selfpipe poll to get the clients to exit
cleanly, however the tls library does not work nicely with poll - we end
up not reading until the timeout is done. So instead, we do it this way
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Includes bounds check fix for tzinfo based timezones
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Reduce memory allocations in the clients by using a thread-safe blocking
write buffer. This buffer limits the amount of in-flight messages we can
have, but is also statically allocated so we don't require allocating
each message (even if we won't be keeping it).
Reduce Message memory footprint by parsing on the fly - this should be
just about as fast, maybe faster since we *should* use the CPU cache
a bit better.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
All unread messages are highlighted with a gray background. This is
currently the same color used on mouse hover, simply because it was easy
to copy.
A channel is marked read when:
* You switch channel (either via mouse or keyboard); or
* you send a message.
This means that new messages _from others in the channel_ will remain
unread until you either:
* send a message; or
* change the current channel.
Future improvements:
* Add a keybinding to mark the channel read (easy-ish)
* Mark a message as read as soon as it's received if the terminal window
(and thus comlink itself) is focused (harder).
* Mark a channel read on window focus (easy-ish).
- This might actually not be nice? I wouldn't want a channel to be
marked read as soon as I focus the window in case there's a long
scrollback I want to catch up on.
We only clean up clients in Debug mode so we can check for memory leaks
without failing for this. We don't care about it in any other mode since
we are exiting anyways and we want to do it fast. If we destroy, our
readthread could panic so we don't do it unless we have to.
I first attempted to use a selfpipe poll to get the clients to exit
cleanly, however the tls library does not work nicely with poll - we end
up not reading until the timeout is done. So instead, we do it this way
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Reduce memory allocations in the clients by using a thread-safe blocking
write buffer. This buffer limits the amount of in-flight messages we can
have, but is also statically allocated so we don't require allocating
each message (even if we won't be keeping it).
Reduce Message memory footprint by parsing on the fly - this should be
just about as fast, maybe faster since we *should* use the CPU cache
a bit better.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>