* When an illegal multibyte sequence is entered in vi insert mode, no garbage

bytes are generated anymore when the insert mode is left.
This commit is contained in:
Gunnar Ritter 2005-01-12 17:26:23 +00:00
parent cd48bf2e60
commit b75f03c3ca
3 changed files with 6 additions and 4 deletions

View File

@ -15,6 +15,8 @@ Release ...
IM (insert mode) capability. It is unlikely that such terminals actually IM (insert mode) capability. It is unlikely that such terminals actually
exist, but vi will use the corresponding code for open mode if a termcap exist, but vi will use the corresponding code for open mode if a termcap
entry is not available. entry is not available.
* When an illegal multibyte sequence is entered in vi insert mode, no garbage
bytes are generated anymore when the insert mode is left.
* The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte * The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte
characters now. characters now.
* Handle character case conversions with the '~' vi command correctly if the * Handle character case conversions with the '~' vi command correctly if the

View File

@ -70,7 +70,7 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Sccsid @(#)ex_version.c 1.113 (gritter) 1/12/05 * Sccsid @(#)ex_version.c 1.114 (gritter) 1/12/05
*/ */
#include "ex.h" #include "ex.h"

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #ifdef DOSCCS
static char sccsid[] = "@(#)ex_vops2.c 1.33 (gritter) 11/29/04"; static char sccsid[] = "@(#)ex_vops2.c 1.34 (gritter) 1/12/05";
#endif #endif
#endif #endif
@ -577,7 +577,7 @@ xgappend(int c, char **gp)
return; return;
} }
#ifdef MB #ifdef MB
if (mb_cur_max > 1) { if (mb_cur_max > 1 && !(c & INVBIT)) {
char mb[MB_LEN_MAX]; char mb[MB_LEN_MAX];
int i, n; int i, n;
n = wctomb(mb, c); n = wctomb(mb, c);
@ -585,7 +585,7 @@ xgappend(int c, char **gp)
*(*gp)++ = mb[i]; *(*gp)++ = mb[i];
} else } else
#endif /* MB */ #endif /* MB */
*(*gp)++ = c; *(*gp)++ = c & 0377;
} }
/* /*