lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev dev.15 patch 2


From: Klaus Weide
Subject: lynx-dev dev.15 patch 2
Date: Thu, 25 Nov 1999 10:48:40 -0600 (CST)

A bunch of stuff.  Had to get this out of my way.
This is based on top of the previous patch.

I haven't tried to merge any recent patches by others in -
there is still work to do for Tom...

   Klaus  

* Correction in code executed after textarea external editing (that determines
  when to prompt for re-wrapping): use start_anchor not anchor_ptr.  Without
  this correction, invalid memory access could occur.  (This was probably
  also responsible for producing the prompt when it shouldn't be produced
  in some cases, as has been reported.)
* Some tweaks of Novice mode help lines: don't show wrong key "to delete all
  text in field" (FORM_NOVICELINE_TWO); replaced an occurence of <delete>
  with <backspace>.  In some cases (e.g. disabled fields), prefer no info
  to wrong info.
* Extended KEYMAP option: additional field can specify DIRED to request
  mapping in the Dired mode key_override table rather than the normal
  keymap table.  Documented the DIRED field and default override mapping
  in lynx.cfg.
* Corrected KEYMAP display for dired mode.  It could display the normal
  binding when that wouldn't actually be used, for example if a key is
  bound to DO_NOTHING for DIRED.  The logic deciding whether to show a
  separate line for uperrcase letters was only looking at the normal keymap.
* Reset the edit_mode flag (indication of Dired mode) in various places,
  so the flag doesn't stat TRUE after a new page has been loaded.  For
  example, invoking the forms based 'O'ptions page from a Dired directory
  view would leave the Dired key bindings enabled within the Options page.
* For LYNXMESSAGES: page of recent statusline messages, removed setting of
  the LYforce_no_cache flag in getfile().  Set the flag in LYMainLoop.c
  instead, but only for following a link.  This makes the page act more like
  a normal no-cache document, for example returning to it via PREV_DOC does
  not cause an automatic update.  The special handling in LYMainLoop.c is
  necessary because the link to LYNXMESSAGES: appears on the History Page,
  and following a link from the History Page (as well as some other generated
  user interface pages) normally implies overriding of no-cache behavior which
  we don't want in this case.
* In LYNXMESSAGES: page, number recent statusline messages in historic order,
  starting with 1 for the oldest.  This should make it more obvious that they
  are listed latest-first.  Add "(No messages yet)" text if there are no
  messages.  Removed generation of invalid <pre>.
* Use a temporary file instead of the normal .lynxrc file for saving and
  restoring current settings in reload_read_cfg().  This avoids unexpected
  side effects of lynx.cfg reloading (LYNXCFG://reload action), i.e.
  silent modification or first-time generation of .lynxrc contents.
  In principle this should make reloading of lynx.cfg usable for accounts
  that don't allow saving of personal settings (i.e. option_save restriction,
  implied by -anonymous) if other restrictions don't forbid it; but
  currently the option_save restriction is still obeyed for saving to
  the temporary file (so that reloading of lynx.cfg is prevented).
* Tweaks for LYNXCFG: and LYNXCOMPILEOPTS: pages: honor REUSE_TEMPFILES
  setting if pages need to be regenerated, and clean up the memory for
  holding the file URLs in free_lynx_cfg().  Recover if the tempfile has
  unexpectedly disappeared, by regenerating it.  Also regenerate tempfile
  if NOCACHE key ('x') is used.  Added extra checks before doing automatic
  uncaching of previous page in LYNXCFG://reload code, to test whether the
  previous page is really a LYNXCFG: view.
* Corrected problems with "show color" in forms Options page.  Omit "ON"
  choice if color is not possible (but saving allowed).  When option_save
  restriction was in effect, the ON/OFF initialisation was wrong (resulting
  in unwanted toggling of color each time options were changed in an
  anonymous account).
* Tweaks of reload_read_cfg() for retaining "show color" setting and for
  updating display_lines (user_mode may have changed).
* Change for HTParse: if there is a hostname part, recognize a '?' as ending
  it if there are no further slash characters.
* Tweaks in configure.in and INSTALLATION: describe correctly what
  --disable-dired-override does.  Rename --disable-dired-archive to
  --disable-dired-dearchive.  Clarified INSTALLATION text for
  --disable-full-paths.  Changed some "define" to "prevent defining".
* Don't try to put cursor in last screen position for hiding in
  show_main_statusline if -show_cursor/SHOW_CURSOR is on.  The show_cursor
  behavior may have been turned on to avoid problems with curses libs or
  terminal types that connot deal with it correctly.  On pages with no
  links, for example SOURCE display, this may leave the cursor at the
  end of the statusline message if show_cursor is on.  This just restores
  previous versions' behavior in that case.  On pages with links, the
  movement is unnecessary anyway since the cursor will move again to the
  current link.
* Removed a bug in automatic textarea growing.  Textarea would grow by
  one line unnecessarily if enter was used on the last input line on a
  screen (if that was not actually the last line in the textarea).  New
  function HText_TAHasMoreLines() to help with this.
* Revision of "nonsticky" behavior / options.  Got rid of "sticky"
  terminology.  Renamed the controlling option to TEXTFIELDS_NEED_ACTIVATION
  and command line flag -tna.
  Compiling in of this mode can be disabled, see in userdefs.h under
  TEXTFIELDS_MAY_NEED_ACTIVATION.  Two versions of "Textfields Need
  Activation" mode are provided.  The default mode (simpler yet better IMO)
  highlights an inactive selected text input fields like a current normal
  anchor.  The alternative variant (may go away later?) behaves like VH's
  previous implementation and gets used when compiling with
  -DINACTIVE_INPUT_STYLE_VH.
  Many bugs that would occur in somewhat unusual circumstances are fixed,
  for both variants.  (Action of various commands on TEXT_SUBMIT_TYPE fields,
  interaction with mouse selection, ...)  Selecting an inactive input field
  with the mouse will activate it.  Various tweaks to make sure selecting
  a field in this way will put the editing cursor at the right position (even
  if the line had been scrolled / might be scrolled on entering the line
  editor), at least with NCURSES mouse support.   Also, -show_cursor now
  in general works as expected.  (In the INACTIVE_INPUT_STYLE_VH variant,
  cursor may sometimes end up on the statusline after error messages.)
* Treat input lines of the same textarea more like one entity, as far as
  "Textfields Need Activation" is concerned, as long as movement among those
  lines is with PREV_LINK/UP_LINK/LPOS_PREV_LINK/NEXT_LINK/DOWN_LINK/
  LPOS_NEXT_LINK or ACTIVATE keys (the last one only if TEXTAREA_AUTOGROW is
  defined, for consistency with line-appending behavior).  I.e. moving among
  textarea lines with those keys automatically activates ('enters') the new 
  field for line editing if the previous one was activated.
* Modified statusline messages to be more apppropriate and specific on non-
  activated form fields.  (The additional messages are not used or compiled
  in if TEXTFIELDS_MAY_NEED_ACTIVATION isn't defined.)  Avoid unnecessary
  repainting/refreshing of the physical statusline in many cases of moving
  among fields and links.  Make sure the additional lines shown in Novice
  mode are also appropriate.
* Modified line editor behavior on "disabled" form text fields: instead of
  disabling all non-terminating edit keys, allow those that never modify
  the field contents.  The user can now scroll through a long value in a
  disabled field with the arrow keys, rather than being stuck at the end.
* The ncurses mouse popup window would overlap the statusline in Novice mode.
  Limit overlap to border area (so at least no significant text gets
  corrupted).
* Modified code for stickyness of the second kind (ex-STICKY_FIELDS) according
  to preliminary proposal from Vlad.  Named LEFTARROW_IN_TEXTFIELD_PROMPT.
  Does not depend on any conditional compilation symbols, and is now unrelated
  to the other kind of "stickyness" discussed above.  See lynx.cfg.
  This isn't optimal yet (LAKABOFTIF discussion etc..), but better than
  leaving it as it was.
* Made default width of textarea fields (if no COLS attribute given) depend on
  window or screen width, instead of using a fixed default of "60".  I.e. for
  wider windows make better use of available space, and for narrows windows
  avoid wrapped textarea lines.  Take the usual left/right margins (depending
  on current block style) into account.  But for -dump don't make fields longer
  than 60 anyway (they will just show up as blocks of underscores anyway, not
  showing text content).
* Changes in code used to create new bookmark file after a bookmark has been
  'R'emoved.  Change should only affect Unix.  Basically, revert back to
  behavior used before 2.8.1dev.8 for "normal" files (no symlinks or extra
  hard links).  I.e. use rename / maybe try "mv" instead of "cp", then change
  permission bits explicitly.  Using "cp" means running the risk of losing or
  truncating the user's bookmark file if for example the disk became full
  (although these occasions should be rare - the scratch file we are trying
  to copy or rename was written just before without error, usually on the
  same filesystem).  Some more comments in LYBookmark.c.  Note: if you like
  your bookmark files, make backup copies of them anyway...

Index: 2.21/WWW/Library/Implementation/HTParse.c
--- 2.21/WWW/Library/Implementation/HTParse.c Thu, 25 Nov 1999 07:18:32 -0600
+++ 2.21(w)/WWW/Library/Implementation/HTParse.c Thu, 25 Nov 1999 09:52:50 -0600
@@ -14,7 +14,7 @@
        char * host;
        char * absolute;
        char * relative;
-/*     char * search;          no - treated as part of path */
+       char * search;          /* treated normally as part of path */
        char * anchor;
 };
 
@@ -68,6 +68,7 @@
     parts->host = NULL;
     parts->absolute = NULL;
     parts->relative = NULL;
+    parts->search = NULL;      /* normally not used - kw */
     parts->anchor = NULL;
 
     /*
@@ -111,6 +112,12 @@
            if (p != NULL) {
                *p = '\0';                      /* Terminate host */
                parts->absolute = (p + 1);      /* Root has been found */
+           } else {
+               p = strchr(parts->host, '?');
+               if (p != NULL) {
+                   *p = '\0';                  /* Terminate host */
+                   parts->search = (p + 1);
+               }
            }
        } else {
            parts->absolute = (p + 1);          /* Root found but no host */
@@ -261,6 +268,7 @@
        related.host = NULL;
        related.absolute = NULL;
        related.relative = NULL;
+       related.search = NULL;
        related.anchor = NULL;
     }
 
@@ -335,6 +343,23 @@
            }
 #endif /* CLEAN_URLS */
        }
+
+    /*
+    ** If host in given or related was ended directly with a '?' (no
+    **  slash), fake the search part into absolute.  This is the only
+    **  case search is returned from scan.  A host must have been present.
+    **  this restores the '?' at which the host part had been truncated in
+    **  scan, we have to do this after host part handling is done. - kw
+    **
+    */
+    if (given.search && *(given.search - 1) == '\0') {
+       given.absolute = given.search - 1;
+       given.absolute[0] = '?';
+    } else if (related.search && !related.absolute &&
+              *(related.search - 1) == '\0') {
+       related.absolute = related.search - 1;
+       related.absolute[0] = '?';
+    }
 
     /*
     ** If different hosts, inherit no path.
Index: 2.21/src/LYUtils.c
--- 2.21/src/LYUtils.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYUtils.c Thu, 25 Nov 1999 09:53:24 -0600
@@ -154,9 +154,9 @@
      */
     if (cur < 0)
        cur = 0;
-#ifndef NO_NONSTICKY_INPUTS
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
     if (flag == OFF)
-       textinput_drawn = FALSE;
+       textinput_redrawn = FALSE;
 #endif
 
     if (nlinks > 0) {
@@ -3729,7 +3729,10 @@
     if (suffix == 0)
        suffix = "";
     counter++;
-#ifdef _WINDOWS        /* 1998/05/25 (Mon) 20:51:22 */
+#if 0 && defined(_WINDOWS)     /* 1998/05/25 (Mon) 20:51:22 */
+    /*  This is nonsense - result hasn't been filled yet and will
+     *  be overwritten below.  If you mean 'prefix' then say so. - kw
+     */
     {
        char *p = result;
        while (*p++) {
@@ -3756,7 +3759,8 @@
        CONST char *tail = strchr(suffix, '.');
        if (tail == 0)
            tail = suffix + strlen(suffix);
-       leaf[8 - (tail - suffix)] = 0;
+       if (8 - (tail - suffix) >= 0)
+           leaf[8 - (tail - suffix)] = 0;
     }
     strcat(leaf, suffix);
 #else
Index: 2.21/src/LYForms.c
--- 2.21/src/LYForms.c Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYForms.c Thu, 25 Nov 1999 09:53:30 -0600
@@ -394,7 +394,7 @@
             *  If we can edit it, report that we are using the tail. - FM
             */
            HTUserMsg(FORM_VALUE_TOO_LONG);
-           show_formlink_statusline(form, FOR_INPUT);
+           show_formlink_statusline(form, redraw_only? FOR_PANEL : FOR_INPUT);
            move(startline, startcol);
        }
     }
@@ -406,17 +406,38 @@
     MyEdit.pad = '_';
     MyEdit.hidden = (BOOL) (form->type == F_PASSWORD_TYPE);
     if (use_last_tfpos && LastTFPos >= 0 && LastTFPos < MyEdit.strlen) {
-       MyEdit.pos = LastTFPos;
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
+       if (redraw_only) {
+           if (!(MyEdit.strlen >= MyEdit.dspwdth &&
+                 LastTFPos >= MyEdit.dspwdth - MyEdit.margin)) {
+               MyEdit.pos = LastTFPos;
+               if (MyEdit.strlen >= MyEdit.dspwdth)
+                   textinput_redrawn = FALSE;
+           }
+       } else
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION && INACTIVE_INPUT_STYLE_VH */
+           MyEdit.pos = LastTFPos;
 #ifdef ENHANCED_LINEEDIT
        if (MyEdit.pos == 0)
            MyEdit.mark = MyEdit.strlen;
 #endif
     }
     /* Try to prepare for setting position based on the last mouse event */
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
+    if (!redraw_only) {
+       if (peek_mouse_levent()) {
+           if (!use_last_tfpos && !textinput_redrawn) {
+               MyEdit.pos = 0;
+           }
+       }
+       textinput_redrawn = FALSE;
+    }
+#else
     if (peek_mouse_levent()) {
        if (!use_last_tfpos)
            MyEdit.pos = 0;
     }
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION && INACTIVE_INPUT_STYLE_VH */
     LYRefreshEdit(&MyEdit);
     if (redraw_only)
        return 0;               /*return value won't be analysed*/
@@ -639,18 +660,12 @@
            case LTARROW:       /* 1999/04/14 (Wed) 15:01:33 */
                if (MyEdit.pos == 0 && repeat == -1) {
                    int c = YES;    /* Go back immediately if no changes */
-#ifndef NO_NONSTICKY_INPUTS
-                   if (sticky_inputs
-                    && !textfield_stop_at_left_edge)
-#endif
-                   if (strcmp(MyEdit.buffer, value)) {
+                   if (textfield_prompt_at_left_edge) {
+                       c = HTConfirmDefault(PREV_DOC_QUERY, NO);
+                   } else if (strcmp(MyEdit.buffer, value)) {
                        c = HTConfirmDefault(PREV_DOC_QUERY, NO);
                    }
                    if (c == YES) {
-#ifndef NO_NONSTICKY_INPUTS
-                       if (textfield_stop_at_left_edge)
-                           goto again;
-#endif
                        return(ch);
                    } else {
                        if (form->disabled == YES)
@@ -662,8 +677,31 @@
                /* fall through */
 
            default:
-               if (form->disabled == YES)
-                   goto again;
+               if (form->disabled == YES) {
+                   /*
+                    *  Allow actions that don't modify the contents even
+                    *  in disabled form fields, so the user can scroll
+                    *  through the line for reading if necessary. - kw
+                    */
+                   switch(action) {
+                   case LYE_BOL:
+                   case LYE_EOL:
+                   case LYE_FORW:
+                   case LYE_BACK:
+                   case LYE_FORWW:
+                   case LYE_BACKW:
+#ifdef EXP_KEYBOARD_LAYOUT
+                   case LYE_SWMAP:
+#endif
+#ifdef ENHANCED_LINEEDIT
+                   case LYE_SETMARK:
+                   case LYE_XPMARK:
+#endif
+                       break;
+                   default:
+                       goto again;
+                   }
+               }
                /*
                 *  Make sure the statusline uses editmode help.
                 */
@@ -1834,6 +1872,11 @@
        if (form->disabled == YES)
            statusline(FORM_LINK_PASSWORD_UNM_MSG);
        else
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+           if (for_what == FOR_PANEL)
+               statusline(FORM_LINK_PASSWORD_MESSAGE_INA);
+           else
+#endif
            statusline(FORM_LINK_PASSWORD_MESSAGE);
        break;
     case F_OPTION_LIST_TYPE:
@@ -1862,18 +1905,39 @@
            if (no_mail)
                statusline(FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG);
            else
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (for_what == FOR_PANEL)
+                   statusline(FORM_TEXT_SUBMIT_MAILTO_MSG_INA);
+               else
+#endif
                statusline(FORM_LINK_TEXT_SUBMIT_MAILTO_MSG);
        } else if (form->no_cache) {
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+           if (for_what == FOR_PANEL)
+               statusline(FORM_TEXT_RESUBMIT_MESSAGE_INA);
+           else
+#endif
            statusline(FORM_LINK_TEXT_RESUBMIT_MESSAGE);
        } else {
            char *submit_str = NULL;
            char *xkey_info = key_for_func_ext(LYK_NOCACHE, for_what);
            if (xkey_info && *xkey_info) {
-               HTSprintf0(&submit_str, FORM_LINK_TEXT_SUBMIT_MESSAGE_X,
-                          xkey_info);
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (for_what == FOR_PANEL)
+                   HTSprintf0(&submit_str, FORM_TEXT_SUBMIT_MESSAGE_INA_X,
+                              xkey_info);
+               else
+#endif
+                   HTSprintf0(&submit_str, FORM_LINK_TEXT_SUBMIT_MESSAGE_X,
+                              xkey_info);
                statusline(submit_str);
                FREE(submit_str);
            } else {
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (for_what == FOR_PANEL)
+                   statusline(FORM_LINK_TEXT_SUBMIT_MESSAGE_INA);
+               else
+#endif
                statusline(FORM_LINK_TEXT_SUBMIT_MESSAGE);
            }
            FREE(xkey_info);
@@ -1939,27 +2003,44 @@
        if (form->disabled == YES)
            statusline(FORM_LINK_TEXT_UNM_MSG);
        else
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+           if (for_what == FOR_PANEL)
+               statusline(FORM_LINK_TEXT_MESSAGE_INA);
+           else
+#endif
            statusline(FORM_LINK_TEXT_MESSAGE);
        break;
     case F_TEXTAREA_TYPE:
-       if (form->disabled == YES)
+       if (form->disabled == YES) {
            statusline(FORM_LINK_TEXT_UNM_MSG);
-       else if (no_editor || !editor || !*editor) {
-           statusline(FORM_LINK_TEXTAREA_MESSAGE);
        } else {
            char *submit_str = NULL;
-           char *xkey_info = key_for_func_ext(LYK_EDIT_TEXTAREA, for_what);
+           char *xkey_info = NULL;
+           if (!no_editor && editor && editor) {
+               xkey_info = key_for_func_ext(LYK_EDIT_TEXTAREA, for_what);
 #ifdef TEXTAREA_AUTOEXTEDIT
-           if (!xkey_info)
-               xkey_info = key_for_func_ext(LYK_DWIMEDIT, for_what);
+               if (!xkey_info)
+                   xkey_info = key_for_func_ext(LYK_DWIMEDIT, for_what);
 #endif
+           }
            if (xkey_info && *xkey_info) {
-               HTSprintf0(&submit_str, FORM_LINK_TEXTAREA_MESSAGE_E,
-                          xkey_info);
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (for_what == FOR_PANEL)
+                   HTSprintf0(&submit_str, FORM_LINK_TEXTAREA_MESSAGE_INA_E,
+                              xkey_info);
+               else
+#endif
+                   HTSprintf0(&submit_str, FORM_LINK_TEXTAREA_MESSAGE_E,
+                              xkey_info);
                statusline(submit_str);
                FREE(submit_str);
            } else {
-               statusline(FORM_LINK_TEXTAREA_MESSAGE);
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (for_what == FOR_PANEL)
+                   statusline(FORM_LINK_TEXTAREA_MESSAGE_INA);
+               else
+#endif
+                   statusline(FORM_LINK_TEXTAREA_MESSAGE);
            }
            FREE(xkey_info);
        }
Index: 2.21/src/LYGetFile.c
--- 2.21/src/LYGetFile.c Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYGetFile.c Thu, 25 Nov 1999 09:54:11 -0600
@@ -317,11 +317,6 @@
                    /* show compile-time settings */
                    return(lynx_compile_opts(doc));
 #endif
-               } else if (url_type == LYNXMESSAGES_URL_TYPE) {
-                       /* Uh! */
-                       LYforce_no_cache = TRUE;
-                       LYoverride_no_cache = FALSE;
-                       /* continue */
 
 #ifndef DISABLE_NEWS
                } else if (url_type == NEWSPOST_URL_TYPE ||
@@ -451,6 +446,9 @@
                    }
 #endif
 
+#ifdef DIRED_SUPPORT
+                   lynx_edit_mode = FALSE;
+#endif /* DIRED_SUPPORT */
                    if (!HTLoadAbsolute(&WWWDoc)) {
                        return(NOT_FOUND);
                    }
@@ -714,6 +712,10 @@
                        WWWDoc.isHEAD = doc->isHEAD;
                        WWWDoc.safe = doc->safe;
                        status = HTLoadAbsolute(&WWWDoc);
+#ifdef DIRED_SUPPORT
+                   } else {
+                       lynx_edit_mode = FALSE;
+#endif /* DIRED_SUPPORT */
                    }
                    return(status);
 
@@ -1497,16 +1499,26 @@
        if (!LYIsHtmlSep(*(slash-1)) || *(slash-2) != ':') {
            return(0);
        }
-       if ((type == HTTP_URL_TYPE ||
-            type == HTTPS_URL_TYPE) &&
-           ((slash-2) - strchr(doc->address, ':'))) {
+       if (type == HTTP_URL_TYPE ||
+           type == HTTPS_URL_TYPE) {
+           if ((slash-2) - strchr(doc->address, ':')) {
            /*
             *  Turns out we were not looking at the right slash after all,
             *  there must have been more than one "://" which is valid
             *  at least for http URLs (later occurrences can be part of
             *  a query string, for example), so leave this alone, too. - kw
             */
-           return(0);
+               return(0);
+           }
+           if (strchr(doc->address, '?')) {
+               /*
+                *  If there is a question mark that appears to be part
+                *  of the hostname, don't append anything either. Leave
+                *  it to HTParse to interpret the question mark as ending
+                *  the hostname. - kw
+                */
+               return(0);
+           }
        }
     }
     CTRACE((tfp, "fix_httplike_urls: URL '%s'\n", doc->address));
Index: 2.21/src/LYJump.c
--- 2.21/src/LYJump.c Wed, 06 Oct 1999 13:57:53 -0500
+++ 2.21(w)/src/LYJump.c Thu, 25 Nov 1999 09:54:24 -0600
@@ -159,7 +159,7 @@
      * Complete the initialization of config.
      */
     if (cp) {
-       jtp->key = remap(cp, "JUMP");       /* key is present, (re)map it */
+       jtp->key = remap(cp, "JUMP", FALSE);  /* key is present, (re)map it */
        cp = strtok(NULL, "\n");            /* get prompt, if present */
        if (cp && *cp)
            StrAllocCopy(jtp->msg, cp);     /* prompt is present, load it */
Index: 2.21/src/LYMainLoop.c
--- 2.21/src/LYMainLoop.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYMainLoop.c Thu, 25 Nov 1999 09:58:10 -0600
@@ -170,6 +170,7 @@
 PRIVATE void exit_immediately_with_error_message PARAMS((int state, BOOLEAN 
first_file));
 PRIVATE void status_link PARAMS((char *curlink_name, BOOLEAN show_more, 
BOOLEAN show_indx));
 PRIVATE void show_main_statusline PARAMS((CONST linkstruct curlink, int 
for_what));
+PRIVATE void form_noviceline PARAMS((int));
 PRIVATE BOOL confirm_post_resub PARAMS((
     CONST char*                address,
     CONST char*                title,
@@ -215,9 +216,13 @@
 PRIVATE char *owner_address = NULL;  /* Holds the responsible owner's address  
   */
 PRIVATE char *ownerS_address = NULL; /* Holds owner's address during source 
fetch */
 
-#ifndef NO_NONSTICKY_INPUTS
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
 PRIVATE BOOL textinput_activated = FALSE;
-PUBLIC BOOL textinput_drawn = FALSE;
+#else
+#define textinput_activated TRUE /* a current text input is always active */
+#endif
+#ifdef INACTIVE_INPUT_STYLE_VH
+PUBLIC BOOL textinput_redrawn = FALSE;
     /*must be public since used in highlight(..)*/
 #endif
 
@@ -870,28 +875,23 @@
     BOOLEAN *, force_load,
     int,       real_cmd)
 {
-#ifndef NO_NONSTICKY_INPUTS
-    if (nlinks > 0 &&
-       links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
-       (links[curdoc.link].form->type == F_TEXT_TYPE ||
-        links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
-        links[curdoc.link].form->type == F_PASSWORD_TYPE ||
-        links[curdoc.link].form->type == F_TEXTAREA_TYPE)) {
-
-        textinput_activated = TRUE;
-        textinput_drawn = FALSE;
-        if (!sticky_inputs)
-            show_main_statusline(links[curdoc.link], FOR_INPUT);
-        return 0;
-    }
-#endif
     if (do_change_link() == -1) {
        LYforce_no_cache = FALSE;
        reloading = FALSE;
        return 1;       /* mouse stuff was confused, ignore - kw */
     }
-     if (nlinks > 0) {
+    if (nlinks > 0) {
        if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) {
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+           if (real_cmd == LYK_ACTIVATE && textfields_need_activation &&
+               F_TEXTLIKE(links[curdoc.link].form->type)) {
+
+               textinput_activated = TRUE;
+               if (textfields_need_activation)
+                   show_main_statusline(links[curdoc.link], FOR_INPUT);
+               return 0;
+           }
+#endif
            /*
             *  Don't try to submit forms with bad actions. - FM
             */
@@ -1038,16 +1038,19 @@
             *  info, so update it now. - kw
             */
 
-           if (links[curdoc.link].form->type == F_TEXT_TYPE ||
-               links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
-               links[curdoc.link].form->type == F_PASSWORD_TYPE ||
-               links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+           if (F_TEXTLIKE(links[curdoc.link].form->type)) {
                show_formlink_statusline(links[curdoc.link].form,
-                                        (real_cmd==LYK_SUBMIT ||
-                                         real_cmd==LYK_NOCACHE ||
+                                        (real_cmd==LYK_NOCACHE ||
                                          real_cmd==LYK_DOWNLOAD ||
-                                         real_cmd==LYK_HEAD) ?
+                                         real_cmd==LYK_HEAD ||
+                                         (real_cmd==LYK_SUBMIT &&
+                                          !textinput_activated)) ?
                                         FOR_PANEL : FOR_INPUT);
+               if (user_mode==NOVICE_MODE &&
+                   textinput_activated &&
+                   (real_cmd==LYK_ACTIVATE || real_cmd==LYK_SUBMIT)) {
+                       form_noviceline(links[curdoc.link].form->disabled);
+               }
            }
 
            *c = change_form_link(&links[curdoc.link],
@@ -1118,19 +1121,28 @@
            } else if (*c == 23) {
                *c = DO_NOTHING;
                *refresh_screen = TRUE;
-           } else
+           } else {
+               /*  Avoid getting stuck with repeatedly calling
+               **  handle_LYK_ACTIVATE(), instead of calling
+               **  change_form_link() directly from mainloop(),
+               **  for text input fields. - kw
+               */
                switch (LKC_TO_C(*c)) {
                case '\n':
                case '\r':
-                   /*  Avoid getting stuck with repeatedly calling
-                   **  the second change_form_link() instead of the
-                   **  first for text input fields. - kw
-                   */
-                   if (peek_mouse_link() == -1 ||
-                       peek_mouse_link() == curdoc.link)
+#if 0
+                   if (peek_mouse_link() == curdoc.link) {
                        *c = DO_NOTHING;
+                       break;
+                   }
+#endif
                default:
+                   if ((real_cmd == LYK_ACTIVATE || real_cmd == LYK_SUBMIT) &&
+                       F_TEXTLIKE(links[curdoc.link].form->type) &&
+                       textinput_activated)
+                       return 3;
                    break;
+               }
            }
            return 2;
        } else {
@@ -1301,6 +1313,8 @@
                FREE(newdoc.post_data);
                FREE(newdoc.post_content_type);
                FREE(newdoc.bookmark);
+               if (!strncmp(newdoc.address, "LYNXMESSAGES:", 13))
+                   LYforce_no_cache = TRUE;
            }
            if (!no_jump && lynxjumpfile && curdoc.address &&
                !strcmp(lynxjumpfile, curdoc.address)) {
@@ -1961,7 +1975,8 @@
                HTUserMsg(NO_DOWNLOAD_PERMIT_OP);
            }
 
-       } else if (lynx_edit_mode && !no_dired_support) {
+       } else if (lynx_edit_mode && !no_dired_support &&
+                  !strstr(links[curdoc.link].lname, "/SugFile=")) {
            /*
             *  Don't bother making a /tmp copy of the local file.
             */
@@ -3339,8 +3354,7 @@
            if (!strncasecomp(ret, "Go ", 3)) {
                LYJumpFileURL = FALSE;
                StrAllocCopy(*old_user_input, user_input_buffer);
-               *URLTotal = (Goto_URLs ?
-             HTList_count(Goto_URLs) : 0);
+               *URLTotal = (Goto_URLs ? HTList_count(Goto_URLs) : 0);
                *recall = ((*URLTotal >= 1) ? RECALL : NORECALL);
                *URLNum = *URLTotal;
                *FirstURLRecall = TRUE;
@@ -4873,6 +4887,8 @@
            FREE(newdoc.bookmark);
            newdoc.isHEAD = FALSE;
            newdoc.safe = FALSE;
+           if (!strncmp(newdoc.address, "LYNXMESSAGES:", 13))
+               LYforce_no_cache = TRUE;
        }
        newdoc.internal_link = FALSE;
        *force_load = TRUE;  /* force MainLoop to reload */
@@ -4972,7 +4988,7 @@
 #define        BUFF_MAX        1024
     char sjis_buff[BUFF_MAX];
 #endif
-    int c = 0, real_c = 0, old_c = 0;
+    int c = 0, real_c = 0, old_c = 0, pending_form_c = -1;
     int cmd = LYK_DO_NOTHING, real_cmd = LYK_DO_NOTHING;
     int getresult;
     int arrowup = FALSE, show_help = FALSE;
@@ -4999,6 +5015,8 @@
     BOOLEAN ForcePush = FALSE;
     BOOLEAN override_LYresubmit_posts = FALSE;
     BOOLEAN newdoc_link_is_absolute = FALSE;
+    BOOLEAN curlink_is_editable;
+    BOOLEAN use_last_tfpos;
     unsigned int len;
     int i;
     int follow_col = -1;
@@ -5331,8 +5349,8 @@
                getresult = getfile(&newdoc);
 #endif /* TRACK_INTERNAL_LINKS */
 
-#ifndef NO_NOSTICKY_INPUTS
-               textinput_drawn = FALSE; /* for sure */
+#ifdef INACTIVE_INPUT_STYLE_VH
+               textinput_redrawn = FALSE; /* for sure */
 #endif
 
                switch(getresult) {
@@ -5813,13 +5831,14 @@
           LYUserSpecifiedURL = FALSE;  /* only set for goto's and jumps's */
           LYJumpFileURL = FALSE;       /* only set for jump's */
           LYNoRefererForThis = FALSE;  /* always reset on return here */
-          reloading = FALSE;           /* only set for RELOAD and RESUBMIT */
+          reloading = FALSE;           /* set for RELOAD and NOCACHE keys */
           HEAD_request = FALSE;        /* only set for HEAD requests */
           LYPermitURL = FALSE;         /* only for LYValidate or check_realm */
           ForcePush = FALSE;           /* only set for some PRINT requests. */
           LYforce_HTML_mode = FALSE;
           force_old_UCLYhndl_on_reload = FALSE;
           popped_doc = FALSE;
+          pending_form_c = -1;
 
        } /* end if (LYforce_no_cache || force_load || are_different(...)) */
 
@@ -6039,8 +6058,8 @@
         *  All display_partial calls ends here for final redraw.
         */
        if (curdoc.line != Newline) {
-#ifndef NO_NONSTICKY_INPUTS
-           textinput_drawn = FALSE;
+#ifdef INACTIVE_INPUT_STYLE_VH
+           textinput_redrawn = FALSE;
 #endif
 
            refresh_screen = FALSE;
@@ -6156,6 +6175,23 @@
 
        }
 
+       curlink_is_editable =
+           (nlinks > 0 &&
+            links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+            (links[curdoc.link].form->type == F_TEXT_TYPE ||
+             links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
+             links[curdoc.link].form->type == F_PASSWORD_TYPE ||
+             links[curdoc.link].form->type == F_TEXTAREA_TYPE));
+
+       use_last_tfpos = (curlink_is_editable &&
+                         (real_cmd == LYK_LPOS_PREV_LINK ||
+                          real_cmd == LYK_LPOS_NEXT_LINK));
+
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+       if (!textfields_need_activation)
+           textinput_activated = TRUE;
+#endif
+
 #if defined(WIN_EX)                    /* 1997/10/08 (Wed) 14:52:06 */
        if (nlinks > 0) {
            char *p = "LYNX (unknown link type)";
@@ -6236,25 +6272,25 @@
         *  to tell the user other misc info.
         */
        if (!show_help) {
-#ifndef NO_NONSTICKY_INPUTS
           show_main_statusline(links[curdoc.link],
-                               (!sticky_inputs && !textinput_activated) ?
-                               FOR_PANEL : FOR_INPUT);
-#else
-          show_main_statusline(links[curdoc.link], FOR_INPUT);
-#endif
+                               (curlink_is_editable && textinput_activated) ?
+                               FOR_INPUT : FOR_PANEL);
        } else {
           show_help = FALSE;
        }
 
-       if (!(nlinks > 0 &&
-             links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
-             (links[curdoc.link].form->type == F_TEXT_TYPE ||
-              links[curdoc.link].form->type == F_TEXTAREA_TYPE))) {
+       if (nlinks > 0) {
             /*
-             *  Highlight current link.
+             *  Highlight current link, unless it is an active
+             *  text input field.
              */
-           highlight(ON, curdoc.link);
+           if (!curlink_is_editable) {
+               highlight(ON, curdoc.link);
+#ifndef INACTIVE_INPUT_STYLE_VH
+           } else if (!textinput_activated) {
+               highlight(ON, curdoc.link);
+#endif
+           }
        }
 
        if (traversal) {
@@ -6294,51 +6330,31 @@
            /*
             *  Normal, non-traversal handling.
             */
-           if (nlinks > 0 &&
-#ifndef NO_NONSTICKY_INPUTS
-               (textinput_activated || !textinput_drawn) &&
-#endif
-               links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
-               (links[curdoc.link].form->type == F_TEXT_TYPE ||
-                links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
-                links[curdoc.link].form->type == F_PASSWORD_TYPE ||
-                links[curdoc.link].form->type == F_TEXTAREA_TYPE)) {
-
-               BOOLEAN use_last_tfpos;
-               use_last_tfpos = (BOOL) (real_cmd == LYK_LPOS_PREV_LINK ||
-                                 real_cmd == LYK_LPOS_NEXT_LINK);
-
-#ifndef NO_NONSTICKY_INPUTS
-               if (!sticky_inputs && !textinput_activated) {
-                   /*draw the text entry, but don't activate it*/
-                   change_form_link_ex(&links[curdoc.link],
-                                    &newdoc, &refresh_screen,
-                                    links[curdoc.link].form->name,
-                                     links[curdoc.link].form->value,
-                                     use_last_tfpos, FALSE, TRUE);
-                   c = DO_NOTHING;
-                   textinput_drawn = TRUE;
-               } else
-#endif
-               {
 
-               /*
-                *  Replace novice lines if in NOVICE_MODE.
-                */
-               if (user_mode==NOVICE_MODE) {
-                   move(LYlines-2,0); clrtoeol();
-                   addstr(FORM_NOVICELINE_ONE);
-                   move(LYlines-1,0); clrtoeol();
-                   addstr(FORM_NOVICELINE_TWO);
-               }
-               real_c = change_form_link(&links[curdoc.link],
+           if (curlink_is_editable &&
+               (textinput_activated || pending_form_c != -1)) {
+               if (pending_form_c != -1) {
+                   real_c = pending_form_c;
+                   pending_form_c = -1;
+               } else {
+                   /*
+                    *  Replace novice lines if in NOVICE_MODE.
+                    */
+                   if (user_mode==NOVICE_MODE) {
+                       form_noviceline(links[curdoc.link].form->disabled);
+                   }
+                   real_c = change_form_link(&links[curdoc.link],
                                     &newdoc, &refresh_screen,
                                     links[curdoc.link].form->name,
                                          links[curdoc.link].form->value,
                                          use_last_tfpos, FALSE);
-#ifndef NO_NONSTICKY_INPUTS
-               textinput_activated = FALSE;
-               textinput_drawn = FALSE;
+               }
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (textfields_need_activation)
+                   textinput_activated = FALSE;
+#ifdef INACTIVE_INPUT_STYLE_VH
+               textinput_redrawn = FALSE;
+#endif
 #endif
 
                c = (real_c==LKC_DONE) ? DO_NOTHING : LKC_TO_C(real_c);
@@ -6350,12 +6366,50 @@
                    do_change_link();
                    if ((c == '\n' || c == '\r') &&
                        links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
-                       (links[curdoc.link].form->type == F_TEXT_TYPE ||
-                        links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
-                        links[curdoc.link].form->type == F_PASSWORD_TYPE ||
-                        links[curdoc.link].form->type == F_TEXTAREA_TYPE)) {
+                       F_TEXTLIKE(links[curdoc.link].form->type) &&
+                       !textfields_need_activation) {
                        c = DO_NOTHING;
                    }
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               } else if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+                           links[curdoc.link].form->type == F_TEXTAREA_TYPE)
+                          && textfields_need_activation
+                          && !links[curdoc.link].form->disabled
+                          && peek_mouse_link() < 0 &&
+                          (((LKC_TO_LAC(keymap,real_c) == LYK_NEXT_LINK ||
+#ifdef TEXTAREA_AUTOGROW
+                             LKC_TO_LAC(keymap,real_c) == LYK_ACTIVATE ||
+#endif
+                             LKC_TO_LAC(keymap,real_c) == LYK_LPOS_NEXT_LINK ||
+                             LKC_TO_LAC(keymap,real_c) == LYK_DOWN_LINK) &&
+                            ((curdoc.link < nlinks-1 &&
+                              links[curdoc.link+1].type == WWW_FORM_LINK_TYPE  
&&
+                              links[curdoc.link+1].form->type == 
F_TEXTAREA_TYPE
+                              && (links[curdoc.link].form->number ==
+                                  links[curdoc.link+1].form->number) &&
+                              strcmp(links[curdoc.link].form->name,
+                                     links[curdoc.link+1].form->name) == 0) ||
+                             (curdoc.link == nlinks-1 && more &&
+                              HText_TAHasMoreLines(curdoc.link, 1)))) ||
+                           ((LKC_TO_LAC(keymap,real_c) == LYK_PREV_LINK ||
+                             LKC_TO_LAC(keymap,real_c) == LYK_LPOS_PREV_LINK ||
+                             LKC_TO_LAC(keymap,real_c) == LYK_UP_LINK) &&
+                            ((curdoc.link > 0 &&
+                              links[curdoc.link-1].type == WWW_FORM_LINK_TYPE  
&&
+                              links[curdoc.link-1].form->type == 
F_TEXTAREA_TYPE
+                              && (links[curdoc.link].form->number ==
+                                  links[curdoc.link-1].form->number) &&
+                              strcmp(links[curdoc.link].form->name,
+                                     links[curdoc.link-1].form->name) == 0) ||
+                             (curdoc.link == 0 && curdoc.line > 1 &&
+                              HText_TAHasMoreLines(curdoc.link, -1)))))) {
+                   textinput_activated = TRUE;
+#ifdef TEXTAREA_AUTOGROW
+                   if ((c == '\n' || c == '\r') &&
+                       LKC_TO_LAC(keymap,real_c) == LYK_ACTIVATE)
+                       c = LAC_TO_LKC0(LYK_NEXT_LINK);
+#endif /* TEXTAREA_AUTOGROW */
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION */
                } else
                    switch (c) {
                    case '\n':
@@ -6380,7 +6434,8 @@
 /*                     &&
                         (peek_mouse_link() == -1) */
                        &&
-                        ((curdoc.link == nlinks-1)
+                       ((curdoc.link == nlinks-1 &&
+                         !(more && HText_TAHasMoreLines(curdoc.link, 1)))
                         ||
                         ((curdoc.link <  nlinks-1) &&
                          !(links[curdoc.link+1].type == WWW_FORM_LINK_TYPE  &&
@@ -6411,10 +6466,12 @@
                                    newdoc.link++;
                            }
                        }
-#ifndef NO_NONSTICKY_INPUTS
-                       if (!sticky_inputs) {
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+                       if (textfields_need_activation) {
                            textinput_activated = TRUE;
-                           textinput_drawn = TRUE;
+#ifdef INACTIVE_INPUT_STYLE_VH
+                           textinput_redrawn = TRUE;
+#endif
                        };
 #endif
 
@@ -6434,8 +6491,38 @@
                    if (old_c != c && old_c != real_c && c != real_c)
                        real_c = c;
                }
-               } /*  !(!sticky_inputs && !textinput_activated)*/
+#if 0
+#ifdef INACTIVE_INPUT_STYLE_VH
+           } else if (curlink_is_editable && !textinput_redrawn) {
+               /*draw the text entry, but don't activate it*/
+               change_form_link_ex(&links[curdoc.link],
+                                   &newdoc, &refresh_screen,
+                                   links[curdoc.link].form->name,
+                                   links[curdoc.link].form->value,
+                                   use_last_tfpos, FALSE, TRUE);
+               c = DO_NOTHING;
+               textinput_redrawn = TRUE;
+#endif /* INACTIVE_INPUT_STYLE_VH */
+#endif
            } else {
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
+               if (curlink_is_editable && !textinput_redrawn) {
+               /*draw the text entry, but don't activate it*/
+                   textinput_redrawn = TRUE;
+                   change_form_link_ex(&links[curdoc.link],
+                                   &newdoc, &refresh_screen,
+                                   links[curdoc.link].form->name,
+                                   links[curdoc.link].form->value,
+                                   use_last_tfpos, FALSE, TRUE);
+                   if (LYShowCursor) {
+                       move(links[curdoc.link].ly,
+                            ((links[curdoc.link].lx > 0) ?
+                             (links[curdoc.link].lx - 1) : 0));
+                   } else {
+                       LYHideCursor();
+                   }
+               }
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION && INACTIVE_INPUT_STYLE_VH */
                /*
                 *  Get a keystroke from the user.
                 *  Save the last keystroke to avoid
@@ -6526,12 +6613,17 @@
        default:
            if (curdoc.link >= 0 && curdoc.link < nlinks &&
                links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
-               (links[curdoc.link].form->type == F_TEXT_TYPE ||
-                links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE ||
-                links[curdoc.link].form->type == F_PASSWORD_TYPE ||
-                links[curdoc.link].form->type == F_TEXTAREA_TYPE))
+               F_TEXTLIKE(links[curdoc.link].form->type))
 
-               show_main_statusline(links[curdoc.link], FOR_PANEL);
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+               if (textfields_need_activation) {
+                   show_main_statusline(links[curdoc.link], FOR_PANEL);
+#ifdef INACTIVE_INPUT_STYLE_VH
+                   textinput_redrawn = FALSE;
+#endif
+               } else
+#endif
+                   show_main_statusline(links[curdoc.link], FOR_INPUT);
            else if (more)
                HTInfoMsg(MOREHELP);
            else
@@ -6730,6 +6822,10 @@
 
        case LYK_CHANGE_LINK:
            do_change_link();
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
+           if (textfields_need_activation)
+               textinput_redrawn = FALSE;
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION && INACTIVE_INPUT_STYLE_VH */
            break;
 
        case LYK_RIGHT_LINK:
@@ -6771,6 +6867,8 @@
                continue;
            case 2:
                goto new_keyboard_input;
+           case 3:
+               pending_form_c = c;
            }
            break;
 
@@ -7302,7 +7400,7 @@
     /*
      * Make sure form novice lines are replaced.
      */
-    if (user_mode == NOVICE_MODE) {
+    if (user_mode == NOVICE_MODE && for_what != FOR_INPUT) {
        noviceline(more);
     }
 
@@ -7377,13 +7475,22 @@
        _statusline(HELP);
     }
 
-#ifndef NO_NOSTICKY_INPUTS
-    if (textinput_drawn) {
+#if 0  /* messages now produced in show_formlink_statusline - kw */
+#ifdef INACTIVE_INPUT_STYLE_VH
+    if (textinput_redrawn) {
        _statusline(gettext("Inactive text input, activate to edit (e.g., press 
ENTER)"));
     }
 #endif
+#endif
+
     /* turn off cursor since now it's probably on statusline -HV */
-    LYHideCursor();
+    /* But not if LYShowCursor is on.  -show_cursor may be used as a
+     * workaround to avoid putting the cursor in the last position, for
+     * curses implementations or terminals that cannot deal with that
+     * correctly. - kw */
+    if (!LYShowCursor) {
+       LYHideCursor();
+    }
 }
 
 /*
@@ -7398,6 +7505,38 @@
        show_main_statusline(links[curdoc.link], for_what);
 }
 
+PRIVATE void form_noviceline ARGS1(
+    int,       disabled)
+{
+    move(LYlines-2,0); clrtoeol();
+    if (!disabled) {
+       addstr(FORM_NOVICELINE_ONE);
+    }
+    move(LYlines-1,0); clrtoeol();
+    if (disabled)
+       return;
+    if (EditBinding(FROMASCII('\025')) == LYE_ERASE) {
+       addstr(FORM_NOVICELINE_TWO);
+    } else if (EditBinding(FROMASCII('\025')) == LYE_DELBL) {
+       addstr(FORM_NOVICELINE_TWO_DELBL);
+    } else {
+       char *temp = NULL;
+       char *erasekey = fmt_keys(LYKeyForEditAction(LYE_ERASE), -1);
+       if (erasekey) {
+           HTSprintf0(&temp, FORM_NOVICELINE_TWO_VAR, erasekey);
+       } else {
+           erasekey = fmt_keys(LYKeyForEditAction(LYE_DELBL), -1);
+           if (erasekey)
+               HTSprintf0(&temp,
+                          FORM_NOVICELINE_TWO_DELBL_VAR, erasekey);
+       }
+       if (temp) {
+           addstr(temp);
+           FREE(temp);
+       }
+       FREE(erasekey);
+    }
+}
 
 PRIVATE void exit_immediately_with_error_message ARGS2(
        int,            state,
Index: 2.21/src/LYOptions.c
--- 2.21/src/LYOptions.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYOptions.c Thu, 25 Nov 1999 09:58:42 -0600
@@ -32,6 +32,46 @@
 #define COL_OPTION_VALUES 36  /* display column where option values start */
 #endif
 
+#if defined(USE_SLANG) || defined(COLOR_CURSES)
+PRIVATE BOOLEAN can_do_colors = 0;
+#endif
+
+PUBLIC int SetupChosenShowColor NOARGS
+{
+#if defined(USE_SLANG) || defined(COLOR_CURSES)
+    can_do_colors = 1;
+#if defined(COLOR_CURSES)
+    if (LYCursesON)    /* could crash if called before initialization */
+       can_do_colors = (BOOL) has_colors();
+#endif
+    if (!no_option_save) {
+       if (LYChosenShowColor == SHOW_COLOR_UNKNOWN) {
+           switch (LYrcShowColor) {
+           case SHOW_COLOR_NEVER:
+               LYChosenShowColor =
+                   (LYShowColor >= SHOW_COLOR_ON) ?
+                       SHOW_COLOR_ON : SHOW_COLOR_NEVER;
+               break;
+           case SHOW_COLOR_ALWAYS:
+               if (!can_do_colors)
+                   LYChosenShowColor = SHOW_COLOR_ALWAYS;
+               else
+                   LYChosenShowColor =
+                       (LYShowColor >= SHOW_COLOR_ON) ?
+                               SHOW_COLOR_ALWAYS : SHOW_COLOR_OFF;
+               break;
+           default:
+               LYChosenShowColor =
+                   (LYShowColor >= SHOW_COLOR_ON) ?
+                       SHOW_COLOR_ON : SHOW_COLOR_OFF;
+           }
+       }
+    }
+#endif /* USE_SLANG || COLOR_CURSES */
+    return LYChosenShowColor;
+}
+
+
 #ifndef NO_OPTION_MENU
 PRIVATE int boolean_choice PARAMS((
        int             status,
@@ -214,32 +254,7 @@
        }
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
     } else {
-       if (LYChosenShowColor == SHOW_COLOR_UNKNOWN) {
-           switch (LYrcShowColor) {
-           case SHOW_COLOR_NEVER:
-               LYChosenShowColor =
-                   (LYShowColor >= SHOW_COLOR_ON) ?
-                                    SHOW_COLOR_ON :
-                                    SHOW_COLOR_NEVER;
-               break;
-           case SHOW_COLOR_ALWAYS:
-#if defined(COLOR_CURSES)
-               if (!has_colors())
-                   LYChosenShowColor = SHOW_COLOR_ALWAYS;
-               else
-#endif
-                   LYChosenShowColor =
-                       (LYShowColor >= SHOW_COLOR_ON) ?
-                                    SHOW_COLOR_ALWAYS :
-                                    SHOW_COLOR_OFF;
-               break;
-           default:
-               LYChosenShowColor =
-                   (LYShowColor >= SHOW_COLOR_ON) ?
-                                    SHOW_COLOR_ON :
-                                    SHOW_COLOR_OFF;
-           }
-       }
+       SetupChosenShowColor();
 #endif /* USE_SLANG || COLOR_CURSES */
     }
 
@@ -1195,6 +1210,7 @@
                                terminal);
                        else
                            HTUserMsg(COLOR_TOGGLE_DISABLED);
+                       break;
                    }
 #endif
                /*
@@ -1718,7 +1734,7 @@
            case '>':   /* Save current options to RC file. */
                if (!no_option_save) {
                    HTInfoMsg(SAVING_OPTIONS);
-                   if (save_rc()) {
+                   if (save_rc(NULL)) {
                        LYrcShowColor = LYChosenShowColor;
                        HTInfoMsg(OPTIONS_SAVED);
                    } else {
@@ -2058,7 +2074,7 @@
        if (response == '>') {
            if (!no_option_save) {
                HTInfoMsg(SAVING_OPTIONS);
-               if (save_rc())
+               if (save_rc(NULL))
                    HTInfoMsg(OPTIONS_SAVED);
                else
                    HTAlert(OPTIONS_NOT_SAVED);
@@ -2357,6 +2373,8 @@
      */
     bottom = top + i_length + 3;
 
+    if (for_mouse && user_mode == NOVICE_MODE && DisplayLines > 2)
+       DisplayLines--;
     /*
      * Hmm...  If the bottom goes beyond the number of lines available,
      */
@@ -3449,10 +3467,12 @@
        OptValues *,    table)
 {
     while (table->LongName != 0) {
-       PutOption(fp,
-           value == table->value,
-           table->HtmlName,
-           table->LongName);
+       if (table->HtmlName) {
+           PutOption(fp,
+                     value == table->value,
+                     table->HtmlName,
+                     table->LongName);
+       }
        table++;
     }
 }
@@ -3463,7 +3483,7 @@
        int *,          result)
 {
     while (table->LongName != 0) {
-       if (!strcmp(value, table->HtmlName)) {
+       if (table->HtmlName && !strcmp(value, table->HtmlName)) {
            *result = table->value;
            return TRUE;
        }
@@ -3641,6 +3661,9 @@
 
        if (!HTLoadAbsolute(&WWWDoc))
            return(NOT_FOUND);
+#ifdef DIRED_SUPPORT
+       lynx_edit_mode = FALSE;
+#endif /* DIRED_SUPPORT */
        return(NORMAL);
     }
 
@@ -3779,8 +3802,10 @@
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
        /* Show Color: SELECT */
        if (!strcmp(data[i].tag, show_color_string)
-        && GetOptValues(show_color_values, data[i].value, &LYShowColor)) {
-           LYChosenShowColor = LYShowColor;
+        && GetOptValues(show_color_values, data[i].value,
+                        &LYChosenShowColor)) {
+           if (can_do_colors)
+               LYShowColor = LYChosenShowColor;
            if (CurrentShowColor != LYShowColor) {
                lynx_force_repaint();
            }
@@ -4001,7 +4026,7 @@
     FREE(data);
     if (save_all) {
        HTInfoMsg(SAVING_OPTIONS);
-       if (save_rc()) {
+       if (save_rc(NULL)) {
            LYrcShowColor = LYChosenShowColor;
            HTInfoMsg(OPTIONS_SAVED);
        } else {
@@ -4160,9 +4185,6 @@
        char **,        newfile)
 {
     int i;
-#if defined(USE_SLANG) || defined(COLOR_CURSES)
-    BOOLEAN can_do_colors;
-#endif
     static char tempfile[LY_MAXPATH] = "\0";
     BOOLEAN disable_all = FALSE;
     FILE *fp0;
@@ -4314,44 +4336,25 @@
 
     /* Show Color: SELECT */
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
-    can_do_colors = 1;
-#if defined(COLOR_CURSES)
-    if (LYCursesON)    /* could crash if called before initialization */
-       can_do_colors = (BOOL) has_colors();
-#endif
+    SetupChosenShowColor();
     PutLabel(fp0, gettext("Show color"));
-    MaybeSelect(fp0, !can_do_colors, show_color_string);
     if (no_option_save) {
+       MaybeSelect(fp0, !can_do_colors, show_color_string);
        if (LYShowColor == SHOW_COLOR_NEVER) {
            LYShowColor = SHOW_COLOR_OFF;
        } else if (LYShowColor == SHOW_COLOR_ALWAYS) {
            LYShowColor = SHOW_COLOR_ON;
        }
-       PutOptValues(fp0, LYShowColor, bool_values);
+       PutOptValues(fp0, LYShowColor - SHOW_COLOR_OFF, bool_values);
     } else {
-       if (LYChosenShowColor == SHOW_COLOR_UNKNOWN) {
-           switch (LYrcShowColor) {
-           case SHOW_COLOR_NEVER:
-               LYChosenShowColor =
-                   (LYShowColor >= SHOW_COLOR_ON) ?
-                       SHOW_COLOR_ON : SHOW_COLOR_NEVER;
-               break;
-           case SHOW_COLOR_ALWAYS:
-               if (!can_do_colors)
-                   LYChosenShowColor = SHOW_COLOR_ALWAYS;
-               else
-                   LYChosenShowColor =
-                       (LYShowColor >= SHOW_COLOR_ON) ?
-                               SHOW_COLOR_ALWAYS : SHOW_COLOR_OFF;
-               break;
-           default:
-               LYChosenShowColor =
-                   (LYShowColor >= SHOW_COLOR_ON) ?
-                       SHOW_COLOR_ON : SHOW_COLOR_OFF;
-           }
+       BeginSelect(fp0, show_color_string);
+       if (can_do_colors) {
+           show_color_values[2].HtmlName = on_string;
+           show_color_values[3].LongName = always_string;
+       } else {
+           show_color_values[2].HtmlName = NULL; /* suppress "ON" - kw */
+           show_color_values[3].LongName = "Always try";
        }
-       show_color_values[3].LongName = (can_do_colors) ? always_string
-                                                       : "Always try";
        PutOptValues(fp0, LYChosenShowColor, show_color_values);
     }
     EndSelect(fp0);
Index: 2.21/src/LYStrings.c
--- 2.21/src/LYStrings.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYStrings.c Thu, 25 Nov 1999 10:01:03 -0600
@@ -359,10 +359,7 @@
            int len, lx = links[i].lx, is_text = 0;
 
            if (links[i].type == WWW_FORM_LINK_TYPE
-               && (links[i].form->type == F_TEXT_TYPE
-                || links[i].form->type == F_TEXT_SUBMIT_TYPE
-                || links[i].form->type == F_PASSWORD_TYPE
-                || links[i].form->type == F_TEXTAREA_TYPE))
+               && F_TEXTLIKE(links[i].form->type))
                is_text = 1;
 
            if (is_text)
@@ -408,8 +405,13 @@
                    if (code != FOR_INPUT
                        /* Do not pick up the current input field */
                        || !((cury == y && (curx >= lx) && ((curx - lx) <= 
len)))) {
-                       if (is_text)
+                       if (is_text) {
                            have_levent = 1;
+#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH)
+                           if (x == links[i].lx && y == links[i].ly)
+                               textinput_redrawn = FALSE;
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION && INACTIVE_INPUT_STYLE_VH */
+                       }
                        mouse_link = i;
                    } else
                        mouse_link = -1;
@@ -2000,8 +2002,17 @@
                        mouse_link = -1; /* Forget about approx stuff. */
 
                    lac = LYmouse_menu(event.x, event.y, atlink, code);
-                   if (lac == LYK_SUBMIT && mouse_link == -1)
-                       lac = LYK_ACTIVATE;
+                   if (lac == LYK_SUBMIT) {
+                       if (mouse_link == -1)
+                           lac = LYK_ACTIVATE;
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+                       else if (mouse_link >= 0 &&
+                                textfields_need_activation &&
+                                links[mouse_link].type == WWW_FORM_LINK_TYPE &&
+                                F_TEXTLIKE(links[mouse_link].form->type))
+                           lac = LYK_ACTIVATE;
+#endif
+                   }                       
                    if (lac == LYK_ACTIVATE && mouse_link == -1) {
                        HTAlert("No link chosen");
                        lac = LYK_REFRESH;
Index: 2.21/src/LYKeymap.c
--- 2.21/src/LYKeymap.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYKeymap.c Thu, 25 Nov 1999 10:01:35 -0600
@@ -3,6 +3,7 @@
 #include <LYUtils.h>
 #include <LYKeymap.h>
 #include <LYGlobalDefs.h>
+#include <LYCharSets.h>                /* for LYlowest_eightbit - kw */
 #include <HTAccess.h>
 #include <HTFormat.h>
 #include <HTAlert.h>
@@ -795,7 +796,10 @@
                sprintf(buf, ">");
        else if (c == 0177)
                sprintf(buf, "<delete>");
-       else if (c > ' ' && c <= 0377)
+       else if (c > ' ' && c < 0177)
+               sprintf(buf, "%c", c);
+       else if (c > ' ' && c <= 0377 &&
+                c <= LYlowest_eightbit[current_char_set])
                sprintf(buf, "%c", c);
        else if (c < ' ')
                sprintf(buf, "^%c", c|0100);
@@ -826,7 +830,10 @@
                sprintf(buf, "&gt;          ");
        else if (c == 0177)
                sprintf(buf, "&lt;delete&gt;   ");
-       else if (c > ' ' && c <= 0377)
+       else if (c > ' ' && c < 0177)
+               sprintf(buf, "%c", c);
+       else if (c > ' ' && c <= 0377 &&
+                c <= LYlowest_eightbit[current_char_set])
                sprintf(buf, "%c", c);
        else if (c < ' ')
                sprintf(buf, "^%c", c|0100);
@@ -862,17 +869,45 @@
     return 0;
 }
 
-PRIVATE void print_binding ARGS2(HTStream *, target, int, i)
+/* if both is true, produce an additional line for the corresponding
+   uppercase key if its binding is different. - kw */
+PRIVATE void print_binding ARGS3(
+    HTStream *,        target,
+    int,       i,
+    BOOLEAN,   both)
 {
     char *buf;
+    LYKeymapCode lac1 = LYK_UNKNOWN; /* 0 */
+
 #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE)
     if (prev_lynx_edit_mode && !no_dired_support &&
-        (buf = format_binding(key_override, i)) != 0) {
+       (lac1 = key_override[i]) != LYK_UNKNOWN) {
+       if ((buf = format_binding(key_override, i)) != 0) {
+           (*target->isa->put_block)(target, buf, strlen(buf));
+           FREE(buf);
+       }
+    } else
+#endif /* DIRED_SUPPORT && OK_OVERRIDE */
+    if ((buf = format_binding(keymap, i)) != 0) {
+       lac1 = keymap[i];
        (*target->isa->put_block)(target, buf, strlen(buf));
        FREE(buf);
+    }
+
+    if (!both)
+       return;
+    i -= ' ';                  /* corresponding uppercase key */
+
+#if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE)
+    if (prev_lynx_edit_mode && !no_dired_support && key_override[i]) {
+       if (key_override[i] != lac1 &&
+           (buf = format_binding(key_override, i)) != 0) {
+           (*target->isa->put_block)(target, buf, strlen(buf));
+           FREE(buf);
+       }
     } else
 #endif /* DIRED_SUPPORT && OK_OVERRIDE */
-    if ((buf = format_binding(keymap, i)) != 0) {
+    if (keymap[i] != lac1 && (buf = format_binding(keymap, i)) != 0) {
        (*target->isa->put_block)(target, buf, strlen(buf));
        FREE(buf);
     }
@@ -975,10 +1010,7 @@
     PUTS(buf);
 
     for (i = 'a'+1; i <= 'z'+1; i++) {
-       print_binding(target, i);
-       if (keymap[i - ' '] != keymap[i]) {
-           print_binding(target, i-' ');  /* uppercase mapping is different */
-       }
+       print_binding(target, i, TRUE);
     }
     for (i = 1; i < KEYMAP_SIZE; i++) {
        /*
@@ -986,10 +1018,10 @@
         *
         *  Don't show CHANGE_LINK if mouse not enabled.
         */
-       if ((i >= 0400 || i <= ' ' || !isalpha(i-1)) &&
+       if ((i >= 0200 || i <= ' ' || !isalpha(i-1)) &&
            strcmp(revmap[keymap[i]].name, "PIPE") &&
            (LYUseMouse || strcmp(revmap[keymap[i]].name, "CHANGE_LINK"))) {
-           print_binding(target, i);
+           print_binding(target, i, FALSE);
        }
     }
 
@@ -1009,18 +1041,27 @@
 #endif /* GLOBALDEF_IS_MACRO */
 
 /*
- * install func as the mapping for key.
+ * Install func as the mapping for key.
+ * If for_dired is TRUE, install it in the key_override[] table
+ * for Dired mode, otherwise in the general keymap[] table.
+ * If DIRED_SUPPORT or OK_OVERRIDE is not defined, don't do anything
+ * when for_dired is requested.
  * func must be present in the revmap table.
- * returns TRUE if the mapping was made, FALSE if not.
+ * returns lynxkeycode value != 0 if the mapping was made, 0 if not.
  */
-PUBLIC int remap ARGS2(
-       char *, key,
-       char *, func)
+PUBLIC int remap ARGS3(
+       char *,         key,
+       char *,         func,
+       BOOLEAN,        for_dired)
 {
     int i;
     struct rmap *mp;
     int c;
 
+#if !defined(DIRED_SUPPORT) || !defined(OK_OVERRIDE)
+    if (for_dired)
+       return 0;
+#endif
     if (func == NULL)
        return 0;
     c = lkcstring_to_lkc(key);
@@ -1041,8 +1082,13 @@
        return 0;
     for (i = 0, mp = revmap; (*mp).name != NULL; mp++, i++) {
        if (strcmp((*mp).name, func) == 0) {
-           keymap[c+1] = (char) i;
-           return (c ? c : LAC_TO_LKC0(i));
+#if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE)
+           if (for_dired)
+               key_override[c+1] = (char) i;
+           else
+#endif
+               keymap[c+1] = (char) i;
+           return (c ? c : LAC_TO_LKC0(i)); /* don't return 0, successful */
        }
     }
     return 0;
@@ -1200,17 +1246,21 @@
 
 /*
  *  Given one or two keys as lynxkeycodes, returns an allocated string
- *  representing the key(s) suitable for statusline messages.
- *  The caller must free the string. - kw
+ *  representing the key(s) suitable for statusline messages, or NULL
+ *  if no valid lynxkeycode is passed in (i.e. lkc_first < 0 or some other
+ *  failure).  The caller must free the string. - kw
  */
-PRIVATE char *fmt_keys ARGS2(
+PUBLIC char *fmt_keys ARGS2(
     int,       lkc_first,
     int,       lkc_second)
 {
     char *buf = NULL;
     BOOLEAN quotes = FALSE;
-    char *fmt_first = pretty(lkc_first);
+    char *fmt_first;
     char *fmt_second;
+    if (lkc_first < 0)
+       return NULL;
+    fmt_first = pretty(lkc_first);
     if (fmt_first && strlen(fmt_first) == 1 && *fmt_first != '\'') {
        quotes = TRUE;
     }
Index: 2.21/src/LYHistory.c
--- 2.21/src/LYHistory.c Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYHistory.c Thu, 25 Nov 1999 10:02:08 -0600
@@ -915,10 +915,17 @@
     HTFormat format_in = WWW_HTML;
     HTStream *target = NULL;
     char *buf = NULL;
+    int nummsg = 0;
 
     int i;
     char *temp = NULL;
 
+    i = STATUSBUFSIZE;
+    while (--i >= 0) {
+       if (buffstack[i] != NULL)
+           nummsg++;
+    }
+       
     /*
      *  Set up the stream. - FM
      */
@@ -944,33 +951,40 @@
               "http-equiv=\"content-type\"",
               LYCharSet_UC[current_char_set].MIMEname);
     PUTS(buf);
-    HTSprintf0(&buf, "<title>%s</title>\n", STATUSLINES_TITLE);
-    PUTS(buf);
-    HTSprintf0(&buf, "</head>\n<body>\n<pre>\n<ol>\n");
+    HTSprintf0(&buf, "<title>%s</title>\n</head>\n<body>\n",
+              STATUSLINES_TITLE);
     PUTS(buf);
 
-    /* print messages in reverse order: */
-    i = topOfStack;
-    while (--i >= 0) {
-       if (buffstack[i] != NULL) {
-           StrAllocCopy(temp, buffstack[i]);
-           LYEntify(&temp, TRUE);
-           HTSprintf0(&buf, "<li> <em>%s</em>\n",  temp);
-           PUTS(buf);
+    if (nummsg != 0) {
+       HTSprintf0(&buf, "<ol>\n");
+       PUTS(buf);
+       /* print messages in reverse order: */
+       i = topOfStack;
+       while (--i >= 0) {
+           if (buffstack[i] != NULL) {
+               StrAllocCopy(temp, buffstack[i]);
+               LYEntify(&temp, TRUE);
+               HTSprintf0(&buf, "<li value=%d> <em>%s</em>\n", nummsg, temp);
+               nummsg--;
+               PUTS(buf);
+           }
        }
-    }
-    i = STATUSBUFSIZE;
-    while (--i >= topOfStack) {
-       if (buffstack[i] != NULL) {
-           StrAllocCopy(temp, buffstack[i]);
-           LYEntify(&temp, TRUE);
-           HTSprintf0(&buf, "<li> <em>%s</em>\n",  temp);
-           PUTS(buf);
+       i = STATUSBUFSIZE;
+       while (--i >= topOfStack) {
+           if (buffstack[i] != NULL) {
+               StrAllocCopy(temp, buffstack[i]);
+               LYEntify(&temp, TRUE);
+               HTSprintf0(&buf, "<li value=%d> <em>%s</em>\n", nummsg, temp);
+               nummsg--;
+               PUTS(buf);
+           }
        }
+       FREE(temp);
+       HTSprintf0(&buf, "</ol>\n</body>\n</html>\n");
+    } else {
+       HTSprintf0(&buf, "<p>%s\n</body>\n</html>\n",
+                  gettext("(No messages yet)"));
     }
-    FREE(temp);
-
-    HTSprintf0(&buf, "</ol>\n</pre>\n</body>\n</html>\n");
     PUTS(buf);
 
     (*target->isa->_free)(target);
Index: 2.21/src/LYrcFile.c
--- 2.21/src/LYrcFile.c Wed, 06 Oct 1999 14:34:33 -0500
+++ 2.21(w)/src/LYrcFile.c Thu, 25 Nov 1999 10:02:13 -0600
@@ -29,11 +29,15 @@
     return LYSkipBlanks(src);
 }
 
-PUBLIC void read_rc NOPARAMS
+/*  Read and process user options.
+ *  If the passed-in fp is NULL, open the regular user defaults file
+ *  for reading, otherwise use fp which has to be a file open for
+ *  reading. - kw
+ */
+PUBLIC void read_rc ARGS1(FILE *, fp)
 {
     char *line_buffer = NULL;
     char rcfile[LY_MAXPATH];
-    FILE *fp;
     char *cp;
     int number_sign;
     char MBM_line[256];
@@ -41,16 +45,18 @@
     char *MBM_cp2, *MBM_cp1;
     int  MBM_i2;
 
-    /*
-     *  Make an RC file name.
-     */
-    LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC);
+    if (!fp) {
+       /*
+        *  Make an RC file name.
+        */
+       LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC);
 
-    /*
-     *  Open the RC file for reading.
-     */
-    if ((fp = fopen(rcfile, TXT_R)) == NULL) {
-       return;
+       /*
+        *  Open the RC file for reading.
+        */
+       if ((fp = fopen(rcfile, TXT_R)) == NULL) {
+           return;
+       }
     }
 
     /*
@@ -540,23 +546,30 @@
     }
 }
 
-PUBLIC int save_rc NOPARAMS
+/*  Save user options.
+ *  If the passed-in fp is NULL, open the regular user defaults file
+ *  for writing, otherwise use fp which has to be a temp file open for
+ *  writing. - kw
+ */
+PUBLIC int save_rc ARGS1(FILE *, fp)
 {
     char rcfile[LY_MAXPATH];
-    FILE *fp;
+    BOOLEAN is_tempfile = (fp != NULL);
     int i;
     int MBM_c;
 
-    /*
-     *  Make a name.
-     */
-    LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC);
+    if (!fp) {
+       /*
+        *  Make a name.
+        */
+       LYAddPathToHome(rcfile, sizeof(rcfile), FNAME_LYNXRC);
 
-    /*
-     *  Open the file for write.
-     */
-    if ((fp = LYNewTxtFile(rcfile)) == NULL) {
-       return FALSE;
+       /*
+        *  Open the file for write.
+        */
+       if ((fp = LYNewTxtFile(rcfile)) == NULL) {
+           return FALSE;
+       }
     }
 
     /*
@@ -1044,9 +1057,12 @@
     /*
      *  Close the RC file.
      */
-    fclose(fp);
-
-    HTSYS_purge(rcfile);
+    if (is_tempfile) {
+       LYCloseTempFP(fp);
+    } else {
+       fclose(fp);
+       HTSYS_purge(rcfile);
+    }
 
     return TRUE;
 }
Index: 2.21/src/LYEditmap.c
--- 2.21/src/LYEditmap.c Fri, 05 Nov 1999 21:30:25 -0600
+++ 2.21(w)/src/LYEditmap.c Thu, 25 Nov 1999 10:02:18 -0600
@@ -814,7 +814,9 @@
 LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,
 LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,
 LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,
-LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,      LYE_UNMOD,
+LYE_FORM_LAC|LYK_HOME,
+                LYE_UNMOD,      LYE_FORM_LAC|LYK_END,
+                                                LYE_UNMOD,
 
 /* @, A .. Z, [, \, ], ^, _                             */
 LYE_C1CHAR,     LYE_C1CHAR,     LYE_C1CHAR,     LYE_C1CHAR,
@@ -898,7 +900,7 @@
 LYE_UNMOD,      LYE_NOP,        LYE_UNMOD,      LYE_UNMOD,
 /* Insert key   Remove key      DO_NOTHING      Back tab */
 
-/* 110..18F */
+/* 110..111 */
 #if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && 
!defined(DJGPP_KEYHANDLER)
 
 LYE_DELPW,      LYE_UNMOD,
Index: 2.21/src/GridText.h
--- 2.21/src/GridText.h Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/GridText.h Thu, 25 Nov 1999 10:02:29 -0600
@@ -150,6 +150,9 @@
        int *           linknum,
        char **         hightext,
        char **         lname));
+extern BOOL HText_TAHasMoreLines PARAMS((
+       int             curlink,
+       int             direction));
 extern int HTGetLinkOrFieldStart PARAMS((
        int             curlink,
        int *           go_line,
Index: 2.21/src/HTForms.h
--- 2.21/src/HTForms.h Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/HTForms.h Thu, 25 Nov 1999 10:02:32 -0600
@@ -132,6 +132,9 @@
 #define F_IMAGE_SUBMIT_TYPE 13
 #define F_KEYGEN_TYPE     14
 
+#define F_TEXTLIKE(type) ((type)==F_TEXT_TYPE || (type)==F_TEXT_SUBMIT_TYPE ||\
+                         (type)==F_PASSWORD_TYPE || (type)==F_TEXTAREA_TYPE)
+
 #define WWW_FORM_LINK_TYPE  1
 #define WWW_LINK_TYPE   2
 #define WWW_INTERN_LINK_TYPE   6 /* can be used as a bitflag... - kw */
Index: 2.21/src/LYKeymap.h
--- 2.21/src/LYKeymap.h Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYKeymap.h Thu, 25 Nov 1999 10:06:39 -0600
@@ -8,11 +8,12 @@
 extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int KeyName));
 extern char *key_for_func PARAMS((int func));
 extern char *key_for_func_ext PARAMS((int lac, int context_code));
+extern char *fmt_keys PARAMS((int lkc_first, int lkc_second));
 extern int LYReverseKeymap PARAMS((int KeyName));
+extern int lookup_keymap PARAMS((int code));
 extern int lacname_to_lac PARAMS((CONST char *func));
 extern int lkcstring_to_lkc PARAMS((CONST char *src));
-extern int lookup_keymap PARAMS((int code));
-extern int remap PARAMS((char *key, char *func));
+extern int remap PARAMS((char *key, char *func, BOOLEAN for_dired));
 extern void print_keymap PARAMS((char **newfile));
 extern void reset_emacs_keys NOPARAMS;
 extern void reset_numbers_as_arrows NOPARAMS;
@@ -205,7 +206,7 @@
   , LYK_CHG_KCODE
 #endif /* SH_EX */
 
-} LYKeymapCodes;
+} LYKeymapCode;
 
 
 #endif /* LYKEYMAP_H */
Index: 2.21/src/LYGlobalDefs.h
--- 2.21/src/LYGlobalDefs.h Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYGlobalDefs.h Thu, 25 Nov 1999 10:08:13 -0600
@@ -408,11 +408,16 @@
 
 extern BOOL force_empty_hrefless_a;
 
-#ifndef NO_NONSTICKY_INPUTS
-extern BOOL sticky_inputs;
-extern BOOL textinput_drawn;
-extern BOOL textfield_stop_at_left_edge;
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+extern BOOL textfields_need_activation;
+#ifdef INACTIVE_INPUT_STYLE_VH
+extern BOOL textinput_redrawn;
 #endif
+#else
+#define textfields_need_activation FALSE
+#endif /* TEXTFIELDS_MAY_NEED_ACTIVATION */
+
+extern BOOLEAN textfield_prompt_at_left_edge;
 
 
 #ifndef VMS
Index: 2.21/src/LYStrings.h
--- 2.21/src/LYStrings.h Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYStrings.h Thu, 25 Nov 1999 10:09:06 -0600
@@ -232,6 +232,9 @@
 #define LYE_XPMARK  (LYE_SETMARK +1)  /* emacs-like exchange-point-and-mark */
 #define LYE_KILLREG (LYE_XPMARK  +1)  /* emacs-like kill-region */
 #define LYE_YANK    (LYE_KILLREG +1)  /* emacs-like yank */
+#if defined(WIN_EX)
+#define LYE_PASTE (LYE_YANK +1)          /* ClipBoard to Lynx     */
+#endif
 /* All preceding values must be within 0x00..0x7f - kw */
 
 /*  The following are meant to be bitwise or-ed:  */
@@ -240,9 +243,6 @@
 #define LYE_FORM_LAC 0x1000       /* Flag to pass lynxactioncode given by
                                     lower bits.  Doesn't fit in a char! */
 
-#if defined(WIN_EX)
-#define LYE_PASTE (LYE_AIX +1)   /* ClipBoard to Lynx     */
-#endif
 
 #if defined(USE_KEYMAPS)
 extern int lynx_initialize_keymaps NOPARAMS;
Index: 2.21/src/LYOptions.h
--- 2.21/src/LYOptions.h Wed, 06 Oct 1999 14:34:33 -0500
+++ 2.21(w)/src/LYOptions.h Thu, 25 Nov 1999 10:09:38 -0600
@@ -17,6 +17,8 @@
 #define LYChoosePopup(cur, line, column, choices, length, disabled, mouse) \
        popup_choice(cur, line, column, (CONST char **)choices, length, 
disabled, mouse)
 
+extern int SetupChosenShowColor NOPARAMS;
+
 #ifndef NO_OPTION_FORMS
 extern int postoptions PARAMS((document *newdoc));
 #endif /* !NO_OPTION_FORMS */
Index: 2.21/src/LYrcFile.h
--- 2.21/src/LYrcFile.h Thu, 03 Jun 1999 19:24:44 -0500
+++ 2.21(w)/src/LYrcFile.h Thu, 25 Nov 1999 10:09:41 -0600
@@ -6,8 +6,8 @@
 #include <LYStructs.h>
 #endif /* LYSTRUCTS_H */
 
-extern void read_rc NOPARAMS;
-extern int save_rc NOPARAMS;
+extern void read_rc PARAMS((FILE *));
+extern int save_rc PARAMS((FILE *));
 
 #endif /* LYRCFILE_H */
 
Index: 2.21/src/LYBookmark.c
--- 2.21/src/LYBookmark.c Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYBookmark.c Thu, 25 Nov 1999 10:09:55 -0600
@@ -472,12 +472,15 @@
 #ifdef VMS
     char filename_buffer[NAM$C_MAXRSS+12];
     char newfile[NAM$C_MAXRSS+12];
+#define keep_tempfile FALSE
 #else
     char filename_buffer[LY_MAXPATH];
     char newfile[LY_MAXPATH];
+    BOOLEAN keep_tempfile = FALSE;
 #ifdef UNIX
     struct stat stat_buf;
     mode_t mode;
+    BOOLEAN regular = FALSE;
 #endif /* UNIX */
 #endif /* VMS */
     char homepath[LY_MAXPATH];
@@ -508,6 +511,7 @@
      * Explicitly preserve bookmark file mode on Unix. - DSL
      */
     if (stat(filename_buffer, &stat_buf) == 0) {
+       regular = (S_ISREG(stat_buf.st_mode) && stat_buf.st_nlink == 1);
        mode = ((stat_buf.st_mode & 0777) | 0600); /* make it writable */
        (void) chmod(newfile, mode);
        if ((nfp = LYReopenTemp(newfile)) == NULL) {
@@ -563,11 +567,16 @@
        }
     }
 
+    FREE(buf);
     CTRACE((tfp, "remove_bookmark_link: files: %s %s\n",
                        newfile, filename_buffer));
 
     fclose(fp);
     fp = NULL;
+    if (fflush(nfp) == EOF) {
+       CTRACE((tfp, "fflush(nfp): %s", LYStrerror(errno)));
+       goto failure;
+    }
     LYCloseTempFP(nfp);
     nfp = NULL;
 #ifdef DOSPATH
@@ -580,12 +589,39 @@
      * can preserve the original ownership of the file, provided that
      * it is writable by the current process.
      * Changed to copy  1998-04-26 -- gil
+     *  But if the copy fails, for example because the filesystem is full,
+     *  we are left with a corrupt bookmark file.  Changed back to use
+     *  the previous mechanism [try rename(), then mv for EXDEV], except
+     *  in usual cases (not a regular file e.g. symbolic link, or has hard
+     *  links).  This will let bookmarks survive a filesystem full condition
+     *  in the "normal" case (bookmark is on same filesystem as home directory,
+     *  is a regular file, has no additional hard links).
+     *  If we first tried LYCopyFile, and that fails, also fall back to trying
+     *  the other stuff.  That gives a chance to recover in case the LYCopyFile
+     *  left a corrupt target file.
+     *  If there is an error, and that error may mean that the bookmark file
+     *  has been corrupted, don't remove the temporary newfile (which should
+     *  always be uncorrupted) in place, it may still be used to recover
+     *  manually.  If this applies, produce an additional message to that
+     *  effect.  The temp file will still be removed by normal program exit
+     *  cleanup. - kw 1999-11-12
      */
-    if (LYCopyFile(newfile, filename_buffer) == 0)
-       return;
-    HTAlert(BOOKTEMP_COPY_FAIL);
-#else  /* !UNIX */
+    if (!regular) {
+       if (LYCopyFile(newfile, filename_buffer) == 0) {
+           LYRemoveTemp(newfile);
+           return;
+       }
+       sleep(AlertSecs);       /* give a chance to see error from cp - kw */
+       HTUserMsg(BOOKTEMP_COPY_FAIL);
+       keep_tempfile = TRUE;
+    }
+#endif  /* UNIX */
+
     if (rename(newfile, filename_buffer) != -1) {
+#ifdef UNIX
+       if (regular)
+           chmod(filename_buffer, stat_buf.st_mode & 07777);
+#endif /* UNIX */
        HTSYS_purge(filename_buffer);
        return;
     } else {
@@ -615,10 +651,20 @@
            HTAddParam(&buffer, MV_FMT, 2, newfile);
            HTAddParam(&buffer, MV_FMT, 3, filename_buffer);
            HTEndParam(&buffer, MV_FMT, 3);
-           LYSystem(buffer);
-           FREE(buffer);
-           return;
+           if (LYSystem(buffer) == 0) {
+#ifdef UNIX
+               if (regular)
+                   chmod(filename_buffer, stat_buf.st_mode & 07777);
+#endif /* UNIX */
+               FREE(buffer);
+               return;
+           } else {
+               FREE(buffer);
+               keep_tempfile = TRUE;
+               goto failure;
+           }
        }
+       CTRACE((tfp, "rename(): %s", LYStrerror(errno)));
 #endif /* _WINDOWS */
 #endif /* !VMS */
 
@@ -630,15 +676,21 @@
        if (TRACE)
            perror("renaming the file");
     }
-#endif /* UNIX */
+
 
 failure:
     FREE(buf);
     HTAlert(BOOKMARK_DEL_FAILED);
-    LYCloseTempFP(nfp);
+    if (nfp)
+       LYCloseTempFP(nfp);
     if (fp != NULL)
        fclose(fp);
-    LYRemoveTemp(newfile);
+    if (keep_tempfile) {
+       HTUserMsg2(gettext("File may be recoverable from %s during this 
session"),
+                  newfile);
+    } else {
+       LYRemoveTemp(newfile);
+    }
 }
 
 /*
Index: 2.21/src/GridText.c
--- 2.21/src/GridText.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/GridText.c Thu, 25 Nov 1999 10:13:03 -0600
@@ -6052,18 +6052,59 @@
     return (BOOL) (strcmp(formA->name, formB->name) == 0);
 }
 
-#define same_anchor_as_link(i,a) (i >= 0 && a &&\
+#define same_anchor_as_link(i,a,ta_same) (i >= 0 && a &&\
                same_anchor_or_field(links[i].anchor_number,\
                (links[i].type == WWW_FORM_LINK_TYPE) ? links[i].form : NULL,\
                a->number,\
                (a->link_type == INPUT_ANCHOR) ? a->input_field : NULL,\
-               ta_skip))
-#define same_anchors(a1,a2) (a1 && a2 &&\
+               ta_same))
+#define same_anchors(a1,a2,ta_same) (a1 && a2 &&\
                same_anchor_or_field(a1->number,\
                (a1->link_type == INPUT_ANCHOR) ? a1->input_field : NULL,\
                a2->number,\
                (a2->link_type == INPUT_ANCHOR) ? a2->input_field : NULL,\
-               ta_skip))
+               ta_same))
+
+/*
+ *  Are there more textarea lines belonging to the same textarea before
+ *  (direction < 0) or after (direction > 0) the current one?
+ *  On entry, curlink must be the index in links[] of a textarea field. - kw
+ */
+PUBLIC BOOL HText_TAHasMoreLines ARGS2(
+       int,            curlink,
+       int,            direction)
+{
+    TextAnchor *a;
+    TextAnchor *prev_a = NULL;
+
+    if (!HTMainText)
+       return(NO);
+    if (direction < 0) {
+       for (a = HTMainText->first_anchor; a; prev_a = a, a = a->next) {
+           if (a->link_type == INPUT_ANCHOR &&
+               links[curlink].form == a->input_field) {
+               return same_anchors(a, prev_a, TRUE);
+           }
+           if (links[curlink].anchor_number &&
+               a->number >= links[curlink].anchor_number)
+               break;
+       }
+       return NO;
+    } else {
+       for (a = HTMainText->first_anchor; a; a = a->next) {
+           if (a == HTMainText->last_anchor)
+               break;
+           if (a->link_type == INPUT_ANCHOR &&
+               links[curlink].form == a->input_field) {
+               return same_anchors(a, a->next, TRUE);
+           }
+           if (links[curlink].anchor_number &&
+               a->number >= links[curlink].anchor_number)
+               break;
+       }
+       return NO;
+    }
+}
 
 /*
  *  HTGetLinkOrFieldStart - moving to previous or next link or form field.
@@ -6141,7 +6182,7 @@
                prev_anchor_line = a->line_num;
            }
 
-           if (!same_anchors(current.anc, a)) {
+           if (!same_anchors(current.anc, a, ta_skip)) {
                previous.anc = current.anc;
                previous.prev_anchor_line = current.prev_anchor_line;
                previous.anchors_this_line = current.anchors_this_line;
@@ -6154,7 +6195,7 @@
                current.anchors_this_group++;
            }
            if (curlink >= 0) {
-               if (same_anchor_as_link(curlink,a)) {
+               if (same_anchor_as_link(curlink,a, ta_skip)) {
                    if (direction == -1) {
                        group_to_go = &previous;
                        break;
@@ -6163,7 +6204,7 @@
                        break;
                    }
                } else if (direction > 0 &&
-                          same_anchor_as_link(curlink,previous.anc)) {
+                          same_anchor_as_link(curlink,previous.anc, ta_skip)) {
                    group_to_go = &current;
                    break;
                }
@@ -12124,14 +12165,14 @@
 
 
        if (wanted_fieldlen_wrap < 0 && !wrapalert &&
-           len0+len >= anchor_ptr->input_field->size &&
+           len0+len >= start_anchor->input_field->size &&
            (cp = strchr(lp, ' ')) != NULL &&
-           (cp-lp) < anchor_ptr->input_field->size - 1) {
+           (cp-lp) < start_anchor->input_field->size - 1) {
            LYFixCursesOn("ask for confirmation:");
            erase();            /* don't show previous state */
            if (HTConfirmDefault(gettext("Wrap lines to fit displayed area?"),
                                 NO)) {
-               wanted_fieldlen_wrap = anchor_ptr->input_field->size - 1;
+               wanted_fieldlen_wrap = start_anchor->input_field->size - 1;
            } else {
                wanted_fieldlen_wrap = 0;
            }
Index: 2.21/src/LYMain.c
--- 2.21/src/LYMain.c Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/src/LYMain.c Thu, 25 Nov 1999 10:14:28 -0600
@@ -13,6 +13,7 @@
 #include <HTML.h>
 #include <LYUtils.h>
 #include <LYGlobalDefs.h>
+#include <LYOptions.h>
 #include <LYSignal.h>
 #include <LYGetFile.h>
 #include <LYStrings.h>
@@ -442,11 +443,12 @@
 
 PUBLIC BOOL force_empty_hrefless_a = FALSE;
 
-#ifndef NO_NONSTICKY_INPUTS
-PUBLIC BOOL sticky_inputs = TRUE;
-PUBLIC BOOL textfield_stop_at_left_edge=FALSE;
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+PUBLIC BOOL textfields_need_activation = FALSE;
 #endif
 
+PUBLIC BOOLEAN textfield_prompt_at_left_edge = FALSE;
+
 
 #ifdef DISP_PARTIAL
 PUBLIC BOOLEAN display_partial_flag = TRUE; /* Display document during 
download */
@@ -1526,7 +1528,7 @@
     /*
      * Process the RC file.
      */
-    read_rc();
+    read_rc(NULL);
 
     /*
      * Get WWW_HOME environment variable if it exists.
@@ -2089,6 +2091,8 @@
  */
 PUBLIC void reload_read_cfg NOARGS
 {
+    char *tempfile;
+    FILE *rcfp;
     /*
      *  no_option_save is always set for -anonymous and -validate.
      *  It is better to check for one or several specific restriction
@@ -2110,9 +2114,35 @@
 #if 0                          /* therefore this isn't needed: */
     if (LYRestricted) return;  /* for sure */
 #endif
+
+    /*
+     *  Current user preferences are saved in a temporary file, to be
+     *  read in again after lynx.cfg has been read.  This avoids
+     *  accidental changing of the preferences file.  The regular
+     *  preferences file doesn't even need to exist, and won't be
+     *  created as a side effect of this function.  Honoring the
+     *  no_option_save restriction may thus be unnecessarily restrictive,
+     *  but the check is currently still left in place. - kw
+     */
+    tempfile = calloc(1, LY_MAXPATH);
+    if (!tempfile) {
+       HTAlwaysAlert(NULL, NOT_ENOUGH_MEMORY);
+       return;
+    }
+    rcfp = LYOpenTemp(tempfile, ".rc" , "w");
+    if (rcfp == NULL) {
+       FREE(tempfile);
+       HTAlwaysAlert(NULL, CANNOT_OPEN_TEMP);
+       return;
+    }
     /* save .lynxrc file in case we change something from Options Menu */
-    if (!save_rc()) {
+    if (LYrcShowColor != SHOW_COLOR_UNKNOWN) {
+       SetupChosenShowColor();
+    }
+    if (!save_rc(rcfp)) {
        HTAlwaysAlert(NULL, OPTIONS_NOT_SAVED);
+       LYRemoveTemp(tempfile);
+       FREE(tempfile);
        return;    /* can not write the very own file :( */
     }
 
@@ -2140,9 +2170,12 @@
        read_cfg(lynx_cfg_file, "main program", 1, (FILE *)0);
 
        /*
-        *  Process the RC file.
+        *  Process the temporary RC file.
         */
-       read_rc();
+       rcfp = fopen(tempfile, "r");
+       read_rc(rcfp);
+       LYRemoveTemp(tempfile);
+       FREE(tempfile);         /* done with it - kw */
 
 #ifdef EXP_CHARSET_CHOICE
        init_charset_subsets();
@@ -2165,6 +2198,11 @@
        /*
         *  Initialize other things based on the configuration read.
         */
+       if (user_mode == NOVICE_MODE) {
+           display_lines = LYlines - 4;
+       } else {
+           display_lines = LYlines - 2;
+       }
                /* Not implemented yet here,
                 * a major problem: file paths
                 * like lynx_save_space, LYCookieFile etc.
@@ -3462,10 +3500,10 @@
       "startfile_ok",  SET_ARG,                &startfile_ok,
       "allow non-http startfile and homepage with -validate"
    ),
-#ifndef NO_NONSTICKY_INPUTS
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
    PARSE_SET(
-      "sticky_inputs", SET_ARG,                &sticky_inputs,
-      "don't require activating inputs in order to edit them"
+      "tna",           SET_ARG,                &textfields_need_activation,
+      "turn on \"Textfields Need Activation\" mode"
    ),
 #endif
 #ifndef VMS
Index: 2.21/src/LYReadCFG.c
--- 2.21/src/LYReadCFG.c Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/src/LYReadCFG.c Thu, 25 Nov 1999 10:14:52 -0600
@@ -3,6 +3,7 @@
 #else
 #include <HTUtils.h>
 #endif
+#include <HTTP.h>  /* 'reloading' flag */
 #include <HTFile.h>
 #include <HTInit.h>
 #include <UCMap.h>
@@ -639,14 +640,21 @@
 {
     char *func, *efunc;
 
-    if ((func = strchr(key, ':')) != NULL)     {
+    if ((func = strchr(key, ':')) != NULL) {
        *func++ = '\0';
        efunc = strchr(func, ':');
        /* Allow comments on the ends of key remapping lines. - DT */
        /* Allow third field for line-editor action. - kw */
        if (efunc == func) {    /* have 3rd field, but 2nd field empty */
            func = NULL;
-       } else if (!remap(key, strtok(func, " \t\n:#"))) {
+       } else if (efunc && strncasecomp(efunc + 1, "DIRED", 5) == 0) {
+           if (!remap(key, strtok(func, " \t\n:#"), TRUE)) {
+               fprintf(stderr,
+                       gettext("key remapping of %s to %s for %s failed\n"),
+                       key, func, efunc + 1);
+           }
+           return 0;
+       } else if (!remap(key, strtok(func, " \t\n:#"), FALSE)) {
            fprintf(stderr, gettext("key remapping of %s to %s failed\n"),
                    key, func);
        } else {
@@ -659,6 +667,10 @@
                BOOLEAN success = FALSE;
                int lkc = lkcstring_to_lkc(key);
                int lec = -1;
+               if (!success && strncasecomp(efunc, "DIRED", 5) == 0) {
+                   lec = LYE_FORM_PASS;
+                   success = (BOOL) LYRemapEditBinding(lkc, lec);
+               }
                /*
                 *  PASS! tries to enter the key into the LYLineEditors
                 *  bindings in a different way from PASS, namely as
@@ -673,7 +685,7 @@
                 *  matter subject to change...  At any rate, if
                 *  PASS! fails try it the same way as for PASS. - kw
                 */
-               if (strcasecomp(efunc, "PASS!") == 0) {
+               if (!success && strcasecomp(efunc, "PASS!") == 0) {
                    if (func) {
                        lec = LYE_FORM_LAC|lacname_to_lac(func);
                        success = (BOOL) LYRemapEditBinding(lkc, lec);
@@ -1331,6 +1343,7 @@
      PARSE_FUN("keyboard_layout", CONF_FUN, keyboard_layout_fun),
 #endif
      PARSE_FUN("keymap", CONF_FUN, keymap_fun),
+     PARSE_SET("leftarrow_in_textfield_prompt", CONF_BOOL, 
&textfield_prompt_at_left_edge),
 #ifndef DISABLE_NEWS
      PARSE_SET("list_news_numbers", CONF_BOOL, &LYListNewsNumbers),
      PARSE_SET("list_news_dates", CONF_BOOL, &LYListNewsDates),
@@ -1429,10 +1442,6 @@
      PARSE_SET("source_cache", CONF_FUN, source_cache_fun),
 #endif
      PARSE_STR("startfile", CONF_STR, &startfile),
-#ifndef NO_NONSTICKY_INPUTS
-     PARSE_SET("sticky_fields", CONF_BOOL, &textfield_stop_at_left_edge),
-     PARSE_SET("sticky_inputs", CONF_BOOL, &sticky_inputs),
-#endif
      PARSE_SET("strip_dotdot_urls", CONF_BOOL, &LYStripDotDotURLs),
      PARSE_SET("substitute_underscores", CONF_BOOL, &use_underscore),
      PARSE_FUN("suffix", CONF_FUN, suffix_fun),
@@ -1441,6 +1450,9 @@
      PARSE_STR("system_mail", CONF_STR, &system_mail),
      PARSE_STR("system_mail_flags", CONF_STR, &system_mail_flags),
      PARSE_SET("tagsoup", CONF_BOOL, &Old_DTD),
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+     PARSE_SET("textfields_need_activation", CONF_BOOL, 
&textfields_need_activation),
+#endif
 #if defined(_WINDOWS)
      PARSE_INT("timeout", CONF_INT, &lynx_timeout),
 #endif
@@ -1471,6 +1483,11 @@
      {0, 0, 0}
 };
 
+PRIVATE char *lynxcfginfo_url = NULL;  /* static */
+#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
+PRIVATE char *configinfo_url = NULL;   /* static */
+#endif
+
 /*
  * Free memory allocated in 'read_cfg()'
  */
@@ -1515,6 +1532,10 @@
     }
     free_item_list();
     free_printer_item_list();
+    FREE(lynxcfginfo_url);
+#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
+    FREE(configinfo_url);
+#endif
 }
 
 PRIVATE Config_Type *lookup_config ARGS1(
@@ -1959,8 +1980,7 @@
 PUBLIC int lynx_cfg_infopage ARGS1(
     document *,                       newdoc)
 {
-    static char tempfile[LY_MAXPATH];
-    static char *local_url;  /* static! */
+    static char tempfile[LY_MAXPATH] = "\0";
     DocAddress WWWDoc;  /* need on exit */
     char *temp = 0;
     char *cp1 = NULL;
@@ -1985,45 +2005,86 @@
         *  now pop-up and return to updated LYNXCFG:/ page,
         *  remind postoptions() but much simpler:
         */
-
-       /*  the page was pushed, so pop-up. */
-       LYpop(newdoc);
-       WWWDoc.address = newdoc->address;
-       WWWDoc.post_data = newdoc->post_data;
-       WWWDoc.post_content_type = newdoc->post_content_type;
-       WWWDoc.bookmark = newdoc->bookmark;
-       WWWDoc.isHEAD = newdoc->isHEAD;
-       WWWDoc.safe = newdoc->safe;
-       LYforce_no_cache = FALSE;   /* ! */
-       LYoverride_no_cache = TRUE; /* ! */
-
        /*
-        * Working out of getfile() cycle we reset *no_cache manually here so
-        * HTLoadAbsolute() will return "Document already in memory":  it was
-        * forced reloading obsolete file again without this (overhead).
-        *
-        * Probably *no_cache was set in a wrong position because of
-        * the internal page...
+        *  But check whether the top history document is really
+        *  the expected LYNXCFG: page. - kw
         */
-       if (!HTLoadAbsolute(&WWWDoc))
-           return(NOT_FOUND);
+       if (HTMainText && nhist > 0 &&
+           !strcmp(HTLoadedDocumentTitle(), LYNXCFG_TITLE) &&
+           !strcmp(HTLoadedDocumentURL(), history[nhist-1].address) &&
+           (!lynxcfginfo_url ||
+            strcmp(HTLoadedDocumentURL(), lynxcfginfo_url))) {
+           /*  the page was pushed, so pop-up. */
+           LYpop(newdoc);
+           WWWDoc.address = newdoc->address;
+           WWWDoc.post_data = newdoc->post_data;
+           WWWDoc.post_content_type = newdoc->post_content_type;
+           WWWDoc.bookmark = newdoc->bookmark;
+           WWWDoc.isHEAD = newdoc->isHEAD;
+           WWWDoc.safe = newdoc->safe;
+           LYforce_no_cache = FALSE;   /* ! */
+           LYoverride_no_cache = TRUE; /* ! */
 
-       HTuncache_current_document();  /* will never use again */
+           /*
+            * Working out of getfile() cycle we reset *no_cache manually here 
so
+            * HTLoadAbsolute() will return "Document already in memory":  it 
was
+            * forced reloading obsolete file again without this (overhead).
+            *
+            * Probably *no_cache was set in a wrong position because of
+            * the internal page...
+            */
+           if (!HTLoadAbsolute(&WWWDoc))
+               return(NOT_FOUND);
+
+           HTuncache_current_document();  /* will never use again */
+       }
 
        /*  now set up the flag and fall down to create a new LYNXCFG:/ page */
-       local_url = 0;  /* see below */
+       FREE(lynxcfginfo_url);  /* see below */
     }
 #endif /* !NO_CONFIG_INFO */
 
+    /*
+     * We regenerate the file if reloading has been requested (with
+     * LYK_NOCACHE key).  If we did not regenerate, there would be no
+     * way to recover in a session from a situation where the file is
+     * corrupted (for example truncated because the file system was full
+     * when it was first created - lynx doesn't check for write errors
+     * below), short of manual complete removal or perhaps forcing
+     * regeneration with LYNXCFG://reload.  Similarly, there would be no
+     * simple way to get a different page if user_mode has changed to
+     * Advanced after the file was first generated in a non-Advanced mode
+     * (the difference being in whether the page includes the link to
+     * LYNXCFG://reload or not).
+     * We also try to regenerate the file if lynxcfginfo_url is set,
+     * indicating that tempfile is valid, but the file has disappeared anyway.
+     * This can happen to a long-lived lynx process if for example some system
+     * script periodically cleans up old files in the temp file space. - kw
+     */
 
-    if (local_url == 0) {
+    if (LYforce_no_cache && reloading) {
+       FREE(lynxcfginfo_url); /* flag to code below to regenerate - kw */
+    } else if (lynxcfginfo_url != NULL) {
+       if ((fp0 = fopen(tempfile, "r")) != NULL) { /* check existence */
+           fclose(fp0);                /* OK */
+       } else {
+           FREE(lynxcfginfo_url); /* flag to code below to try again - kw */
+       }
+    }
+    if (lynxcfginfo_url == 0) {
 
-       LYRemoveTemp(tempfile);
-       if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) {
+       if (LYReuseTempfiles) {
+           fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w");
+       } else {
+           if (tempfile[0])
+               LYRemoveTemp(tempfile);
+           fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w");
+       }
+       if (fp0 == NULL) {
            HTAlert(CANNOT_OPEN_TEMP);
            return(NOT_FOUND);
        }
-       LYLocalFileToURL(&local_url, tempfile);
+       LYLocalFileToURL(&lynxcfginfo_url, tempfile);
 
        LYforce_no_cache = TRUE;  /* don't cache this doc */
 
@@ -2090,7 +2151,7 @@
     }
 
     /* return to getfile() cycle */
-    StrAllocCopy(newdoc->address, local_url);
+    StrAllocCopy(newdoc->address, lynxcfginfo_url);
     WWWDoc.address = newdoc->address;
     WWWDoc.post_data = newdoc->post_data;
     WWWDoc.post_content_type = newdoc->post_content_type;
@@ -2100,6 +2161,9 @@
 
     if (!HTLoadAbsolute(&WWWDoc))
        return(NOT_FOUND);
+#ifdef DIRED_SUPPORT
+    lynx_edit_mode = FALSE;
+#endif /* DIRED_SUPPORT */
     return(NORMAL);
 }
 
@@ -2112,22 +2176,50 @@
 PUBLIC int lynx_compile_opts ARGS1(
     document *,                       newdoc)
 {
-    char tempfile[LY_MAXPATH];
+    static char tempfile[LY_MAXPATH] = "\0";
 #define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, 
table[N].value)
 #include <cfg_defs.h>
     unsigned n;
-    static char *info_url;  /* static! */
     DocAddress WWWDoc;  /* need on exit */
     FILE *fp0;
 
-    /* create the page only once - compile-time data will not change... */
+    /* In general, create the page only once - compile-time data will not
+     * change...  But we will regenerate the file anyway, in two situations:
+     * (a) configinfo_url has been FREEd - this can happen if free_lynx_cfg()
+     * was called as part of a LYNXCFG://reload action.
+     * (b) reloading has been requested (with LYK_NOCACHE key).  If we did
+     * not regenerate, there would be no way to recover in a session from
+     * a situation where the file is corrupted (for example truncated because
+     * the file system was full when it was first created - lynx doesn't
+     * check for write errors below), short of manual complete removal or
+     * forcing regeneration with LYNXCFG://reload.
+     * (c) configinfo_url is set, indicating that tempfile is valid, but
+     * the file has disappeared anyway.  This can happen to a long-lived lynx
+     * process if for example some system script periodically cleans up old
+     * files in the temp file space. - kw
+     */
 
-    if (info_url == 0) {
-       if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) {
+    if (LYforce_no_cache && reloading) {
+       FREE(configinfo_url); /* flag to code below to regenerate - kw */
+    } else if (configinfo_url != NULL) {
+       if ((fp0 = fopen(tempfile, "r")) != NULL) { /* check existence */
+           fclose(fp0);                /* OK */
+       } else {
+           FREE(configinfo_url); /* flag to code below to try again - kw */
+       }
+    }
+    if (configinfo_url == NULL) {
+       if (LYReuseTempfiles) {
+           fp0 = LYOpenTempRewrite(tempfile, HTML_SUFFIX, "w");
+       } else {
+           LYRemoveTemp(tempfile);
+           fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w");
+       }
+       if (fp0 == NULL) {
            HTAlert(CANNOT_OPEN_TEMP);
            return(NOT_FOUND);
        }
-       LYLocalFileToURL(&info_url, tempfile);
+       LYLocalFileToURL(&configinfo_url, tempfile);
 
        BeginInternalPage (fp0, CONFIG_DEF_TITLE, NULL);
        fprintf(fp0, "<pre>\n");
@@ -2151,7 +2243,7 @@
     }
 
     /* exit to getfile() cycle */
-    StrAllocCopy(newdoc->address, info_url);
+    StrAllocCopy(newdoc->address, configinfo_url);
     WWWDoc.address = newdoc->address;
     WWWDoc.post_data = newdoc->post_data;
     WWWDoc.post_content_type = newdoc->post_content_type;
@@ -2161,6 +2253,9 @@
 
     if (!HTLoadAbsolute(&WWWDoc))
        return(NOT_FOUND);
+#ifdef DIRED_SUPPORT
+    lynx_edit_mode = FALSE;
+#endif /* DIRED_SUPPORT */
     return(NORMAL);
 }
 #endif /* !NO_CONFIG_INFO */
Index: 2.21/src/HTML.c
--- 2.21/src/HTML.c Thu, 25 Nov 1999 07:18:32 -0600
+++ 2.21(w)/src/HTML.c Thu, 25 Nov 1999 10:15:09 -0600
@@ -5505,8 +5505,18 @@
            value[HTML_TEXTAREA_COLS] &&
            isdigit((unsigned char)*value[HTML_TEXTAREA_COLS]))
            StrAllocCopy(me->textarea_cols, value[HTML_TEXTAREA_COLS]);
-       else
-           StrAllocCopy(me->textarea_cols, "60");
+       else {
+           int width;
+           width = LYcols - 1 -
+                   me->new_style->leftIndent - me->new_style->rightIndent;
+           if (dump_output_immediately) /* don't waste too much for this */
+               width = HTMIN(width, 60);
+           if (width > 1 && (width-1)*6 < MAX_LINE - 3 -
+               me->new_style->leftIndent - me->new_style->rightIndent)
+               HTSprintf0(&me->textarea_cols, "%d", width);
+           else
+               StrAllocCopy(me->textarea_cols, "60");
+       }
 
        if (present && present[HTML_TEXTAREA_ROWS] &&
            value[HTML_TEXTAREA_ROWS] &&
Index: 2.21/userdefs.h
--- 2.21/userdefs.h Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/userdefs.h Thu, 25 Nov 1999 10:24:13 -0600
@@ -1241,6 +1241,16 @@
 /* #define TEXT_SUBMIT_CONFIRM_WANTED */
 
 /********************************
+ * If TEXTFIELDS_MAY_NEED_ACTIVATION is defined (to anything),
+ * the option TEXTFIELDS_NEED_ACTIVATION in lynx.cfg or the command
+ * line option -tna can be used to require explicit activation
+ * before text input fields can be changed with the built-in line
+ * editor.
+ */
+
+#define TEXTFIELDS_MAY_NEED_ACTIVATION
+
+/********************************
  * The following three definitions control some aspects of extended
  * textarea handling.  TEXTAREA_EXPAND_SIZE is the number of new empty
  * lines that get appended at the end of a textarea by a GROWTEXTAREA
Index: 2.21/configure.in
--- 2.21/configure.in Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/configure.in Thu, 25 Nov 1999 10:17:11 -0600
@@ -957,13 +957,13 @@
        AC_DEFINE(DIRED_SUPPORT)
 
        AC_MSG_CHECKING(if you wish to allow extracting from archives via DirEd)
-       CF_ARG_DISABLE(dired-archive,
+       CF_ARG_DISABLE(dired-dearchive,
        [  --disable-dired-archive  disable dearchiving 
commands],[AC_DEFINE(ARCHIVE_ONLY)])
        AC_MSG_RESULT($enableval)
 
-       AC_MSG_CHECKING(if you wish to allow users to redefine DirEd keys)
+       AC_MSG_CHECKING(if DirEd mode should override keys)
        CF_ARG_DISABLE(dired-override,
-       [  --disable-dired-override disable private 
keymaps],,[AC_DEFINE(OK_OVERRIDE)])
+       [  --disable-dired-override disable DirEd override 
keymap],,[AC_DEFINE(OK_OVERRIDE)])
        AC_MSG_RESULT($enableval)
 
        AC_MSG_CHECKING(if you wish to allow permissions commands via DirEd)
Index: 2.21/INSTALLATION
--- 2.21/INSTALLATION Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/INSTALLATION Thu, 25 Nov 1999 10:17:30 -0600
@@ -161,7 +161,7 @@
     order shown by the -help option is different.  See "docs/README.defines"
     for information on defines for which there are no option switches.
 
-  --disable-alt-bindings               (define EXP_ALT_BINDINGS)
+  --disable-alt-bindings               (prevent defining EXP_ALT_BINDINGS)
        Compiles-in an alternative set of line-edit bindings, in addition
        to the default bindings.
 
@@ -171,7 +171,7 @@
        as extended lynx.cfg viewing with a pointer to the lynx.cfg file and
        additional functionality).
 
-  --disable-dired                      (define DIRED_SUPPORT)
+  --disable-dired                      (prevent defining DIRED_SUPPORT)
        Use this option to disable the optional directory-editor.
 
        Lynx supports directory editing (DirEd) for local directories.
@@ -182,14 +182,15 @@
        current directory.  If you're building a Lynx that is to be used as
        a kind of restricted shell for users who do not have access to the
        command line and should not have access to equivalent capabilities,
-       you must disable DirEd with this option.  You can also disable some
-       DirEd functions while allowing others.  If you have disabled DirEd
-       completely, you can ignore all the other DirEd options.
+       you probably want to disable DirEd with this option.  You can also
+       disable some DirEd functions while allowing others.  If you have
+       disabled DirEd completely, you can ignore all the more specific
+       DirEd options.
 
-       All DirEd functions that were enabled on compilation can be disabled
-       or modified at run time via DIRED_MENU symbols in lynx.cfg.
+       All DirEd key functions that were enabled on compilation can be
+       disabled or modified at run time via DIRED_MENU symbols in lynx.cfg.
 
-  --disable-dired-archive              (define ARCHIVE_ONLY)
+  --disable-dired-dearchive            (define ARCHIVE_ONLY)
        Use this option to prevent DirEd from extracting files from an
        archive file.
 
@@ -197,9 +198,8 @@
        Use this option to prevent DirEd from using gzip and gunzip.
 
   --disable-dired-override             (prevent defining OK_OVERRIDE)
-       Lynx users can customize their keymaps by creating private
-       versions of lynx.cfg and modifying them to override the default
-       keymap.  Use this option to prevent DirEd keymap overriding.
+       Normally, in DirEd directory viewing mode some key mappings are
+       overridden.  Use this option to disable DirEd keymap overriding.
 
   --disable-dired-permit               (prevent defining OK_PERMIT)
        Use this option to prevent DirEd from changing the permissions
@@ -248,8 +248,13 @@
        Do not compile-in code used to connect to GOPHER servers.
 
   --disable-full-paths
-       Use this option to control whether full utility pathnames are used.
-       By default, configure substitutes full pathnames.
+       Use this option to control whether full pathnames are compiled in for
+       various utilities invoked by lynx as external commands.  By default,
+       full pathnames are compiled in for the the locations where configure
+       finds these commands at configure time.  Affected commands are chmod,
+       compress, cp, gzip, install, mkdir, mv, rm, tar, touch, gunzip, unzip,
+       bzip2, uudecode, zcat, zip, telnet, tn3270, rlogin.  (Not all of them
+       are used on all systems or in all configurations.)
 
   --disable-included-msgs
        Do not use included messages, for i18n support.  If NLS support is
@@ -268,16 +273,16 @@
        -forms_options command-line switch.
 
   --disable-news                       (define DISABLE_NEWS)
-       Do not compile-in code used to connect to NEWS servers.
+       Do not compile-in code used to connect to NNTP (netnews) servers.
 
   --disable-parent-dir-refs            (define NO_PARENT_DIR_REFERENCE)
        Use this option to disable "Up-to" parent-links in directory listings.
 
-  --disable-partial                    (define DISP_PARTIAL)
+  --disable-partial                    (prevent defining DISP_PARTIAL)
        Turn off code that lets Lynx display parts of a long page while loading
        it.
 
-  --disable-persistent-cookies         (define EXP_PERSISTENT_COOKIES)
+  --disable-persistent-cookies         (prevent defining 
EXP_PERSISTENT_COOKIES)
        Use this option to tell configure whether to compile-in support for
        saving cookies to a file, for subsequent reuse.  Persistent cookie
        support will use (or create) the file specified by the 'COOKIE_FILE'
@@ -355,7 +360,7 @@
   --enable-justify-elts                        (define EXP_JUSTIFY_ELTS)
        use experimental element-justification logic.
 
-  --enable-internal-links              (define DONT_TRACK_INTERNAL_LINKS)
+  --enable-internal-links              (prevent defining 
DONT_TRACK_INTERNAL_LINKS)
        Disabled by default, this option allows tracking of internal links,
        a feature which could, however, compromise a secure transaction by
        forcing inappropriate resubmission of form content.
Index: 2.21/lynx.cfg
--- 2.21/lynx.cfg Thu, 25 Nov 1999 09:49:41 -0600
+++ 2.21(w)/lynx.cfg Thu, 25 Nov 1999 10:18:12 -0600
@@ -1922,16 +1922,32 @@
 #KEYMAP:0x00:DO_NOTHING        # Does nothing (ignore this key)
 #KEYMAP:0x10E:DO_NOTHING # Does nothing (ignore this key)
 #
-# KEYMAP lines can have an additional field with content PASS.  If present,
-# if the key is pressed in a text input field it is passed by the built-in
-# line-editor to normal KEYMAP handling, i.e. this flag acts like an implied
-# ^V escape.  It overrides any line-editor binding for the key.  For example,
+# KEYMAP lines can have an additional field.  If present, and if it specifies
+# PASS, then if the key is pressed in a text input field it is passed by the
+# built-in line-editor to normal KEYMAP handling, i.e. this flag acts like an
+# implied ^V escape.  It overrides any line-editor binding for the key.  For
+# example,
 #
 #KEYMAP:0x10C:UP_TWO:PASS # Function key Insert - Move display up two lines
 #
-# In addition, the following functions are not directly mapped to any keys
-# by default, although some of them may be mapped in specific line-editor
-# bindings (effective while in text input fields):
+# If the additional field specifies DIRED, then the function is mapped in
+# the override table used only in DIRED mode.  This is only valid if lynx
+# was compiled with dired support and OK_OVERRIDE defined.  Default override
+# mappings are
+#
+#KEYMAP:^U:PREV_DOC:DIRED  # Return to the previous document
+#KEYMAP:.:TAG_LINK:DIRED   # Tag a file or directory for later action
+#KEYMAP:c:CREATE:DIRED     # Create a new file or directory
+#KEYMAP:f:DIRED_MENU:DIRED # Display a menu of file operations
+#KEYMAP:m:MODIFY:DIRED     # Modify name or location of a file or directory
+#KEYMAP:r:REMOVE:DIRED     # Remove files or directories
+#KEYMAP:t:TAG_LINK:DIRED   # Tag a file or directory for later action
+#KEYMAP:u:UPLOAD:DIRED     # Show menu of "Upload Options"
+#
+# In addition to the bindings available by default, the following functions
+# are not directly mapped to any keys by default, although some of them may
+# be mapped in specific line-editor bindings (effective while in text input
+# fields):
 #
 #KEYMAP:???:RIGHT_LINK # Move to the link to the right
 #KEYMAP:???:LEFT_LINK  # Move to the link to the left
@@ -2397,17 +2413,24 @@
 #
 #JUSTIFY:TRUE
 
-# STICKY_INPUTS - Input
-# This option controls whether all text inputs are sticky.  If input is not
-# sticky, then it won't intercept any keyboard input until user activates it
-# (as usual link).  Making inputs non-sticky can be desired for users who
-# actively use alphanumeric keys for navigation (as ' ', 'b', INS, DEL, etc). 
-# Default is TRUE - i.e., all inputs are sticky, this is old lynx behavior.
-#
-#STICKY_INPUTS:TRUE
-
-# STICKY_FIELDS - Input
-# This option controls whether pressing an extra key-left in a text field will
-# activate the previous document.
+# If TEXTFIELDS_NEED_ACTIVATION is set to TRUE, and lynx was compiled with
+# TEXTFIELDS_MAY_NEED_ACTIVATION defined, then text input form fields need
+# to be activated (by pressing the Enter key or similar) before the user
+# can enter or modify input.  By default, input fields become automatically
+# activated when selected.  Requiring explicit activation can be desired for
+# users who use alphanumeric keys for navigation (or other keys that have
+# special meaning in the line editor - ' ', 'b', INS, DEL, etc), and don't
+# want to 'get stuck' in form fields.  Instead of setting the option here,
+# explictit activation can also be requested with the -tna command line
+# option.
+#
+#TEXTFIELDS_NEED_ACTIVATION:FALSE
+
+# LEFTARROW_IN_TEXTFIELD_PROMPT
+# This option controls what happens when a Left Arrow key is pressed while
+# in the first position of an active text input field.  By default, Lynx
+# asks for confirmation ("Do you want to go back to the previous document?")
+# only if the contents of the fields have been changed since entering it.
+# If set to TRUE, the confirmation prompt is always issued.
 #
-#STICKY_FIELDS:FALSE
+#LEFTARROW_IN_TEXTFIELD_PROMPT:FALSE
Index: 2.21/LYMessages_en.h
--- 2.21/LYMessages_en.h Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/LYMessages_en.h Thu, 25 Nov 1999 10:18:18 -0600
@@ -53,6 +53,25 @@
 #define URL_TOO_LONG gettext("URL too long")
 
 /* Forms messages */
+#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION
+/* Inactive input fields, messages used with -tna option - kw */
+#define FORM_LINK_TEXT_MESSAGE_INA \
+ gettext("(Text entry field) Inactive.  Press <return> to activate.")
+#define FORM_LINK_TEXTAREA_MESSAGE_INA \
+ gettext("(Textarea) Inactive.  Press <return> to activate.")
+#define FORM_LINK_TEXTAREA_MESSAGE_INA_E \
+ gettext("(Textarea) Inactive.  Press <return> to activate (%s for editor).")
+#define FORM_LINK_TEXT_SUBMIT_MESSAGE_INA \
+ gettext("(Form field) Inactive.  Use <return> to edit.")
+#define FORM_TEXT_SUBMIT_MESSAGE_INA_X \
+ gettext("(Form field) Inactive.  Use <return> to edit (%s to submit with no 
cache).")
+#define FORM_TEXT_RESUBMIT_MESSAGE_INA \
+ gettext("(Form field) Inactive. Press <return> to edit, press <return> twice 
to submit.")
+#define FORM_TEXT_SUBMIT_MAILTO_MSG_INA \
+ gettext("(mailto form field) Inactive.  Press <return> to change.")
+#define FORM_LINK_PASSWORD_MESSAGE_INA \
+ gettext("(Password entry field) Inactive.  Press <return> to activate.")
+#endif
 #define FORM_LINK_FILE_UNM_MSG \
  gettext("UNMODIFIABLE file entry field.  Use UP or DOWN arrows or tab to move 
off.")
 #define FORM_LINK_FILE_MESSAGE \
@@ -150,11 +169,17 @@
 #define NOVICE_LINE_TWO_B \
  gettext("  O)ther cmds  B)ack  E)dit  D)ownload ^R)eload ^W)ipe screen  
search doc: / \n")
 #define NOVICE_LINE_TWO_C \
- gettext("  O)ther cmds  C)omment  History: <delete>  Bookmarks: V)iew, A)dd, 
R)emove  \n")
+ gettext("O)ther cmds  C)omment  History: <backspace>  Bookmarks: V)iew, A)dd, 
R)emove \n")
 #define FORM_NOVICELINE_ONE \
  gettext("            Enter text into the field by typing on the keyboard      
        ")
 #define FORM_NOVICELINE_TWO \
  gettext("    Ctrl-U to delete all text in field, [Backspace] to delete a 
character    ")
+#define FORM_NOVICELINE_TWO_DELBL \
+ gettext("      Ctrl-U to delete text in field, [Backspace] to delete a 
character    ")
+#define FORM_NOVICELINE_TWO_VAR \
+ gettext("    %s to delete all text in field, [Backspace] to delete a 
character    ")
+#define FORM_NOVICELINE_TWO_DELBL_VAR \
+ gettext("      %s to delete text in field, [Backspace] to delete a character  
  ")
 
 /* mailto */
 #define BAD_FORM_MAILTO gettext("Malformed mailto form submission!  
Cancelled!")
@@ -656,6 +681,7 @@
 #define VISITED_LINKS_EMPTY gettext("No previously visited links available!")
 #define MEMORY_EXHAUSTED_ABORT gettext("Memory exhausted!  Program aborted!")
 #define MEMORY_EXHAUSTED_ABORTING gettext("Memory exhausted!  Aborting...")
+#define NOT_ENOUGH_MEMORY gettext("Not enough memory!")
 #define DFM_NOT_AVAILABLE gettext("Directory/File Manager not available")
 #define BASE_NOT_ABSOLUTE gettext("HREF in BASE tag is not an absolute URL.")
 #define LOCATION_NOT_ABSOLUTE gettext("Location URL is not absolute.")
Index: 2.21/src/chrtrans/def7_uni.tbl
--- 2.21/src/chrtrans/def7_uni.tbl Mon, 25 Oct 1999 09:01:18 -0500
+++ 2.21(w)/src/chrtrans/def7_uni.tbl Thu, 25 Nov 1999 10:18:31 -0600
@@ -1912,6 +1912,8 @@
 U+3015:)'
 U+3016:(I
 U+3017:)I
+U+301a:[[
+U+301b:]]
 U+301c:-?
 U+3020:=T:)
 0x20   U+303f
@@ -2285,6 +2287,9 @@
 U+fefa:lh.
 U+fefb:la-
 U+fefc:la.
+
+# the reverse byte-order-mark: zero-width non-break space
+U+feff ""
 
 0x21-0x7e      U+ff01-U+ff5e
 0x2e   U+ff61
Index: 2.21/lynx_help/keystrokes/dired_help.html
--- 2.21/lynx_help/keystrokes/dired_help.html Wed, 06 Oct 1999 14:48:20 -0500
+++ 2.21(w)/lynx_help/keystrokes/dired_help.html Thu, 25 Nov 1999 10:18:45 -0600
@@ -15,13 +15,6 @@
                         directory.  You will be prompted to enter
                         a name for the file.
 
-        D)ownload     - Download selection using options listed in
-                        the download options screen.
-
-        E)dit         - Spawn the editor defined in the <a
-                        href="option_help.html">options screen</a>
-                        and load selection for editing.
-
         F)ull menu    - Show a full menu of commands for currently
                         selected file or directory.
 
@@ -42,6 +35,15 @@
         U)pload       - Upload a file to the current directory using
                         one of the options listed in the upload
                         options screen.
+</pre>
+Some other keys useful in Dired mode:
+<pre>
+        D)ownload     - Download selection using options listed in
+                        the download options screen.
+
+        E)dit         - Spawn the editor defined in the <a
+                        href="option_help.html">options screen</a>
+                        and load selection for editing.
 </pre>
 
 <em>Note:</em> Dired mode must be activated at compile time by the
Index: 2.21/docs/README.defines
--- 2.21/docs/README.defines Thu, 25 Nov 1999 07:30:47 -0600
+++ 2.21(w)/docs/README.defines Thu, 25 Nov 1999 10:18:58 -0600
@@ -127,6 +127,7 @@
 # -DNO_RULES      Disables code for CERN-style rules files
 # -DHAVE_SIGACTION Can use sigaction() and related functions
 # -DMISC_EXP       Enable some truly experimental stuff
+# -DINACTIVE_INPUT_STYLE_VH  Different style for showing inactive text fields
 
 Untested
 --------
Index: 2.21/lynx_help/keystrokes/bashlike_edit_help.html
--- 2.21/lynx_help/keystrokes/bashlike_edit_help.html Thu, 25 Nov 1999 09:49:41 
-0600
+++ 2.21(w)/lynx_help/keystrokes/bashlike_edit_help.html Thu, 25 Nov 1999 
10:19:17 -0600
@@ -161,6 +161,8 @@
             M-e      EDITTEXTAREA   C-e C-e
             M-g      GROWTEXTAREA   (none, C-v $ suggested?)
             M-i      INSERTFILE     (none, C-v # suggested?)
+            M-&lt;      HOME           M-Home
+            M->      END            M-End
             M-F1     DWIMHELP       F1
             M-Find   WHEREIS        C-v /
             M-Select NEXT           C-v n
Index: 2.21/docs/README.TRST
--- 2.21/docs/README.TRST Tue, 26 Oct 1999 01:06:53 -0500
+++ 2.21(w)/docs/README.TRST Thu, 25 Nov 1999 10:19:29 -0600
@@ -52,11 +52,11 @@
 is used to fix up the already formatted output lines when the TABLE
 ends.  If not all goes well, the table was not 'simple' enough, the
 additional processing is cancelled.  One advantage is that we always
-have a 'safe' fallback to well-understood traditional LTMS formatting:
+have a 'safe' fallback to well-understood traditional LMTS formatting:
 TRST won't make more complex tables look worse than before.
 
 So what are 'simple' tables?  A table is simple enough if each of its TR
-rows translates into at most one display line in LTMS formatting (excluding
+rows translates into at most one display line in LMTS formatting (excluding
 leading and trailing line breaks), and the width required by each row
 (before as well as after fixup) does not exceed the availabe screen size.
 Note that his excludes all tables where some of the cells are marked up as


reply via email to

[Prev in Thread] Current Thread [Next in Thread]