On 15.05.2024 16:01, Wilhelm Spiegl via Freedos-devel wrote:
The main problem is, that if you type "arrow up" for "history" (repeating the previous command) and then "arrow left" (for moving the cursor into this long command) causes a break in the long option line at both versions. The cursor seems to jump one line higher when you try to correct a character.

One more example:

You are at C:\freedos\doc\foxcalc and then type:
"C:\freedos\bin\edit /b c:\freedos\dok\foxcalc\changes.txt"

(example, I know that the command can be shorter). Then you execute edit, notice, that "dok" is wrong and want to correct the "dok" to "doc" by "arrow" up (repeating command) and "arrow left" by going to the position "k" of "doc", entering "c". Before you can delete the "k" in "dock" the cursor jumps one line higher and shows: "based on FreeDOS DFLAT+ 1.0 application framework" space...   "\foxcalc\changes.txt"
I hope that this behaviour is reproducable.

Yes! This behavior is reproducible and a bug in the command line input handling of FreeCOM. I was able to identify to code responsible for the error and hopefully fixed it. I will create a merge request to upstream after Willi confirmed that the bug is gone.

Some details: cursor positioning algorithm is broken if scrolling is involved, because it does not correctly keep track of the screen coordinates the command line starts. Further, the routines were never meant to function with command lines longer than 127 characters, failing if the command line spans over more than two lines. Now that FreeCOM supports commands of up to 254 characters, this breaks.

The new code will break if the command line is longer than one screen. I think that this is plenty enough, considering maximum command line length is restricted to 254 characters.

Bernd




_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to