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

Re: For 1.5.10: cursor patch



On 2005-03-29 04:05:49 +0200, Sébastien Hinderer wrote:

> 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.

On 2005-03-29 10:06:45 -0500, Thomas Dickey wrote:
> 
> >On some terminals the cursor cannot be made invisible.
>      most

The patch below adds a $braille_friendly configuration option that
makes the cursor positioning configurable.

Sébastien: If there are more cursor positioning or display patches
that can make mutt more Braille friendly, then I'd encourage you to
submit these and to also guard them with the $braille_friendly
configuration option.

-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.




cvs diff: Diffing .
Index: curs_main.c
===================================================================
RCS file: /cvs/mutt/mutt/curs_main.c,v
retrieving revision 3.21
diff -u -r3.21 curs_main.c
--- curs_main.c 28 Feb 2005 18:33:45 -0000      3.21
+++ curs_main.c 12 Jun 2005 18:21:35 -0000
@@ -576,6 +576,8 @@
 
       if (option (OPTARROWCURSOR))
        move (menu->current - menu->top + menu->offset, 2);
+      else if (option (OPTBRAILLEFRIENDLY))
+       move (menu->current - menu->top + menu->offset, 0);
       else
        move (menu->current - menu->top + menu->offset, COLS - 1);
       mutt_refresh ();
Index: init.h
===================================================================
RCS file: /cvs/mutt/mutt/init.h,v
retrieving revision 3.70
diff -u -r3.70 init.h
--- init.h      23 Mar 2005 10:51:11 -0000      3.70
+++ init.h      12 Jun 2005 18:21:37 -0000
@@ -276,6 +276,15 @@
   ** When this variable is set, mutt will include Delivered-To headers when
   ** bouncing messages.  Postfix users may wish to unset this variable.
   */
+  { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 },
+  /*
+  ** .pp
+  ** When this variable is set, mutt will place the cursor at the beginning
+  ** of the current line in menus, even when the arrow_cursor variable
+  ** is unset, making it easier for blind persons using Braille displays to 
+  ** follow these menus.  The option is disabled by default because many 
+  ** visual terminals don't permit making the cursor invisible.
+  */
   { "charset",         DT_STR,  R_NONE, UL &Charset, UL 0 },
   /*
   ** .pp
Index: menu.c
===================================================================
RCS file: /cvs/mutt/mutt/menu.c,v
retrieving revision 3.16
diff -u -r3.16 menu.c
--- menu.c      28 Feb 2005 15:15:23 -0000      3.16
+++ menu.c      12 Jun 2005 18:21:37 -0000
@@ -870,8 +870,14 @@
 
 
     /* move the cursor out of the way */
-    move (menu->current - menu->top + menu->offset,
-         (option (OPTARROWCURSOR) ? 2 : COLS-1));
+    
+    
+    if (option (OPTARROWCURSOR))
+      move (menu->current - menu->top + menu->offset, 2);
+    else if (option (OPTBRAILLEFRIENDLY))
+      move (menu->current - menu->top + menu->offset, 0);
+    else
+      move (menu->current - menu->top + menu->offset, COLS - 1);
 
     mutt_refresh ();