prevent link breakage in README
The old cdn urls usually get taken down when the subject is updated.
quit when pressing escape
Reference:
If the user presses esc key, the program musn’t send anything to the
shell and it has to exit properly.
fix abstract art being displayed after render error message
This bug can be reproduced by first making the screen big enough to
display options and then making it smaller to display an error. The text
after the error message isn't cleared. This regression has been
introduced in 58e0f76 ("fix render norm").
move to next item after selecting
Reference:
One or more choices can be selected or un-selected with the the space
key. With each selection, the cursor must automatically position itself
on the next element.
fix build on linux
The SIGSYS signal has a higher index on Linux:
../src/handle.c:62:3: error: array index in initializer exceeds array bounds
62 | [SIGSYS] = { .handler = handle_exit_signal },
| ^~~~~~
../src/handle.c:62:3: note: (near initialization for ‘g_handle_signal_map’)
Also setting --std=c99 unfortunately disallowed the usage of
sys_siglist.
make handle_suspend more cross-platform
The suspend signal technically doesn't need to be fired using CTRL+Z.
It could be bound to any key. Use tcgetattr to find the right key.
always leave terminal in a clean state after receiving signal.
Reference:
Whichever way your program ends, the default configuration of your
terminal MUST be restored. This is true even after it received a signal
(except for the signals that we cannot intercept, but this would mean
that your program does not work).
handle CTRL+Z and fg
Reference:
We must be able to interrupt your program with ctrl + z and restore it
with fg without seeing any changes in its behavior.
rewrite the linked list implementation
The new linked list implementation has been inspired by the list.h from
the Linux kernel.
display message when terminal is too small to display all options