1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

unposted: another neatening of lexflags use in ZLE

This commit is contained in:
Peter Stephenson 2010-12-14 10:40:42 +00:00
parent ebcead7543
commit ef5cf45780
2 changed files with 18 additions and 8 deletions

View file

@ -1,5 +1,8 @@
2010-12-14 Peter Stephenson <pws@csr.com>
* unposted: Src/lex.c: another neatening of lexflags use for
ZLE.
* 28529: Src/hist.c, Src/lex.c, Src/zsh.h, Src/Zle/compcore.c,
Src/Zle/compctl.c, Src/Zle/zle_tricky.c: save and restore
lexflags and separate out special word logic for ZLE by
@ -13955,5 +13958,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5150 $
* $Revision: 1.5151 $
*****************************************************

View file

@ -587,13 +587,20 @@ add(int c)
}
}
#define SETPARBEGIN {if (lexflags && !(inbufflags & INP_ALIAS) && zlemetacs >= zlemetall+1-inbufct) parbegin = inbufct;}
#define SETPAREND {\
if (lexflags && !(inbufflags & INP_ALIAS) && parbegin != -1 && parend == -1) {\
if (zlemetacs >= zlemetall + 1 - inbufct)\
parbegin = -1;\
else\
parend = inbufct;} }
#define SETPARBEGIN { \
if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS) && \
zlemetacs >= zlemetall+1-inbufct) \
parbegin = inbufct; \
}
#define SETPAREND { \
if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS) && \
parbegin != -1 && parend == -1) { \
if (zlemetacs >= zlemetall + 1 - inbufct) \
parbegin = -1; \
else \
parend = inbufct; \
} \
}
/*
* Return 1 for math, 0 for a command, 2 for an error. If it couldn't be