summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gtkcompletionline.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gtkcompletionline.cc b/src/gtkcompletionline.cc
index 374deee..7aba856 100644
--- a/src/gtkcompletionline.cc
+++ b/src/gtkcompletionline.cc
@@ -226,12 +226,9 @@ string quote_string(const string& str)
const char* i = str.c_str();
while (*i) {
char c = *i++;
- switch (c) {
- case ' ':
- res += '\\';
- default:
- res += c;
- }
+ if (c == ' ' || c == '(' || c == ')' || c =='\'')
+ res += '\\';
+ res += c;
}
return res;
}