magiblot/tvision

Very slow under Windows Console

zingchen opened this issue · 7 comments

I use the pre-built Turbo editor (TVedit.exe) to check if Turbo Vision is suitable for my need. Every time the cursor is moved (point-and-click with mouse, by Backspace, Left Arrow, Right Arrow, Ctrl+one of those, or simply by typing an alphanum key) the cursor disappears for almost 1 second, which is terribly slow.

Hi!

I think I know what you mean. What version of Windows are you using? Is the application responsive while the cursor is not visible? (i.e. can you keep typing text or move things with the mouse?) Do you also see this problem if using the Borland C++ build? (warning: no Unicode)

Cheers.

I'm using Windows 7 - x64 edition. When the cursor is not visible, I can still type blindly fast (100 wpm, i.e. 500 characters per minute). I can navigate blindly fast (e.g. holding Left arrow for a while to move left several characters). In actions that does not have/need a visible cursor, such as page up/down, browsing a file list, the application is fast.

As for cursor visibility, the Borland C++ build is better, but still much slower than the usual console (Command Prompt, cmd.exe).

The best test to see the difference is horizontal navigation (holding Left or Right arrow to move the cursor and track its position).

Okay, that's just as I thought. I'm pretty sure this is a bug in old versions of the Windows Console. I can try to work around it, but I'm not sure I will succeed.

Cheers.

Please please fix it. The cursor on the command line of the Command Prompt is responsive. There is no reason a console application can't be.

This issue turns out to be caused by invoking WriteConsole with nNumberOfCharsToWrite = 0. So the solution is very simple and the last commit should fix this issue.

Cheers.

I tested the latest build. Cursor visibility is fast now.

Thank you very much.

Cool! You are welcome.