Commit Graph

1009 Commits (f7b3c2f8ca3cc4e83dd1acd337699af7e1fe76ba)

Author SHA1 Message Date
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
June McEnroe c95c8cd1b4 Use compat_readpassphrase.c on Linux 2022-02-12 13:36:24 -05:00
June McEnroe edad0218c1 Copy RPP defines from oconfigure
We don't use any flags, so just define them in the compat source
file.
2022-02-12 13:36:24 -05:00
June McEnroe 6013ae1513 Import compat_readpassphrase.c from oconfigure
At 5d08070de6aadd979e3752263d2ec1e709bf037e.
2022-02-12 13:28:26 -05:00
June McEnroe 397b4ce6bd Prompt for empty server or SASL passwords 2022-02-12 13:26:38 -05:00
June McEnroe 9c384de6db Treat any amount of space and punctuation as word boundaries
This matches behaviour of, e.g. zsh -o emacs.
2022-02-09 17:55:33 -05:00
June McEnroe 8dec54801c Add M-s to (temporarily) reveal spoiler text 2022-02-03 22:10:54 -05:00
June McEnroe ceee69f905 Add C-z s to set spoiler text 2022-02-03 21:50:31 -05:00
June McEnroe 605f889ab5 Avoid sending null byte in SASL PLAIN
Woops! BASE64_SIZE is the size of the string buffer. Somehow ergo
is the only server software (that I know of) to reject the accidental
null byte.

Reported by smlavine.
2022-01-16 14:17:46 -05:00
June McEnroe e7cec13723 Use Cold for away notices in queries
So that they can be hidden with M-+.
2022-01-16 14:17:03 -05:00
June McEnroe adff312570 Refer to long option names, prefix commands with $ 2021-12-11 20:55:42 -05:00