From 799cdfffda658ff0a6fc18289ae55ab2f4ace217 Mon Sep 17 00:00:00 2001 From: speedie Date: Mon, 23 Jan 2023 17:27:53 +0100 Subject: [PATCH] some cleanup --- spmenu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spmenu.c b/spmenu.c index ecd2dbd..2f192dc 100644 --- a/spmenu.c +++ b/spmenu.c @@ -72,6 +72,8 @@ enum { SchemeLArrow, SchemeBorder, SchemeLast }; /* color schemes */ +static char text[BUFSIZ] = ""; + struct item { char *text; struct item *left, *right; @@ -93,7 +95,6 @@ typedef struct { } Key; static char numbers[NUMBERSBUFSIZE] = ""; -static char text[BUFSIZ] = ""; static char *embed; static int numlockmask = 0; static int bh, mw, mh; @@ -841,10 +842,11 @@ paste(const Arg *arg) { int clipboard; - if (arg->i == 1) + if (arg->i == 1) { clipboard = XA_PRIMARY; - else + } else { clipboard = clip; + } XConvertSelection(dpy, clipboard, utf8, utf8, win, CurrentTime); return; @@ -984,10 +986,7 @@ moveend(const Arg *arg) void navhistory(const Arg *arg) { - char buf[64]; - navighistory(arg->i); - buf[0] = 0; drawmenu(); }