taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.18k stars 59 forks source link

'Ctrl-Z' Forces Exit to terminal losing all data #107

Open rruhle opened 2 years ago

rruhle commented 2 years ago

'Ctrl-Z' Forces 123 Exit to terminal losing all data in worksheet

Hit Ctrl-Z to Undo, rather than Ctrl-F4. Kicks me out to terminal

[1]+ Stopped 123 -w ~"path to worksheet" "Terminal prompt $"

Trying to "Exit" displays "There are stopped jobs." "Prompt:~$ "

taviso commented 2 years ago

This is actually a feature! You can do some work in the shell, and then type fg to go back to 123.

(Note: you might need to hit Ctrl-L to refresh the display afterwards)

When you press Ctrl-Z you're suspending 123. You can start another program or even another 123 session. See all the programs in the background with jobs, and if you have more than one you can do fg 2 to choose the one you want.

If you actually hate this and don't think you'll ever use it, you can also disable it!

taviso commented 2 years ago

I think I should probably automatically refresh the display on SIGCONT, should be a nice and easy change.

rruhle commented 2 years ago

Thank you for clarifying Ctrl-Z. Accustomed to 123 "/" System" menu to access shell, with the Prompt $ instruction to type "Exit" when done.

Don't see Ctrl-Z in 123 help or keymap, which disables my cursor keys after "fg" "Ctrl-L returns to spreadsheet. My current version is 'lotus123r3_1.0-4betajammy_i386', however loaded with complaints from 'APT re/install'

Bad habit hitting Ctrl-Z, standard UNDO in other programs. How can it be disabled in 123?

taviso commented 2 years ago

Yes - it's not part of 123, it's a standard UNIX thing, it will work in most terminal applications.

You can disable it if you type stty susp undef before you start 123, you can also add that to your .profile or .bashrc to automatically run it when you open a terminal.

(stty is the standard UNIX utility to configure your terminal)

You can also rebind it a different keybinding if you like!

taviso commented 2 years ago

There are a few other standard UNIX keystrokes, if you're interested, you can also change or disable these with stty:

Ctrl+C is "interrupt", 123 interprets it like break on DOS. Ctrl+S Is "stop", it pauses output temporarily, you can restart it with Ctrl+Q Ctrl+\ Is "quit", it sends a signal to quit (applications can ignore it though)

rruhle commented 2 years ago

Excellent, thank you sir.