diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-03-29 17:57:29 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-03-29 17:57:44 -0700 |
commit | f7082ee034fbeb677611cefddefac1028ff96ecf (patch) | |
tree | eba936dacdc186713694fc37ccc0231b4692ebe8 /kill.cpp | |
parent | 3ac9621f873bf73d9f70471a92c6e188c8b3c97c (diff) |
Make xsel work as designed
Diffstat (limited to 'kill.cpp')
-rw-r--r-- | kill.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -57,7 +57,7 @@ static wchar_t *cut_buffer=0; */ static int has_xsel() { - static int res=-1; + static signed char res=-1; if (res < 0) { res = !! path_get_path(L"xsel", NULL); @@ -103,10 +103,10 @@ void kill_add(const wcstring &str) const env_var_t disp_wstr = env_get_string(L"DISPLAY"); if (!disp_wstr.missing()) { - escaped_str = escape(str.c_str(), 1); - cmd.assign(L"echo "); + escaped_str = escape_string(str, ESCAPE_ALL); + cmd.assign(L"echo -n "); cmd.append(escaped_str); - cmd.append(L"|xsel -b"); + cmd.append(L" | xsel -i -b"); } } |