~kaction/dvtm

938bf6500e9e6c5294200ec26e1b2840637a1757 — Dmitry Bogatov 3 months ago 0a7d6a4
Revert "Ensure compatibility with v0.15 config"

According to Marc Tanner, this is unneeded complexity. I tend to agree,
although people with their own config.h files will have to adjust.

This reverts commit d55678de99e09ff50f6839122544a262743415af.
2 files changed, 1 insertions(+), 20 deletions(-)

M config.def.h
M dvtm.c
M config.def.h => config.def.h +0 -8
@@ 207,11 207,3 @@ static Action actions[] = {
static char const * const keytable[] = {
	/* add your custom key escape sequences */
};

/* Print dvtm's control sequence as it is typed in status bar, similar
 * to :showcmd in vim.
 *
 * Change 0 to 1 to enable.
 */
#define FEATURE_PRINT_KEYS
static const int config_print_keys = 0;

M dvtm.c => dvtm.c +1 -12
@@ 46,17 46,6 @@ int ESCDELAY;
# define set_escdelay(d) (ESCDELAY = (d))
#endif

/*
 * This feature was introduced in 0.15.1, and this code makes sure that
 * it config file from 0.15 will continue compile as work as before.
 */

#ifndef FEATURE_PRINT_KEYS
static const int compat_print_keys = 0;
#else
static const int compat_print_keys = config_print_keys;
#endif

typedef struct {
	float mfact;
	unsigned int nmaster;


@@ 366,7 355,7 @@ drawbar(void) {
	addstr(layout->symbol);
	attrset(TAG_NORMAL);

	if (compat_print_keys && keys) {
	if (keys) {
		unsigned int keycount = 0;
		while (keycount < MAX_KEYS && keys[keycount]) {
			if (keys[keycount] < ' ')