<<< Date Index >>>     <<< Thread Index >>>

For 1.5.10: cursor patch



Dear mutt developers,

The included patch puts the cursor at the beginning of the selected line
in mutt menus, even when the arrow_cursor variable is unset, making it
easier for blind persons to follow these menus.

Here is a more detailed version of the storry.

A blind person has two ways to use a computer: speech synthesis and
braille display. Braille displays are generally very small. Most of them
have just one line of 40 characters, that is, they can display one half
of a screen line in text mode. Some are even smaller.
Since all the screen can't be displayed simultaneously on the braille
display, the program that allows the blind user to "see" what is
displayed on the screen must decide which part of the screen must be
shown on the braille display.
The most frequent decision is to display the part of the screen that
contains the cursor.

In mutt, when the arrow_cursor variable is unset, the cursor is put at
the end of menu lines for the moment. Consequently, the end of the line
is displayed on the braille display, whereas the interesting information
is generally located at the beginning of the line.
Until now, the only solution to this problem was to set the arrow_cursor
variable. When this variable is set, an arrow and a space are printed at
the beginning of the selected line, and then comes the cursor and the
content of the line itself. This solution has two drawbacks. On the one
hand, in most distributions, the default is to have the arrow_cursor
variable unset, which makes it specially difficult for blind users to use
mutt, and above all for newbies, until they figure out what to do (which
is not obvious at all, IMHO). On the other hand, having this "-> " string
displayed at the beginning of the selected line implies a lost of 3
characters on the braille display, which is really much on a 20
characters display.

The followng patch solves the previously described problem by
positionning the cursor "the right way" even when the arrow_cursor
variable is unset. As you can see, the patch is very small, so I don't
think it will introduce any problem in the code.
Last but not least: the cursor is not visible on the computer screen, oo
matter how the arrow_cursor variable is set. Consequently, this patch
introduces no visual change in mutt.

Thanks a lot for your attention,
Sébastien.

--- mutt-1.5.6/curs_main.c.old  2005-02-26 12:02:35.684419200 +0100
+++ mutt-1.5.6/curs_main.c      2005-02-26 12:05:22.946991424 +0100
@@ -593,7 +593,7 @@
       if (option (OPTARROWCURSOR))
        move (menu->current - menu->top + menu->offset, 2);
       else
-       move (menu->current - menu->top + menu->offset, COLS - 1);
+       move (menu->current - menu->top + menu->offset, 0);
       mutt_refresh ();
 
 #if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM)
--- mutt-1.5.6/menu.c.old       2005-02-26 12:02:34.246637776 +0100
+++ mutt-1.5.6/menu.c   2005-02-26 12:05:22.946991424 +0100
@@ -855,7 +855,7 @@
 
     /* move the cursor out of the way */
     move (menu->current - menu->top + menu->offset,
-         (option (OPTARROWCURSOR) ? 2 : COLS-1));
+         (option (OPTARROWCURSOR) ? 2 : 0));
 
     mutt_refresh ();