about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-03-22 19:21:10 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-03-22 19:21:10 +0000
commitf6be7bc19f4db61ddf7ce01e34f878c27eb5cb40 (patch)
treebadff6fda6d8c919d5a22314d063f035307918c5 /Src/lex.c
parent4fb669a72deb547b6ec1c9298373e3b78384983d (diff)
downloadzsh-f6be7bc19f4db61ddf7ce01e34f878c27eb5cb40.tar.gz
zsh-f6be7bc19f4db61ddf7ce01e34f878c27eb5cb40.tar.xz
zsh-f6be7bc19f4db61ddf7ce01e34f878c27eb5cb40.zip
34759: improve implementation of last commit
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 6b9e94289..6d0079c8f 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1872,22 +1872,22 @@ zshlex_raw_back(void)
 }
 
 /**/
-char *
+int
 zshlex_raw_mark(int offset)
 {
     if (!lex_add_raw)
-	return NULL;
-    return lexbuf_raw.ptr + offset;
+	return 0;
+    return lexbuf_raw.len + offset;
 }
 
 /**/
 void
-zshlex_raw_back_to_mark(char *mark)
+zshlex_raw_back_to_mark(int mark)
 {
     if (!lex_add_raw)
 	return;
-    lexbuf_raw.len -= lexbuf_raw.ptr - mark;
-    lexbuf_raw.ptr = mark;
+    lexbuf_raw.ptr = tokstr_raw + mark;
+    lexbuf_raw.len = mark;
 }
 
 /*