vigna / ne

ne, the nice editor
http://ne.di.unimi.it/
GNU General Public License v3.0
473 stars 33 forks source link

Single ESC breaks ne #118

Closed ivrntsv closed 5 months ago

ivrntsv commented 5 months ago

I've built ne in MSYS2 for MSYS environment (which is kind of similar to cygwin). Build went well.

When I push ESC menu is drawn as expected but ne stops to work correctly. Ctrl-C helps to quit. ESC-ESC and F1 work fine.

vigna commented 5 months ago

That's a bit too generic. "Stops to work correctly" does not really help. Single-ESC behavior happens on a OS timeout, so MSYS2 might be incompatible with that. One quick solution is to set EscapeTime to 2000000000 in your defaults, disabling that behavior. Please read the help section about that (you will need to add the command manually).

ivrntsv commented 5 months ago

I wrote it this way because I can't explain it better. But if you saw that (which I suppose you didn't), it would be clear. Interface is not responding. Inputted characters are drawn to the side of File menu. When I hit ENTER Line: input line is shown for whatever reason. This type of thing.

I will take your advice. Thank you.

Is 2000000000 a specific constant, or any reasonably big value is suffice?

ivrntsv commented 5 months ago

Is 2000000000 a specific constant, or any reasonably big value is suffice?

Don't answer, please. I've read. It must be in 0-255 range.

vigna commented 5 months ago

It's just within a 32-bit integer, I don't know your achitecture. escape_time is an int. Anyway it's 200M seconds, like, a month. You should be fine.

Yes, sounds like something bad happens when the timeout expires. Since it's an emulation platform is very difficult to do a diagnosis without having it installed.

vigna commented 5 months ago

Is 2000000000 a specific constant, or any reasonably big value is suffice?

Don't answer, please. I've read. It must be in 0-255 range.

Oww... I forgot we put a limit on that. No, that's not good.

But, 0 appears to disable it. Sorry to be vague, that code has more than 30 years...

ivrntsv commented 5 months ago

0 is good.

vigna commented 5 months ago

Of course you can't use single escape, but there's always F1 or ESC-ESC.

ivrntsv commented 5 months ago

Is 2000000000 a specific constant, or any reasonably big value is suffice?

Don't answer, please. I've read. It must be in 0-255 range.

Oww... I forgot we put a limit on that. No, that's not good.

Maybe a limit is here for a reason. Doc says EscapeTime N is tenths of second.

ivrntsv commented 5 months ago

Though, maybe doc should be clearer. Tenths of second is 1000 / 10 = 100 ms. Right?

vigna commented 5 months ago

The limit is the limit of the VTIME termios variable. I changed the doc to say explicitly that 0 will disable escape time. That's in fact what the code does, but I completely forgot about that.