diff options
author | June McEnroe <june@causal.agency> | 2022-02-18 23:46:06 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-02-18 23:47:11 -0500 |
commit | 1a2477ef7a34cc24c7bc18d7b6326643ce0995a2 (patch) | |
tree | 3b61b975ac5abc34bd6513c23486293c9f93b60f /chat.h | |
parent | Simplify cursor positioning in input (diff) | |
download | catgirl-1a2477ef7a34cc24c7bc18d7b6326643ce0995a2.tar.gz catgirl-1a2477ef7a34cc24c7bc18d7b6326643ce0995a2.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | chat.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/chat.h b/chat.h index 753d1a3..8a9a48f 100644 --- a/chat.h +++ b/chat.h @@ -341,31 +341,6 @@ int bufferReflow( struct Buffer *buffer, int cols, enum Heat thresh, size_t tail ); -enum Edit { - EditHead, - EditTail, - EditPrev, - EditNext, - EditPrevWord, - EditNextWord, - EditDeleteHead, - EditDeleteTail, - EditDeletePrev, - EditDeleteNext, - EditDeletePrevWord, - EditDeleteNextWord, - EditPaste, - EditTranspose, - EditCollapse, - EditInsert, - EditComplete, - EditExpand, - EditEnter, -}; -void edit(uint id, enum Edit op, wchar_t ch); -char *editBuffer(size_t *pos); -void editCompleteAdd(void); - const char *complete(uint id, const char *prefix); const char *completeSubstr(uint id, const char *substr); void completeAccept(void); |