10-escaping.patch 658 B

123456789101112131415161718192021222324
  1. # Description: Correct escaping of characters
  2. # Author: Luca Bedogni <me@lucabedogni.it>
  3. Index: gmrun-0.9.2/src/gtkcompletionline.cc
  4. ===================================================================
  5. --- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:30:02.239774762 +0800
  6. +++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:30:24.983767847 +0800
  7. @@ -226,12 +226,9 @@
  8. const char* i = str.c_str();
  9. while (*i) {
  10. char c = *i++;
  11. - switch (c) {
  12. - case ' ':
  13. - res += '\\';
  14. - default:
  15. - res += c;
  16. - }
  17. + if (c == ' ' || c == '(' || c == ')' || c =='\'')
  18. + res += '\\';
  19. + res += c;
  20. }
  21. return res;
  22. }