Open nicholascarroll opened 2 months ago
The main thing I'm worried about here is that it might sit there discarding everything if whatever condition it wants isn't met. I haven't had the chance to test this yet though so it may be fine.
I just accidentally discovered that if you press C-x C-k C-k, you will get a Segmentation fault (core dumped). I tested this on current version and also on version 7652c69 .
I just accidentally discovered that if you press C-x C-k C-k, you will get a Segmentation fault (core dumped). I tested this on current version and also on version 7652c69 .
Looks like ^K isn't checking for an empty buffer. You don't need to C-x C-k - just C-k on an empty buffer.
ref #34
When encountering unknown commands, the current implementation returns specific values:
return 033;
return CTRL('x');
This can result in some characters being accidentally entered into the buffer. I made a code change in my fork of emsys , but am not submitting a pull request because I am not sure if it's the best solution.My code change was to comment out the "return CTRL('x');" in CX_UNKNOWN, and ESC_UNKNOWN and discard the rest of the escape sequence: