From 3243678674023aa87a8722afb9898cce148f2129 Mon Sep 17 00:00:00 2001 From: Alexandre De Dommelin Date: Sun, 12 Mar 2017 15:49:46 -0700 Subject: escaping # Description: Correct escaping of characters # Author: Luca Bedogni Gbp-Pq: Name 10-escaping.patch --- src/gtkcompletionline.cc | 9 +++------ 1 file 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; } -- cgit v1.2.3