dvtm

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

commit 1d800c7692bfcfa5cd06b3b1b8554052b669f7b0
parent c1a29a5240eaa36dbc7aa2a37a117ebb602f4546
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 23 Oct 2014 21:06:57 +0200

Cosmetic changes

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

diff --git a/dvtm.c b/dvtm.c @@ -107,8 +107,6 @@ typedef struct { typedef struct { void (*cmd)(const char *args[]); - /* needed to avoid an error about initialization - * of nested flexible array members */ const char *args[MAX_ARGS]; } Action; @@ -841,6 +839,10 @@ copymode(const char *args[]) { char *ed = getenv("DVTM_EDITOR"); const char **argv; + const char *cwd = NULL; + const char *env[] = { "DVTM", VERSION, NULL }; + int *to = &sel->editor_fds[0], *from = &sel->editor_fds[1]; + if (ed || (ed = getenv("EDITOR"))) { argv = (const char*[]){ ed, "-", NULL }; } else if ((ed = getenv("PAGER"))) { @@ -849,9 +851,6 @@ copymode(const char *args[]) { ed = editor; argv = editor_args; } - const char *cwd = NULL; - const char *env[] = { "DVTM", VERSION, NULL }; - int *to = &sel->editor_fds[0], *from = &sel->editor_fds[1]; if (vt_forkpty(sel->editor, ed, argv, cwd, env, to, from) < 0) { vt_destroy(sel->editor);