Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat text clobbers message text #29

Closed
ldelossa opened this issue Sep 17, 2020 · 5 comments
Closed

Chat text clobbers message text #29

ldelossa opened this issue Sep 17, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ldelossa
Copy link

Maybe not a bug, but is it supposed to be the case that when typing a message incoming chat messages interleave with what you're typing?

To Reproduce
Steps to reproduce the behavior:
Use kirc in a chat where ppl are talking.
Start typing a message.
Text in message will interleave with text from chat

Expected behavior
Message text is written in an area of the ui not interleaved by other chat messages.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: fedora 32
  • Browser N/a
  • Version 0.0.8

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@mcpcpc
Copy link
Owner

mcpcpc commented Sep 18, 2020

This behavior is consistent with other clients, such as sic, but i agree that this is not desired. I currently have fixing this listed todo tracker (#12) but i think it makes sense to keep this as a dedicated issue.

@mcpcpc mcpcpc self-assigned this Sep 18, 2020
@mcpcpc mcpcpc added the bug Something isn't working label Sep 18, 2020
@ldelossa
Copy link
Author

Id be interested in helping out. I have a little bit of experience with term programming, more on the vim side of things. But this looks cool, and i like the idea of a super simple client. Know where youd want to start on this?

@mcpcpc
Copy link
Owner

mcpcpc commented Sep 18, 2020

that would be amazing!

i imagine the best place would be to inspect the termios library flags and see which will give the desired affect: https://man7.org/linux/man-pages/man3/termios.3.html

as far as i gather, we should be able to simply save the current terminal settings, apply the flags that have the desired affect, and restore the saved flags before exiting:

struct termios tp, save;
tcgetattr(STDIN_FILENO, &tp); //get current flags
save = tp;
// define flags
tcsetattr(STDIN_FILENO, TCSANOW, &tp) //set flags
// do stuff
tcsetattr(STDIN_FILENO, TCSANOW, &save) < 0) // restore saved flags

@mcpcpc
Copy link
Owner

mcpcpc commented Sep 21, 2020

fixed in 7eec954

@mcpcpc mcpcpc closed this as completed Sep 21, 2020
@ldelossa
Copy link
Author

Very cool! Excited to check this out. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants