2001-03-18 Miguel de Icaza <miguel@ximian.com>

* widget.c (forward_word, backward_word): Revert Timur's patch
	from last year which made the behaviour for advancing words not
	match the one in Emacs.
This commit is contained in:
Miguel de Icaza 2001-03-18 17:46:07 +00:00
parent b7b5c71de3
commit 00cac46d7d
2 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2001-03-18 Miguel de Icaza <miguel@ximian.com>
* widget.c (forward_word, backward_word): Revert Timur's patch
from last year which made the behaviour for advancing words not
match the one in Emacs.
2001-03-02 Pavel Roskin <proski@gnu.org> 2001-03-02 Pavel Roskin <proski@gnu.org>
* key.c (mi_getch): Discard non-events (EV_NONE), but not * key.c (mi_getch): Discard non-events (EV_NONE), but not

View File

@ -23,7 +23,6 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* "$Id$" */
#include <config.h> #include <config.h>
#include <string.h> #include <string.h>
@ -1282,11 +1281,10 @@ forward_word (WInput *in)
{ {
unsigned char *p = in->buffer+in->point; unsigned char *p = in->buffer+in->point;
/* We really want to delete either words or separators */
while (*p && isalnum (*p))
p++;
while (*p && (isspace (*p) || ispunct (*p))) while (*p && (isspace (*p) || ispunct (*p)))
p++; p++;
while (*p && isalnum (*p))
p++;
in->point = p - in->buffer; in->point = p - in->buffer;
} }
@ -1295,11 +1293,10 @@ backward_word (WInput *in)
{ {
unsigned char *p = in->buffer+in->point; unsigned char *p = in->buffer+in->point;
/* We really want to delete either words or separators */
while (p-1 > in->buffer-1 && isalnum (*(p-1)))
p--;
while (p-1 > in->buffer-1 && (isspace (*(p-1)) || ispunct (*(p-1)))) while (p-1 > in->buffer-1 && (isspace (*(p-1)) || ispunct (*(p-1))))
p--; p--;
while (p-1 > in->buffer-1 && isalnum (*(p-1)))
p--;
in->point = p - in->buffer; in->point = p - in->buffer;
} }