Return 1 if name matches not 0, also fix some spaces.

pull/865/merge
nicm 2017-06-07 15:27:46 +00:00
parent 405cc337f3
commit 356fab7bcb
4 changed files with 5 additions and 5 deletions

View File

@ -595,7 +595,7 @@ mode_tree_search_for(struct mode_tree_data *mtd)
continue;
}
if (mtd->searchcb(mtd->modedata, mti->itemdata, mtd->ss))
return (mti);
return (mti);
}
return (NULL);
}

2
proc.c
View File

@ -47,7 +47,7 @@ struct tmuxpeer {
#define PEER_BAD 0x1
void (*dispatchcb)(struct imsg *, void *);
void *arg;
void *arg;
};
static int peer_check_version(struct tmuxpeer *, struct imsg *);

4
tmux.h
View File

@ -617,7 +617,7 @@ struct job {
job_free_cb freecb;
void *data;
LIST_ENTRY(job) entry;
LIST_ENTRY(job) entry;
};
LIST_HEAD(joblist, job);
@ -676,7 +676,7 @@ struct screen_write_ctx {
struct screen_write_collect_item *item;
struct screen_write_collect_line *list;
u_int scrolled;
u_int bg;
u_int bg;
u_int cells;
u_int written;

View File

@ -238,7 +238,7 @@ window_buffer_search(__unused void *modedata, void *itemdata, const char *ss)
if ((pb = paste_get_name(item->name)) == NULL)
return (0);
if (strstr(item->name, ss) != NULL)
return (0);
return (1);
bufdata = paste_buffer_data(pb, &bufsize);
return (memmem(bufdata, bufsize, ss, strlen(ss)) != NULL);
}