-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Automatically refresh the screen after suspend #213
Comments
Hello. Don't this happen in any ncurses app? Do you know whats the signal sent when resuming with fg command..? |
Using whatever the latest sc-im package is on FreeBSD, I experience the same. Suspending puts the shell prompt wherever my cursor happened to be, and resuming doesn't refresh the screen either. In addition to the above, even after refreshing the screen following suspension, I don't get a visible cursor in my shell. I don't usually have trouble with other programs, e.g. vim, less, etc. |
I adore |
If that is the case it would be easy to fix! |
Please update to latest commit in freeze branch and try this!! |
No dice yet for me on FreeBSD: On 87242d8 |
Try resuming.. |
Typing However, if I first reset the screen with |
@andmarti1424 Thanks, it does resume cleanly for me on Ubuntu 17.10! However, when I suspend it in the first place it doesn't leave the terminal in a usable state. When I press |
It wont be neccesary. I will try to fix it this afternoon. |
Could you please try again with latest commit?! |
@andmarti1424 Works like a charm, thank you so much! |
The issue is fixed for me. Suspend and resume work great - just like vim. Thank you! A few loose ends:
|
I dont know about that "syntax error". I dont have that problem. Anyone else have that? |
It seems i had an invalid line in my Perhaps we could change the error message from
|
That is not possible since thats a parser error and dont know the caller (in this case (.scimrc) |
@sjmulder, whats shown in your picture shouldnt happen. It should clean the sc-im spreadsheet and leave everything black (or your terminal background color) Whats your OS? You have latest ncurses or it is old? |
That's what happens if I launch sc-im, then immediately suspend. I'm using almost up-to-date FreeBSD, with system libraries, except libxslwriter which comes from a package:
To build, I have added the following to the top of the Makefile:
Other programs like vim are using the same ncurses version. |
I did some further testing:
It seems then that the problem is somehow specific to the combination of scim and sh. (Although I have not tested any combinations other these listed.) |
@sjmulder, please take note that VIM does not use ncurses. Yes, I believe the shell has its own interpretation of the SIGTSTP signal.. Regardin sc-im ncurses is paused and resumed as it should acording to ncurses documentation. I believe there is nothing more we can do about this inside sc-im. |
The vim binary I use is linked against ncurses but maybe it's not used for the UI. In any case, the terminal locking up completely can hardly be proper behaviour, not? It's easy to reproduce on Ubuntu:
|
It sure should not lock the terminal. What I say is that is probable has nothing to do with scim. I believe its more a shell issue. That steps to reproduce it, do not fail in my arch instalation. Just to see if anything changes..could you please try the same steps with mocp (moc package) or any other ncurses app? |
With
It works well:
Again, this doesn't clear the screen entirely on my system, by design, but the prompt works properly. I find it hard to believe that both FreeBSD's |
If it locks the terminal thats a behaviour of not reseting ncurses before suspending. Perhaps it uses another signal? Its hard to me to analyse this since I dont have freebsd and ubuntu right now. Could you do a simple C program and see whats the signal send by the OS when you press ctrl z? |
Perhaps both SIGSTOP and SIGTSTP should be caught. Anoyher test in your system would be replacing SIGTSTP with SIGSTOP and see if the behavior is the same.. |
@sjmulder , could you test the above? thanks! |
@andmarti1424 I can't do such testing right now, sorry. If it helps, this is the control mapping on my FreeBSD system:
And on Ubuntu on WSL:
|
Ubuntu’s |
I use Ctrl Z to shell out, run commands, and then
fg
to return to scim. However, now the screen is garbaged up and I have to press Ctrl LENTER to refresh the screen.I'd like scim to do this automatically.
Screen after using
fg
to return to scimThe text was updated successfully, but these errors were encountered: