From 7f9f81f3e22a58d6a8af77f05cd05c94faf88d93 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 23 May 2000 08:20:56 +0000 Subject: save and restore more variables in bufferwords(); move gotword() into core (11523) --- Src/lex.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Src/lex.c') diff --git a/Src/lex.c b/Src/lex.c index 53c46f5d3..0c16db60c 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -93,6 +93,11 @@ mod_export int inwhat; /**/ mod_export int addedx; +/* wb and we hold the beginning/end position of the word we are completing. */ + +/**/ +mod_export int wb, we; + /* 1 if aliases should not be expanded */ /**/ @@ -1483,6 +1488,19 @@ parse_subst_string(char *s) return 0; } +/* Called below to report word positions. */ + +/**/ +mod_export void +gotword(void) +{ + we = ll + 1 - inbufct + (addedx == 2 ? 1 : 0); + if (cs <= we) { + wb = ll - wordbeg + addedx; + zleparse = 0; + } +} + /* expand aliases and reserved words */ /**/ -- cgit 1.4.1