Commit Graph

1019 Commits (c0be6fe4b207fe8f57e8a9a97734302b15733831)

Author SHA1 Message Date
June McEnroe c0be6fe4b2 "Rename" complete to cache, refactor interfaces 2022-07-30 17:51:58 -04:00
June McEnroe b917a590db Show STATUSMSG prefix 2022-07-30 15:43:11 -04:00
June McEnroe 8d654bc3a4 Refactor colorMentions to be seprintf-like 2022-07-30 15:25:25 -04:00
June McEnroe 34c4407797 Update copyrights, authors 2022-07-30 14:29:04 -04:00
June McEnroe 9a415245a1 Remove EditMode
Pretty sure this isn't going to be how vi mode works if I ever
manage to implement it anyway.
2022-07-30 14:15:57 -04:00
June McEnroe 563ac9e3bf Use tiparm on to_status_line
According to terminfo(5), tsl takes a single parameter! Never seen
it happen, but this is technically more correct, I guess.
2022-07-28 13:46:44 -04:00
June McEnroe 4aaa2050e2 Only show old topic if something was removed 2022-06-26 16:38:19 -04:00
June McEnroe b744089d6a Use two lines to show topic diffs 2022-06-24 14:29:44 -04:00
June McEnroe 3475f03ec8 Allow setting fallback nicks and highlight on any
As a side-effect, even with only one nick set you'll still be
highlighted by it even if your current nick is different.
2022-05-29 18:09:52 -04:00
June McEnroe a5162d83bd Document visibility of unknown replies 2022-05-29 15:33:28 -04:00
June McEnroe f7b3c2f8ca Put unknown numerics in parentheses
For some reason this makes it look so much better to me.
2022-05-29 15:24:06 -04:00
June McEnroe fc518e301f Route unknown channel replies to channels
Also prefix with the numeric. I don't really want to show numerics
to the user, but I'm not sure these really make sense without.
2022-05-08 17:49:20 -04:00
June McEnroe 7ee327ccb6 Show "You arrive" message only once 2022-05-08 16:39:31 -04:00
June McEnroe 6cfb1ad301 Write unknown replies to Network with Ice heat 2022-05-08 16:38:00 -04:00
June McEnroe 1b8be724bc Sanitize leading dots from log path components
Prevent directory traversal by sanitizing leading dots as well as
slashes from log path components, which can be controlled by the
server. Side effect of preventing hidden dotfiles is a bonus, I
think.

Also check that the full path actually fits in the buffer.

Reported-by: Samanta Navarro <ferivoz@riseup.net>
2022-04-20 18:29:28 -04:00
June McEnroe 70268b4cd3 Add screenshot to README 2022-03-31 13:21:33 -04:00
June McEnroe 714b4bc76a Skip non-spacing when moving and deleting by "character"
I uh... don't think I can write tests for this, since macOS's wcwidth
is notoriously useless.
2022-03-16 20:21:00 -04:00
June McEnroe 1f9e3463c3 Document using -S to connect over IPv4 or IPv6 2022-03-13 17:33:16 -04:00
Christian Kellermann ee82e5d376 Always refresh the screen with ^L
This patch adds an explicit wrefresh call. Under some conditions
just flagging the window for redraw does not trigger a redraw and
the user has no other means to force redrawing of a window.

Without this patch resizing the window would sometimes result in
an empty chat window with no way to redraw it.

Tested under uxterm and st on OpenBSD.
2022-03-09 21:18:05 -05:00
June McEnroe c78b511dfb Update STANDARDS section authors, titles and URLs 2022-03-05 16:09:51 -05:00
June McEnroe 120349ccc2 Show own nick on /nick without params 2022-03-02 23:06:06 -05:00
June McEnroe b6c7280649 Specify commands which depend on caps
Currently only /setname.
2022-02-26 15:51:42 -05:00
June McEnroe b7fe705c91 Only add available commands to complete 2022-02-26 15:41:50 -05:00
June McEnroe 628e064056 Factor out commandAvailable 2022-02-26 15:40:11 -05:00
June McEnroe f51e7b4d2c Give examples of "general events" 2022-02-23 18:05:10 -05:00
June McEnroe 4e8ba236b6 Add missing unistd.h include in input.c 2022-02-23 12:50:31 -05:00
June McEnroe 5b3b798c49 Document the interface 2022-02-22 20:04:42 -05:00
June McEnroe c929a696eb Clean up unimplemented editing mode stuff 2022-02-20 17:16:21 -05:00
June McEnroe 78ff548b93 Save input buffer contents 2022-02-20 16:57:11 -05:00
June McEnroe da1b943fcc Share a cut buffer between all edit buffers 2022-02-20 16:20:33 -05:00
June McEnroe c8b6e331de Assert return values in edit tests 2022-02-20 16:05:24 -05:00
June McEnroe e39bba1a8a Move mbs out of struct Edit, use a global buffer
This saves 4K in the edit buffers, not to mention all the heap
allocations for the separate mbs buffers!

There might be a way to be more clever about capacities, but I don't
think it's worth it.
2022-02-20 15:42:24 -05:00
June McEnroe cca9688cca Clear edit buffer before running command
Otherwise a command that switches windows will update the status
line while the edit buffer still has input "pending", showing an
indicator.
2022-02-20 14:58:33 -05:00
June McEnroe a281bdc5e1 Show indicator in status when window has pending input 2022-02-20 14:49:17 -05:00
June McEnroe 012fd67539 Use separate edit buffers for each ID 2022-02-20 14:37:51 -05:00
June McEnroe 8065fcabc3 Make sure new cap is actually larger than new length 2022-02-20 12:24:54 -05:00
June McEnroe 157be8a8d7 Remove unused mbs.len field from struct Edit 2022-02-20 11:54:06 -05:00
June McEnroe 3b4ad30d97 Remove unneeded includes in ui.c 2022-02-19 23:25:36 -05:00
June McEnroe 5c4ecb5a0f Reimplement tab complete 2022-02-19 22:02:49 -05:00
June McEnroe da8deff767 Handle errors from editFn, etc. 2022-02-19 20:44:36 -05:00
June McEnroe 143fa1b509 Reimplement text macros 2022-02-19 20:38:12 -05:00
June McEnroe 073cebec7a Factor out input handling to input.c 2022-02-19 20:20:19 -05:00
June McEnroe 3359a5d69b Factor out window management to window.c 2022-02-19 18:28:45 -05:00
June McEnroe 70f627bc47 Enable -Wmissing-prototypes
In other words, warn when a function is missing static. I don't see
why this isn't in -Wextra.
2022-02-19 17:46:07 -05:00
June McEnroe a2a118c857 Fix edit.[ch] license notice additional permissions 2022-02-19 14:51:26 -05:00
June McEnroe 06d17aa8f1 Run line editing tests
I know, it feels wrong.
2022-02-19 00:01:34 -05:00
June McEnroe 1a2477ef7a Implement new line editing "library"
Losing tab complete and text macros, for now.

This new implementation works on an instance of a struct and does
not interact with the rest of catgirl, making it possible to copy
into another project. Unlike existing line editing libraries, this
one is entirely abstract and can be rendered externally.

My goal with this library is to be able to implement vi mode. Since
it operates on struct instances rather than globals, it might also
be possible to give catgirl separate line editing buffers for each
window, which would be a nice UX improvement.
2022-02-18 23:47:11 -05:00
June McEnroe 573bc855a6 Simplify cursor positioning in input
Do some extra work by adding the portion before the cursor to the
input window twice, but simplify the interaction with the split
point. This fixes the awkward behaviour when moving the cursor
across colour codes where the code would be partially interpreted
up to the cursor.
2022-02-18 23:39:46 -05:00
June McEnroe 0036e6e9f0 Fix M-f ordering 2022-02-18 22:40:16 -05:00
June McEnroe 28a27a2c0f Move sandman build to scripts/Makefile 2022-02-12 20:19:18 -05:00