aboutsummaryrefslogtreecommitdiffhomepage
path: root/kill.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-03-29 17:57:29 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-03-29 17:57:44 -0700
commitf7082ee034fbeb677611cefddefac1028ff96ecf (patch)
treeeba936dacdc186713694fc37ccc0231b4692ebe8 /kill.cpp
parent3ac9621f873bf73d9f70471a92c6e188c8b3c97c (diff)
Make xsel work as designed
Diffstat (limited to 'kill.cpp')
-rw-r--r--kill.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kill.cpp b/kill.cpp
index 2f6790d8..9816e459 100644
--- a/kill.cpp
+++ b/kill.cpp
@@ -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");
}
}