Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search --pid without regexp_argument #267

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmd_search.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int cmd_search(context_t *context) {
}

if (context->argc > 0) {
if (!search_title && !search_name && !search_class && !search_classname) {
if (!search.pid && !search_title && !search_name && !search_class && !search_classname) {
fprintf(stderr, "Defaulting to search window name, class, and classname\n");
search.searchmask |= (SEARCH_NAME | SEARCH_CLASS | SEARCH_CLASSNAME);
search_name = 1;
Expand All @@ -172,7 +172,9 @@ int cmd_search(context_t *context) {
search.searchmask |= SEARCH_CLASSNAME;
search.winclassname = context->argv[0];
}
consume_args(context, 1);
if (search_title || search_name || search_class || search_classname) {
consume_args(context, 1);
}
}

do {
Expand Down