JeffreyBenjaminBrown / digraphs-with-text

BSD 3-Clause "New" or "Revised" License
65 stars 5 forks source link

Avoid hard-erroring out of the UI when trying to view an empty query #15

Open no-identd opened 5 years ago

no-identd commented 5 years ago

Opening the UI with ui empty and then (with nothing entered) hitting M-v closes the UI and yields:

*** Exception: /home/[REDACTED]/digraphs-with-text/src/Dwt/UI/State.hs:(101,7)-(102,64): Irrefutable pattern failed for pattern commandString : _

That seems unnecessary, especially since it can easily lead to data loss (unless you immediately make use appropriate use of it in the next evaluation, e.g. by going ui it), as this happens any time the top window lacks content.