Skip to content

Commit

Permalink
Fix status line when toggling general options
Browse files Browse the repository at this point in the history
The regression was introduced by #944 in 80b40c2.

Fixes #1163
  • Loading branch information
koutcher committed Nov 20, 2021
1 parent 15aab28 commit 69dc7be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ prompt_toggle_option(struct view *view, const char *argv[], const char *prefix,
/* Define a partial version of success() to format the option name as a suffix to the view name,
* thereby reducing the arguments needed by success() to only the option value and its format string.
*/
#define Success(opt_fmt, opt_val) success(":set %s-view-%s = " opt_fmt, view->name, name, opt_val)
#define Success(opt_fmt, opt_val) *prefix \
? success(":set %s-view-%s = " opt_fmt, view->name, name, opt_val) \
: success(":set %s = " opt_fmt, name, opt_val)

char name[SIZEOF_STR];

Expand Down

0 comments on commit 69dc7be

Please sign in to comment.