GNUAspell/aspell

Support terminals with limited number of lines

Opened this issue · 2 comments

Set-up

We (Bristol Braille, incl @woodcoder) are designing a system for computer science for Braille readers (blind users) and want to integrate aspell. It uses a Braille display with nine lines (the Canute 360). The Canute has the largest number of lines of any commercial Braille display, most have less, so this change will also benefit users of other all other Braille devices.

Problem

We have it running a Debian system and most command line cli programs work, but aspell doesn't Once it goes under about 15 lines is doesn't have enough space. Shrink it too far (under 13 lines in my tests) and it doesn't show anything other than the white dividing line.

Suggestions

It would be great if aspell could shrink better to fit on nine lines. I suggest having a minimum of one line to show the string in the file being changed, another line for the divider, and the remainder of the lines is used for suggestions, with an option for "m) more options" if the number of options does not fit on the number of remaining lines available, minus two more lines at the bottom for another divider and the status line. This way it will work even at only five lines.

If someone has a suggestion for where to look to make this change ourselves, and an idea of how simple or complex making the change would be, that would also be greatly appreciated.

The code you would want to modify is probably in prog/check_funs.cpp you probably also want to have a look at the check() function in prog/aspell.cpp#L967 for context. It has been a long time since I touched the terminal code, so I really can't offer you that much guidance on what exactly you need to modify. I am okay with your suggestions.

Thanks very much, we'll have a look.