From d55edc5830017ccc45d1f7e8da92d7ff2cb31863 Mon Sep 17 00:00:00 2001 From: Richard Ulmer <42150522+codesoap@users.noreply.github.com> Date: Mon, 27 Dec 2021 22:49:56 +0100 Subject: [PATCH 1/3] Clarify that lesskey cannot add new functionality (#229) --- lesskey.nro.VER | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lesskey.nro.VER b/lesskey.nro.VER index 8c22a418..f614eabf 100644 --- a/lesskey.nro.VER +++ b/lesskey.nro.VER @@ -1,7 +1,7 @@ '\" t .TH LESSKEY 1 "Version @@VERSION@@: @@DATE@@" .SH NAME -lesskey \- specify key bindings for less +lesskey \- customize key bindings for less .SH "SYNOPSIS (deprecated)" .B "lesskey [\-o output] [\-\-] [input]" .br @@ -42,9 +42,9 @@ The input file consists of one or more Each section starts with a line that identifies the type of section. Possible sections are: .IP #command -Defines new command keys. +Customizes command key bindings. .IP #line-edit -Defines new line-editing keys. +Customizes line-editing key bindings. .IP #env Defines environment variables. .PP From 3a90a3b34d3d1420917ca9902f51e9f7986dacb1 Mon Sep 17 00:00:00 2001 From: Mark Nudelman Date: Tue, 28 Dec 2021 16:24:18 -0800 Subject: [PATCH 2/3] Don't do TAB filename expansion in contexts where it doesn't make sense, like long option names, numbers, etc. --- cmdbuf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmdbuf.c b/cmdbuf.c index 1eb97c71..b1701ba5 100644 --- a/cmdbuf.c +++ b/cmdbuf.c @@ -861,9 +861,10 @@ cmd_edit(c) flags |= ECF_NOHISTORY; #endif #if TAB_COMPLETE_FILENAME - if (curr_mlist == ml_search) + if (curr_mlist == ml_search || curr_mlist == NULL) /* - * In a search command; don't accept file-completion cmds. + * Don't accept file-completion cmds in contexts + * such as search pattern, digits, long option name, etc. */ flags |= ECF_NOCOMPLETE; #endif From 30c1fb48a962b8dee8107eafa4108070e7cbe4fa Mon Sep 17 00:00:00 2001 From: Mark Nudelman Date: Tue, 28 Dec 2021 16:31:03 -0800 Subject: [PATCH 3/3] This seems risky, but I can't think of a scenario where there is a problem. In all cases the screen appearance is either the same or better after this change. ...{d} --- forwback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forwback.c b/forwback.c index 6d809a63..b04ea227 100644 --- a/forwback.c +++ b/forwback.c @@ -399,7 +399,7 @@ forw(n, pos, force, only_last, nblank) else { overlay_header(); - lower_left(); + /* lower_left(); {{ considered harmful? }} */ } first_time = 0; (void) currline(BOTTOM);