summary refs log tree commit diff
path: root/edit.c
AgeCommit message (Collapse)Author
2022-03-16Skip non-spacing when moving and deleting by "character"June McEnroe
I uh... don't think I can write tests for this, since macOS's wcwidth is notoriously useless.
2022-02-20Share a cut buffer between all edit buffersJune McEnroe
2022-02-20Assert return values in edit testsJune McEnroe
2022-02-20Move mbs out of struct Edit, use a global bufferJune McEnroe
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-20Make sure new cap is actually larger than new lengthJune McEnroe
2022-02-20Remove unused mbs.len field from struct EditJune McEnroe
2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe
2022-02-18Implement new line editing "library"June McEnroe
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-18Fix M-f orderingJune McEnroe
2022-02-09Treat any amount of space and punctuation as word boundariesJune McEnroe
This matches behaviour of, e.g. zsh -o emacs.
2021-11-19Cycle between adding colon suffix and not in tab completeC. McEnroe
Allows completing a nick at the beginning of a message without a colon by continuing to press tab, as well as after another nick already followed by a colon without turning it into a comma-separated list of nicks all followed by a colon. For example, tab can be used to cycle between the following pairs: nick1: | nick1 | nick1, nick2: | nick1: nick2 |
2021-07-26Use (bright) red for \com text macro 1.9C. McEnroe
2021-06-24Stop at previous \ when expanding macrosC. McEnroe
There was no reason to ever require whitespace before the macro name.
2021-06-14Add \com text macroC. McEnroe
2021-02-15Don't insert wchar_t if it can't be converted to mbsC. McEnroe
Otherwise it could hit the assertion in editBuffer while converting to mbs for consumption by the rest of the program. It's possibly to trigger this with LC_ALL=C and typing C-z C-v M-a, for example.
2021-02-15Don't expand macro if it can't be converted to mbsC. McEnroe
Otherwise expanding a macro could hit the assertion in editBuffer while converting to mbs for consumption by the rest of the program.
2020-11-08Use wmemcpy/wmemmoveC. McEnroe
2020-08-18Preserve colon from previous tab-completeC. McEnroe
This fixes the case when pinging multiple nicks and one of them needs to be cycled through.
2020-08-04Say "OpenSSL" in additional permission noticesC. McEnroe
LibreSSL is "a modified version of that library".
2020-08-02Add \banhammer macroC. McEnroe
From the Textual extras command /banhammer.
2020-07-13Add current topic to tab-complete so it can editedC. McEnroe
2020-06-08Add additional permission for linking with LibreSSLC. McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-04-07Add M-q to collapse whitespaceC. McEnroe
2020-04-01Fix multi-mention tab completion conditionC. McEnroe
I don't know why I ever programmed it this way. It was really annoying when trying to write "some phrase, nick".
2020-04-01Pass correct length to mbstowcsC. McEnroe
Too used to sizeof being the right thing for regular strings.
2020-03-31Add \blushC. McEnroe
2020-03-31Add \bear, \cool, \hug, \unflip, \waveC. McEnroe
2020-03-30Add text macrosC. McEnroe
2020-03-30Tab complete from last iswspaceC. McEnroe
2020-03-23Bump edit buffer cap to 1024C. McEnroe
With message splitting it's reasonable to allow this to be larger.
2020-02-15Replace small integers in size_t with uintC. McEnroe
2020-02-14Don't copy into cut buffer during tab completeC. McEnroe
2020-02-12Simplify transpose swapC. McEnroe
2020-02-12Add C-t transposeC. McEnroe
Also in emacs, weechat.
2020-02-09Avoid VLAs in tab completeC. McEnroe
2020-02-09Use iswspace for word movementC. McEnroe
2020-02-09Add C-yC. McEnroe
This is weechat's binding for it.
2020-02-09Add C-w and M-dC. McEnroe
2020-02-09Rename kill opsC. McEnroe
2020-02-09Add M-b and M-fC. McEnroe
2020-02-09Add C-kC. McEnroe
Also rename all the edit ops to something consistent.
2020-02-09Add C-dC. McEnroe
2020-02-09Hook up tab-completeC. McEnroe
2020-02-09Simplify edit buffer conversion and input renderingC. McEnroe
2020-02-07Populate completion with commandsC. McEnroe
2020-02-07Add some real line editing operationsC. McEnroe
2020-02-05Add extremely basic editing and message sendingC. McEnroe
2020-02-04Convert editHead and editTail from wchar_tC. McEnroe
2020-02-04Split showing style codes and word wrappingC. McEnroe