adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
531 stars 128 forks source link

terminal.d freezes on `getline` after `moveTo()` #259

Closed 0xEAB closed 4 years ago

0xEAB commented 4 years ago
auto t = Terminal(ConsoleOutputType.cellular);
t.moveTo(10, 10);
t.getline("Name: "); // doesn't print `Name: ` but freezes

Terminal emulator: Tilix OS: Ubuntu 18.04.5

adamdruppe commented 4 years ago

OK, I can reproduce it.

My suspicion is the get current cursor position code is stuck in a loop blocking for more data that will never come. That friggen function has been the worst - I hate how these query commands are mixed into the data stream. The Windows way - a dedicated get info function - is so so so much better.

but i'll check it out.

adamdruppe commented 4 years ago

oh it is because 10 is a two digit number. i screwed this up bad, try this commit and see if it passes all your use cases:

https://github.com/adamdruppe/arsd/commit/f22cd2d21b68c3ac1ab198432200b386d290a5c1

0xEAB commented 4 years ago

lgtm

0xEAB commented 4 years ago

thanks