Handle input errors while returning to correct terminal mode #186

Merged
sloum merged 1 commits from handle_input_errors into release2.3.3 2020-09-08 04:18:08 +00:00
Collaborator

Fixes #184

This approach uses defer to ensure character mode is reenabled no matter how the function returns. An alternative approach would see a second termios.SetCharMode() statement within the error check block.

There doesn't seem to be any other occurrences of this specific issue, so I think it only needs to be addressed here.

Fixes #184 This approach uses `defer` to ensure character mode is reenabled no matter how the function returns. An alternative approach would see a second `termios.SetCharMode()` statement within the error check block. There doesn't seem to be any other occurrences of this specific issue, so I think it only needs to be addressed here.
asdf added the
bug
non-urgent
labels 2020-09-08 03:48:41 +00:00
Owner

This looks good to me. I think I was thinking about it wrong in my head and this makes perfect sense. 👍

This looks good to me. I think I was thinking about it wrong in my head and this makes perfect sense. 👍
sloum merged commit 26a5e3869d into release2.3.3 2020-09-08 04:18:08 +00:00
sloum deleted branch handle_input_errors 2020-09-08 04:18:25 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#186
No description provided.