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

Fix wrong termios save code #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xiami2012
Copy link

This bug is introduced by 20e0658.
Saving a *unix.Termios and then modifying it in SetRaw() makes the
saved state useless.

By restoring saveTermios type from *unix.Termios to unix.Termios,
SetRaw() no longer influences the saved termios.

This should fix #228 and #233 .

Signed-off-by: Xiami i@f2light.com

This bug is introduced by 20e0658.
Saving a *unix.Termios and then modifying it in SetRaw() makes the
saved state useless.

By restoring saveTermios type from *unix.Termios to unix.Termios,
SetRaw() no longer influences the saved termios.

This should fix c-bata#228 and c-bata#233 .

Signed-off-by: Xiami <i@f2light.com>
@yunginnanet
Copy link

I can confirm that this fixes the issue for me

Linux st1ng 5.11.0-18.1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 5.11-32.1~sid (2021-05-02) x86_64 GNU/Linux

GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu)

@imaben
Copy link

imaben commented Jul 8, 2021

+1

@gennaro-tedesco
Copy link

Is this merge request being looked at (or perhaps there is another preferred method to reset the prompts)?

@mgabeler-lee-6rs
Copy link

@c-bata the latest release is largely unusable due to this issue, it would be great if you could take a look at this simple fix please!

@imander
Copy link

imander commented Oct 4, 2021

Confirmed that this works 👍

@yunginnanet
Copy link

@c-bata is there anybody out there

are you okay

@oliveselow
Copy link

Ok

Copy link

@oliveselow oliveselow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@josephspurrier
Copy link

Great, thanks for catching the pointer issue where the original term state is overwritten when converting the terminal to raw mode because the code is passing around a pointer. I confirmed the commit fixes the bug and look forward to this being merged in to this fantastic library!

josephspurrier added a commit to josephspurrier/go-prompt that referenced this pull request Jan 17, 2022
@mathieubenoit
Copy link

Hi, I like this library but this issue is super annoying. Can this be merged ??

@yunginnanet
Copy link

yunginnanet commented Feb 8, 2022

Hi, I like this library but this issue is super annoying. Can this be merged ??

we've been waiting for a long time, I'd recommend just forking it and changing the mod path. that's what I've done and I imagine many others have done as well.

@mitchsw
Copy link

mitchsw commented Feb 23, 2022

Hi, could this please be merged @c-bata

ktr0731 added a commit to ktr0731/go-prompt that referenced this pull request Apr 3, 2022
ktr0731 added a commit to ktr0731/go-prompt that referenced this pull request Apr 3, 2022
@nfx
Copy link

nfx commented Jun 2, 2022

ping

@yunginnanet
Copy link

yunginnanet commented Jun 3, 2022

ping

just fork it or use an existing fork

ong we just gotta pray that the homie C-13ata didn't die on us - it's been nearly a year

free that mf out the 13ox - they dindu nuffin

RainyBow added a commit to RainyBow/go-prompt that referenced this pull request Oct 9, 2022
RainyBow added a commit to RainyBow/go-prompt that referenced this pull request Oct 9, 2022
@quaintdev
Copy link

@c-bata please merge this PR. This is very useful repository and I wish to see it progress further. If you are not interested in maintaining this project please mention that in README.md Someone might step in to maintain it.


この PR をマージしてください。これは非常に便利なリポジトリなので、さらに発展することを期待しています。このプロジェクトの保守に興味がない場合は、誰かがプロジェクトの保守に介入する可能性があることを README.md に記載してください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal does not display command after go-prompt exit