taviso / wpunix

WordPerfect for UNIX Character Terminals
603 stars 17 forks source link

terminal is left in a strange state when wp exits #49

Open hackerb9 opened 2 months ago

hackerb9 commented 2 months ago

I've noticed glitches after exiting wp that cause my terminal to not function correctly. I have to type reset and to get it back to normal. I'd prefer to not have to do that as it clears the screen and I can't see what I was just working on in wp.¹

The bugs I've noticed so far:

  1. Long lines are truncated when they go past the right margin; they should wrap to the next row. Wp disables autowrap mode at the end of a line (DECAWM) but forgets to reenable it. This is fixable by typing tput smam which sends Esc [ ? 7 h. (See man 5 terminfo for info on automargins).
  2. The screen does not always update on certain actions until I hit a key. I haven't tracked this one down yet.



¹ I have alternate screens disabled in xterm via titeInhibit and tiXtraScroll, so wordperfect does not clear the screen when I exit.

taviso commented 2 months ago

I'll take a look, but if you don't want to wait for me, you can actually update the sequences interactively, the wpterm command let's you edit the trs files (it's not great, but it does work).

taviso commented 2 months ago

I think I might have added the alternate screen support and called it done, I didn't realize anyone disabled that 😅