Skip to content

Commit

Permalink
allow a custom formatting to not have a newline in the end
Browse files Browse the repository at this point in the history
  • Loading branch information
SeppeSoete authored and emersion committed Aug 25, 2020
1 parent 795f526 commit 1cefa2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static void print_formatted_result(const struct slurp_box *result,
}
printf("%c", c);
}
printf("\n");
fflush(stdout);
}

static void add_choice_box(struct slurp_state *state,
Expand All @@ -712,7 +712,7 @@ int main(int argc, char *argv[]) {
};

int opt;
char *format = "%x,%y %wx%h";
char *format = "%x,%y %wx%h\n";
while ((opt = getopt(argc, argv, "hdb:c:s:w:pf:")) != -1) {
switch (opt) {
case 'h':
Expand Down
2 changes: 1 addition & 1 deletion slurp.1.scd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Interpreted sequences are:

%l Label included with region from stdin

The default format is "%x,%y %wx%h".
The default format is "%x,%y %wx%h\\n".

# AUTHORS

Expand Down

0 comments on commit 1cefa2b

Please sign in to comment.