mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 02:41:15 -03:00
allow \cJ (\n) to be bound separate from \cM (\r)
This makes it possible (on UNIX systems, don't know about MS Windows) to bind \cJ (\n) independently of \cM (\r, aka [enter]). Resolves #217
This commit is contained in:
committed by
ridiculousfish
parent
6943536ef3
commit
d65c63322e
@@ -1028,6 +1028,8 @@ void reader_init()
|
||||
|
||||
/* Set the mode used for the terminal, initialized to the current mode */
|
||||
memcpy(&shell_modes, &terminal_mode_on_startup, sizeof shell_modes);
|
||||
shell_modes.c_iflag &= ~ICRNL; /* turn off mapping CR (\cM) to NL (\cJ) */
|
||||
shell_modes.c_iflag &= ~INLCR; /* turn off mapping NL (\cJ) to CR (\cM) */
|
||||
shell_modes.c_lflag &= ~ICANON; /* turn off canonical mode */
|
||||
shell_modes.c_lflag &= ~ECHO; /* turn off echo mode */
|
||||
shell_modes.c_iflag &= ~IXON; /* disable flow control */
|
||||
|
||||
Reference in New Issue
Block a user