about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c3
-rw-r--r--Src/lex.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 70dfac036..b44f4ad18 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -527,7 +527,8 @@ histsubchar(int c)
     static int marg = -1;
     static zlong mev = -1;
     char *buf, *ptr;
-    char *sline, *lexraw_mark;
+    char *sline;
+    int lexraw_mark;
     Histent ehist;
     size_t buflen;
 
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;
 }
 
 /*