mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config: remove support for scrollback-up and scrollback-down
This commit is contained in:
parent
386796cec6
commit
5020366bf5
4 changed files with 3 additions and 51 deletions
|
|
@ -102,6 +102,7 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
|
|||
* Support for loading configuration from `$XDG_CONFIG_HOME/footrc`.
|
||||
* **scrollback** option from `foot.ini`.
|
||||
* **geometry** option from `foot.ini`.
|
||||
* Key binding action **scrollback-up** and **scrollback-down**.
|
||||
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
49
config.c
49
config.c
|
|
@ -55,11 +55,9 @@ static const uint32_t default_bright[] = {
|
|||
|
||||
static const char *const binding_action_map[] = {
|
||||
[BIND_ACTION_NONE] = NULL,
|
||||
[BIND_ACTION_SCROLLBACK_UP] = "scrollback-up",
|
||||
[BIND_ACTION_SCROLLBACK_UP_PAGE] = "scrollback-up-page",
|
||||
[BIND_ACTION_SCROLLBACK_UP_HALF_PAGE] = "scrollback-up-half-page",
|
||||
[BIND_ACTION_SCROLLBACK_UP_LINE] = "scrollback-up-line",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN] = "scrollback-down",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN_PAGE] = "scrollback-down-page",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN_HALF_PAGE] = "scrollback-down-half-page",
|
||||
[BIND_ACTION_SCROLLBACK_DOWN_LINE] = "scrollback-down-line",
|
||||
|
|
@ -1051,43 +1049,6 @@ argv_compare(char *const *argv1, char *const *argv2)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
maybe_deprecated_key_binding(struct config *conf,
|
||||
const char *section,
|
||||
enum bind_action_normal action,
|
||||
const char *path, unsigned lineno)
|
||||
{
|
||||
enum bind_action_normal replacement = BIND_ACTION_NONE;
|
||||
|
||||
switch (action) {
|
||||
case BIND_ACTION_SCROLLBACK_UP:
|
||||
replacement = BIND_ACTION_SCROLLBACK_UP_PAGE;
|
||||
break;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_DOWN:
|
||||
replacement = BIND_ACTION_SCROLLBACK_DOWN_PAGE;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_WARN("deprecated: %s:%d: [%s]: key binding %s, use %s instead",
|
||||
path, lineno, section,
|
||||
binding_action_map[action], binding_action_map[replacement]);
|
||||
|
||||
const char fmt[] = "%s:%d: [%s]: \033[1m%s\033[21m, use \033[1m%s\033[21m instead";
|
||||
char *text = xasprintf(
|
||||
fmt, path, lineno, section,
|
||||
binding_action_map[action], binding_action_map[replacement]);
|
||||
|
||||
struct user_notification deprecation = {
|
||||
.kind = USER_NOTIFICATION_DEPRECATED,
|
||||
.text = text,
|
||||
};
|
||||
tll_push_back(conf->notifications, deprecation);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parses a key binding value on the form
|
||||
* "[cmd-to-exec arg1 arg2] Mods+Key"
|
||||
|
|
@ -1171,9 +1132,6 @@ parse_section_key_bindings(
|
|||
if (strcmp(key, binding_action_map[action]) != 0)
|
||||
continue;
|
||||
|
||||
maybe_deprecated_key_binding(
|
||||
conf, "key-bindings", action, path, lineno);
|
||||
|
||||
/* Unset binding */
|
||||
if (strcasecmp(value, "none") == 0) {
|
||||
tll_foreach(conf->bindings.key, it) {
|
||||
|
|
@ -1465,9 +1423,6 @@ parse_section_mouse_bindings(
|
|||
if (strcmp(key, binding_action_map[action]) != 0)
|
||||
continue;
|
||||
|
||||
maybe_deprecated_key_binding(
|
||||
conf, "mouse-bindings", action, path, lineno);
|
||||
|
||||
/* Unset binding */
|
||||
if (strcasecmp(value, "none") == 0) {
|
||||
tll_foreach(conf->bindings.mouse, it) {
|
||||
|
|
@ -1859,8 +1814,8 @@ add_default_key_bindings(struct config *conf)
|
|||
const struct config_key_modifiers ctrl = {.ctrl = true};
|
||||
const struct config_key_modifiers ctrl_shift = {.ctrl = true, .shift = true};
|
||||
|
||||
add_binding(BIND_ACTION_SCROLLBACK_UP, shift, XKB_KEY_Page_Up);
|
||||
add_binding(BIND_ACTION_SCROLLBACK_DOWN, shift, XKB_KEY_Page_Down);
|
||||
add_binding(BIND_ACTION_SCROLLBACK_UP_PAGE, shift, XKB_KEY_Page_Up);
|
||||
add_binding(BIND_ACTION_SCROLLBACK_DOWN_PAGE, shift, XKB_KEY_Page_Down);
|
||||
add_binding(BIND_ACTION_CLIPBOARD_COPY, ctrl_shift, XKB_KEY_C);
|
||||
add_binding(BIND_ACTION_CLIPBOARD_PASTE, ctrl_shift, XKB_KEY_V);
|
||||
add_binding(BIND_ACTION_PRIMARY_PASTE, shift, XKB_KEY_Insert);
|
||||
|
|
|
|||
2
input.c
2
input.c
|
|
@ -87,7 +87,6 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
case BIND_ACTION_NONE:
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_UP:
|
||||
case BIND_ACTION_SCROLLBACK_UP_PAGE:
|
||||
cmd_scrollback_up(term, term->rows);
|
||||
return true;
|
||||
|
|
@ -100,7 +99,6 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
cmd_scrollback_up(term, 1);
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_SCROLLBACK_DOWN:
|
||||
case BIND_ACTION_SCROLLBACK_DOWN_PAGE:
|
||||
cmd_scrollback_down(term, term->rows);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -26,11 +26,9 @@ typedef tll(struct key_binding) key_binding_list_t;
|
|||
|
||||
enum bind_action_normal {
|
||||
BIND_ACTION_NONE,
|
||||
BIND_ACTION_SCROLLBACK_UP, /* Deprecated, alias for UP_PAGE */
|
||||
BIND_ACTION_SCROLLBACK_UP_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_UP_HALF_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_UP_LINE,
|
||||
BIND_ACTION_SCROLLBACK_DOWN, /* Deprecated, alias for DOWN_PAGE */
|
||||
BIND_ACTION_SCROLLBACK_DOWN_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_DOWN_HALF_PAGE,
|
||||
BIND_ACTION_SCROLLBACK_DOWN_LINE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue