Entering CTRL+D at the input prompt breaks hotkey control #184
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#184
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found this while testing this issue in linkulator, reported by @cmccabe. Affects current development versions as well as the previous release.
Steps to reproduce:
Results:
This is pretty minor so no rush to fix. I can take a look at it, but as per Linkulator I'm not sure what should actually happen. Should it just be disregarded?
I would like to get it fixed, but I would not call it urgent. It is user recoverable though, without restarting the application.
If you enter a command (rather than a hot key) it will restore normal opperation. Steps:
:
to enter command modeenter
to go to new line:home
followed byenter
(any command is fine)j
ork
to scroll and the screen will be redrawn and normal opperation can resume.Now, I dont expect a regularl user to do all that, but I also dont expect them to have sent an EOF signal in the first place. :-/
I'm going to mark this as a bug and non-urgent. We can likely catch the signal if that is how it is being interpreted. However, it is doing what it should: ^D should send EOF to the input... so we may have to do a special catch inside the input to check for it.
I thought this was an issue with EOF handling. This does not seem to be the case, it's just that we don't reenable character mode when handling errors in
cui.GetLine
:Adding
termios.SetCharMode()
within the error handling block, before we return, seems to resolve this issue. I thought usingdefer termios.SetCharMode()
right after we enable line mode might be neater, so I've done this in branch handle_input_errors.@sloum let me know what you think. If you prefer a PR to review, should I target branch release2.3.2?
Ah, that makes sense! I would love a PR if you dont mind. Can you create the branch
release2.3.3
off ofdevelop
and push that then create a branch for this change (again off of develop) and PR it intorelease2.3.3
? I can add the release branch if you'd prefer.I think the
defer
route is maybe the good one? Though it does mean that we have the overhead of always callingSetCharMode
on every call, rather than just on errors... What do you think? I'm also not sure about the code overhead for defer, I think it is likely a jump or a goto under the hood... but I'm not sure.Either way of handling it (defer or just in the error block) sounds fine to me.
Closed by #186 , seemingly automagically? I had planned on just commenting that it was in a release branch and I'd close it once that gets merged in... but I suppose this works too.
Yeah I did not expect that either, must be a recent change. That's cool!