emacs-style movememnts and page up / down.

This commit is contained in:
2025-11-29 20:56:21 -08:00
parent f7c6e3db9f
commit f9606626b4
10 changed files with 324 additions and 164 deletions

View File

@@ -9,15 +9,21 @@
bool
TerminalFrontend::Init(Editor &ed)
{
initscr();
cbreak();
noecho();
keypad(stdscr, TRUE);
nodelay(stdscr, TRUE);
curs_set(1);
// Enable mouse support if available
mouseinterval(0);
mousemask(ALL_MOUSE_EVENTS, nullptr);
initscr();
cbreak();
noecho();
keypad(stdscr, TRUE);
// Enable 8-bit meta key sequences (Alt/ESC-prefix handling in terminals)
meta(stdscr, TRUE);
// Make ESC key sequences resolve quickly so ESC+<key> works as meta
#ifdef set_escdelay
set_escdelay(50);
#endif
nodelay(stdscr, TRUE);
curs_set(1);
// Enable mouse support if available
mouseinterval(0);
mousemask(ALL_MOUSE_EVENTS, nullptr);
int r = 0, c = 0;
getmaxyx(stdscr, r, c);