From 58bb541d08a0efa32ec8d1f3265209ca3f3c8435 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Tue, 22 Mar 2005 00:17:00 +0000 Subject: Added 1.2.8 news, fixed but in upcase/downcase word (Dain) diff --git a/NEWS b/NEWS index e69de29..b77f25f 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,5 @@ +1.2.8 Mar-21-2005 +- Incorporated patch for locale support and some cleanup from Dain +- Fixed #module to use RLTD_GLOBAL so that symbols from modules ar + available to other modules +- Minor bugfixes and documentation fixes diff --git a/edit.c b/edit.c index c86f3f0..e92c080 100644 --- a/edit.c +++ b/edit.c @@ -687,17 +687,18 @@ void del_word_left __P1 (char *,dummy) void upcase_word __P1 (char *,dummy) { int opos = pos; + int npos = pos; if (last_edit_cmd == (function_any)upcase_word) - pos = 0; + npos = 0; else { - while (pos > 0 && IS_DELIM(edbuf[pos])) pos--; - while (pos > 0 && !IS_DELIM(edbuf[pos - 1])) pos--; + while (npos > 0 && IS_DELIM(edbuf[npos])) npos--; + while (npos > 0 && !IS_DELIM(edbuf[npos - 1])) npos--; } - input_moveto(pos); - while (!IS_DELIM(edbuf[pos]) || - (last_edit_cmd == (function_any)upcase_word && edbuf[pos])) - input_overtype_follow(toupper(edbuf[pos])); + input_moveto(npos); + while (!IS_DELIM(edbuf[npos]) || + (last_edit_cmd == (function_any)upcase_word && edbuf[npos])) + input_overtype_follow(toupper(edbuf[npos++])); input_moveto(opos); } @@ -707,17 +708,18 @@ void upcase_word __P1 (char *,dummy) void downcase_word __P1 (char *,dummy) { int opos = pos; - + int npos = pos; + if (last_edit_cmd == (function_any)downcase_word) - pos = 0; + npos = 0; else { - while (pos > 0 && IS_DELIM(edbuf[pos])) pos--; - while (pos > 0 && !IS_DELIM(edbuf[pos - 1])) pos--; + while (npos > 0 && IS_DELIM(edbuf[npos])) npos--; + while (npos > 0 && !IS_DELIM(edbuf[npos - 1])) npos--; } - input_moveto(pos); - while (!IS_DELIM(edbuf[pos]) || - (last_edit_cmd == (function_any)downcase_word && edbuf[pos])) { - input_overtype_follow(tolower(edbuf[pos])); + input_moveto(npos); + while (!IS_DELIM(edbuf[npos]) || + (last_edit_cmd == (function_any)downcase_word && edbuf[npos])) { + input_overtype_follow(tolower(edbuf[npos++])); } input_moveto(opos); } -- cgit v0.10.2