caderek / gramma

command-line grammar checker
https://caderek.github.io/gramma/
ISC License
252 stars 18 forks source link

Pressing the ESCAPE key in the "check mode" causes the application to terminate with an exception #9

Closed DevSilv closed 5 years ago

DevSilv commented 5 years ago

Steps to reproduce

  1. Run the application with the following command:

    gramma check "."
  2. Press the ESCAPE key.

Actual behavior

The application terminates, and the output contains a stack trace, starting with the following:

(node:12393) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'value' of undefined
...

Expected behavior

I do not know whether all the described behavior or only part of it is a bug. The README does not contain information about possible behavior of any key. Possibilities of expected behavior are:

Notes

As I have observed, this behavior happen not only using gramma check, but I have not checked all the possible cases, so I leave for the author finding the scope of this behavior.


UPDATE: This problem happens also with the combination CTRL+D. But, since I cannot currently make the application work, I cannot confirm whether the stack trace is the same. I will try that later.

caderek commented 5 years ago

Fixed all cases of errors on abort with version 1.0.0