summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-02-23 13:50:09 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-02-23 13:50:09 +0000
commitd9137fd4b6031f0d1640b31779b41dbf742df18d (patch)
tree5daee43fbc9b10d74d8e4c7b2ce953f0be02c7b9 /Src/Zle/zle_main.c
parent23f6fa7244c24f56b00c1eba2dab0c0178662e18 (diff)
downloadzsh-d9137fd4b6031f0d1640b31779b41dbf742df18d.tar.gz
zsh-d9137fd4b6031f0d1640b31779b41dbf742df18d.zip
20854: more Unicode stuff.
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e9d955ef6..091012d17 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -717,8 +717,6 @@ getbyte(int keytmout)
/*
* Get a full character rather than just a single byte.
- * (TODO: Strictly we ought to call this getbyte and the above
- * function getbyte.)
*/
/**/
@@ -778,6 +776,8 @@ getrestchar(int inchar)
/* No timeout here as we really need the character. */
inchar = getbyte(0);
+ /* getbyte deliberately resets lastchar_wide_valid */
+ lastchar_wide_valid = 1;
if (inchar == EOF)
return lastchar_wide = WEOF;
c = inchar;
@@ -833,7 +833,7 @@ zlecore(void)
handleprefixes();
/* for vi mode, make sure the cursor isn't somewhere illegal */
if (invicmdmode() && zlecs > findbol() &&
- (zlecs == zlell || zleline[zlecs] == ZLENL))
+ (zlecs == zlell || zleline[zlecs] == ZWC('\n')))
zlecs--;
if (undoing)
handleundo();
@@ -934,7 +934,7 @@ zleread(char **lp, char **rp, int flags, int context)
histline = curhist;
undoing = 1;
zleline = (unsigned char *)zalloc(((linesz = 256) + 2) * ZLE_CHAR_SIZE);
- *zleline = ZLENUL;
+ *zleline = ZWC('\0');
virangeflag = lastcmd = done = zlecs = zlell = mark = 0;
vichgflag = 0;
viinsbegin = 0;
@@ -993,7 +993,7 @@ zleread(char **lp, char **rp, int flags, int context)
if (eofsent) {
s = NULL;
} else {
- zleline[zlell++] = ZLENL;
+ zleline[zlell++] = ZWC('\n');
s = zlegetline(NULL, NULL);
}
free(zleline);