Unactive current text area may exist only with -tna (at least now).
This patch allows a visible feedback when you are in such a situation,
the corresponding style is edit.current.

Enjoy,
Ilya
--- ./LYCurses.c-precurrent     Sat Oct 21 23:36:18 2000
+++ ./LYCurses.c        Wed Jan 17 19:55:18 2001
@@ -396,7 +396,7 @@ PUBLIC void curses_w_style ARGS3(
        /* FALL THROUGH */
     case ABS_ON: /* change without remembering the previous style */
            /* don't cache style changes for active links and edits */
-       if ( style != s_alink && style != s_aedit
+       if ( style != s_alink && style != s_curedit && style != s_aedit
             && style != s_aedit_pad && style != s_aedit_arr ) {
            CTRACE((tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP));
            if (win == stdscr) cached_styles[YP][XP] = style;
--- ./LYHash.h-precurrent       Sat Oct 21 21:49:10 2000
+++ ./LYHash.h  Wed Jan 17 19:53:08 2001
@@ -42,7 +42,7 @@ extern int    s_alink, s_a, s_status,
 #ifdef USE_SCROLLBAR
                s_sb_bar, s_sb_bg, s_sb_aa, s_sb_naa,
 #endif
-               s_whereis, s_aedit, s_aedit_pad, s_aedit_arr, 
+               s_whereis, s_curedit, s_aedit, s_aedit_pad, s_aedit_arr, 
                s_prompt_edit, s_prompt_edit_pad, s_prompt_edit_arr;
 #define CACHEW 128
 #define CACHEH 64
--- ./LYStyle.c-precurrent      Sat Oct 21 23:27:06 2000
+++ ./LYStyle.c Wed Jan 17 19:54:54 2001
@@ -70,7 +70,7 @@ PUBLIC int    s_alink  = NOSTYLE, s_a     =
                s_sb_bar = NOSTYLE, s_sb_bg = NOSTYLE,
                s_sb_aa = NOSTYLE, s_sb_naa = NOSTYLE,
 #endif
-               s_whereis = NOSTYLE, s_aedit = NOSTYLE,
+               s_whereis = NOSTYLE, s_curedit = NOSTYLE, s_aedit = NOSTYLE,
                s_aedit_pad = NOSTYLE, s_aedit_arr = NOSTYLE, 
                s_prompt_edit = NOSTYLE, s_prompt_edit_pad = NOSTYLE,
                s_prompt_edit_arr = NOSTYLE;
@@ -307,6 +307,11 @@ where OBJECT is one of EM,STRONG,B,I,U,B
        parse_attributes(mono,fg,bg,DSTYLE_ELEMENTS,"edit.active");
        s_aedit  = hash_code("edit.active");
     }
+    else if (!strncasecomp(element, "edit.current", 11))
+    {
+       parse_attributes(mono,fg,bg,DSTYLE_ELEMENTS,"edit.current");
+       s_curedit  = hash_code("edit.current");
+    }
     else if (!strncasecomp(element, "edit.prompt.pad", 15))
     {
        parse_attributes(mono,fg,bg,DSTYLE_ELEMENTS,"edit.prompt.pad");
@@ -454,6 +459,8 @@ PUBLIC void parse_userstyles NOARGS
        s_aedit_arr = s_aedit;
     if (s_aedit_pad == NOSTYLE)
        s_aedit_pad = s_aedit;
+    if (s_curedit == NOSTYLE)
+       s_curedit = s_aedit;
 }
 
 
--- ./LYUtils.c-precurrent      Wed Jan 17 20:25:22 2001
+++ ./LYUtils.c Wed Jan 17 20:26:12 2001
@@ -245,6 +245,14 @@ PUBLIC void highlight ARGS3(
 #else  /* here USE_COLOR_STYLE defined */
        int s = s_alink;
 
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+       if ( textfields_need_activation &&
+            links[cur].type == WWW_FORM_LINK_TYPE &&
+            F_TEXTLIKE(links[cur].form->type) )
+           s = s_curedit;
+#endif
+
+
 #  define LXP (links[cur].lx)
 #  define LYP (links[cur].ly)
        if (flag != ON) {

Reply via email to