mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 05:54:38 +08:00
ESC in INSERT mode used to switch straight to NORMAL. Now it follows the same arrow-key probe COMMAND mode already does: if the next two bytes are "[A" or "[B", treat as Up / Down and walk through the last 16 messages this client has sent. A plain ESC still falls through to NORMAL — the 50 ms probe timeout keeps that path responsive. Storage: new client_t fields char insert_history[16][MAX_MESSAGE_LEN]; int insert_history_count; int insert_history_pos; Recording: every Enter that broadcasts a message pushes the input buffer onto the ring (with FIFO eviction at 16) and resets pos. Down at the bottom of the ring returns to an empty input. This is the standard chat-client recall that vim users (and anyone who's ever used a shell) expect. |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| bootstrap.h | ||
| chat_room.h | ||
| client.h | ||
| commands.h | ||
| common.h | ||
| exec.h | ||
| input.h | ||
| message.h | ||
| ratelimit.h | ||
| ssh_server.h | ||
| tui.h | ||
| utf8.h | ||