dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit c1a29a5240eaa36dbc7aa2a37a117ebb602f4546
parent 61bd87f3ec1d6c0945e226ffa95314e7181aae06
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 23 Oct 2014 15:52:42 +0200

Also consider $PAGER when entering copy mode

Diffstat:
dvtm.c | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -840,14 +840,15 @@ copymode(const char *args[]) { return; char *ed = getenv("DVTM_EDITOR"); - const char **argv = NULL; - if (!ed && !(ed = getenv("EDITOR"))) { + const char **argv; + if (ed || (ed = getenv("EDITOR"))) { + argv = (const char*[]){ ed, "-", NULL }; + } else if ((ed = getenv("PAGER"))) { + argv = (const char*[]){ ed, NULL }; + } else { ed = editor; argv = editor_args; } - if (!argv) - argv = (const char*[]){ ed, "-", NULL }; - const char *cwd = NULL; const char *env[] = { "DVTM", VERSION, NULL }; int *to = &sel->editor_fds[0], *from = &sel->editor_fds[1];