diff options
author | ache <ache@FreeBSD.org> | 2004-02-13 01:08:19 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2004-02-13 01:08:19 +0000 |
commit | 218f26017703737677c825cf16163763892dd959 (patch) | |
tree | c200e43c1ac30e71e6dfb8b915b0b653db9a9657 /contrib | |
parent | 6a101e69157073d4539484b3633d84c04d35a0dc (diff) | |
parent | 001407b3a64c7fac1489a2ad6eeb2d23254b3e19 (diff) | |
download | FreeBSD-src-218f26017703737677c825cf16163763892dd959.zip FreeBSD-src-218f26017703737677c825cf16163763892dd959.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r125759,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libreadline/bind.c | 2 | ||||
-rw-r--r-- | contrib/libreadline/mbutil.c | 20 | ||||
-rw-r--r-- | contrib/libreadline/readline.c | 1 |
3 files changed, 16 insertions, 7 deletions
diff --git a/contrib/libreadline/bind.c b/contrib/libreadline/bind.c index 65ef401..7103888 100644 --- a/contrib/libreadline/bind.c +++ b/contrib/libreadline/bind.c @@ -311,7 +311,7 @@ rl_generic_bind (type, keyseq, data, map) mapped to something, `abc' to be mapped to something else, and the function bound to `a' to be executed when the user types `abx', leaving `bx' in the input queue. */ - if (k.function /* && k.type == ISFUNC */) + if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR)) { map[ANYOTHERKEY] = k; k.function = 0; diff --git a/contrib/libreadline/mbutil.c b/contrib/libreadline/mbutil.c index 50302f0..8794d02 100644 --- a/contrib/libreadline/mbutil.c +++ b/contrib/libreadline/mbutil.c @@ -205,14 +205,16 @@ _rl_get_char_len (src, ps) if (tmp == (size_t)(-2)) { /* shorted to compose multibyte char */ - memset (ps, 0, sizeof(mbstate_t)); + if (ps) + memset (ps, 0, sizeof(mbstate_t)); return -2; } else if (tmp == (size_t)(-1)) { /* invalid to compose multibyte char */ /* initialize the conversion state */ - memset (ps, 0, sizeof(mbstate_t)); + if (ps) + memset (ps, 0, sizeof(mbstate_t)); return -1; } else if (tmp == (size_t)0) @@ -225,9 +227,12 @@ _rl_get_char_len (src, ps) return 1. Otherwise return 0. */ int _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) - char *buf1, *buf2; - mbstate_t *ps1, *ps2; - int pos1, pos2; + char *buf1; + int pos1; + mbstate_t *ps1; + char *buf2; + int pos2; + mbstate_t *ps2; { int i, w1, w2; @@ -276,8 +281,11 @@ _rl_adjust_point(string, point, ps) pos++; /* clear the state of the byte sequence, because in this case effect of mbstate is undefined */ - memset (ps, 0, sizeof (mbstate_t)); + if (ps) + memset (ps, 0, sizeof (mbstate_t)); } + else if (tmp == 0) + pos++; else pos += tmp; } diff --git a/contrib/libreadline/readline.c b/contrib/libreadline/readline.c index 28801f1..f583358 100644 --- a/contrib/libreadline/readline.c +++ b/contrib/libreadline/readline.c @@ -684,6 +684,7 @@ _rl_dispatch_subseq (key, map, got_subseq) } #if defined (VI_MODE) if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && _rl_vi_textmod_command (key)) _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); #endif |