about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-02-09 17:32:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-02-09 17:32:42 +0000
commitf6f8152f4bd5f9774791dd20336d3e6ae357cf03 (patch)
tree814e2c86a889986d94c2090ad38767cc2bd9c27f /Src/Zle
parent154b57fdb6a9769858de3e9c0b0c0a6e08cea001 (diff)
downloadzsh-f6f8152f4bd5f9774791dd20336d3e6ae357cf03.tar.gz
zsh-f6f8152f4bd5f9774791dd20336d3e6ae357cf03.tar.xz
zsh-f6f8152f4bd5f9774791dd20336d3e6ae357cf03.zip
24542: fix RC_QUOTES completion if opening quote not at start of string
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_tricky.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 09e4ae8e1..2266b56d7 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1230,11 +1230,16 @@ get_comp_string(void)
 	    /* This is done when the lexer reached the word the cursor is on. */
 	    tt = tokstr ? dupstring(tokstr) : NULL;
 
-            if (isset(RCQUOTES) && *tt == Snull) {
-                char *p, *e = tt + zlemetacs - wb;
-                for (p = tt; *p && p < e; p++)
-                    if (*p == '\'')
-                        qsub++;
+            if (isset(RCQUOTES)) {
+		char *tt1, *e = tt + zlemetacs - wb;
+		for (tt1 = tt; *tt1; tt1++) {
+		    if (*tt1 == Snull) {
+			char *p;
+			for (p = tt1; *p && p < e; p++)
+			    if (*p == '\'')
+				qsub++;
+		    }
+		}
             }
 	    /* If we added a `x', remove it. */
 	    if (addedx && tt)