client display and terminal issues after using telnet #79

Closed
opened 2019-11-07 03:39:26 +00:00 by asdf · 2 comments
Collaborator

These are similar or the same issues as referenced in #36. Confirmed as still an issue in develop branch.

Telnet sessions can break the state of the terminal, resulting in weird behaviour in the client display:

  • screen size incorrect, page only drawn to half of the terminal window
  • mouse movement generates input
  • possibly colour bleeding as mentioned in #36

Most of these issues can persist even after quitting the client.

client.go has function handleTelnet() which ends with c.Draw(). I've done a quick test to try resetting and reinitialising to handle any possible terminal issues:

func (c *client) handleTelnet(u Url) {
        ...
        cui.Tput("reset")
        cui.InitTerm()
        c.Draw()
}

Let me know what you think - is this the right approach? I can do some more work on this and raise a PR.

These are similar or the same issues as referenced in #36. Confirmed as still an issue in develop branch. Telnet sessions can break the state of the terminal, resulting in weird behaviour in the client display: - screen size incorrect, page only drawn to half of the terminal window - mouse movement generates input - possibly colour bleeding as mentioned in #36 Most of these issues can persist even after quitting the client. `client.go` has function `handleTelnet()` which ends with `c.Draw()`. I've done a quick test to try resetting and reinitialising to handle any possible terminal issues: ```go func (c *client) handleTelnet(u Url) { ... cui.Tput("reset") cui.InitTerm() c.Draw() } ``` Let me know what you think - is this the right approach? I can do some more work on this and raise a PR.
asdf self-assigned this 2019-11-07 03:39:26 +00:00
sloum was assigned by asdf 2019-11-07 03:39:26 +00:00
asdf added the
bug
telnet
labels 2019-11-07 03:39:26 +00:00
Owner

I was not familiar with reset as an option for tput (tput being one of those things that I discover more about as I need to, but seemingly never before). This approach seems good to me. If you are getting good results with this, it certainly can't be worse than leaving it in a bad state. I think this is a good call.

I was not familiar with `reset` as an option for tput (tput being one of those things that I discover more about as I need to, but seemingly never before). This approach seems good to me. If you are getting good results with this, it certainly can't be worse than leaving it in a bad state. I think this is a good call.
Author
Collaborator

Fixed in #80

Fixed in #80
asdf closed this issue 2019-11-08 05:30:54 +00:00
Sign in to join this conversation.
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#79
No description provided.