~kaction/dvtm

573baff17a39f8593d5c793ec9583a07032194e3 — Gennadiy Volkov 3 years ago d810b04
copymode: Set cwd so paths make sense in editor
1 files changed, 2 insertions(+), 1 deletions(-)

M dvtm.c
M dvtm.c => dvtm.c +2 -1
@@ 1117,7 1117,8 @@ copymode(const char *args[]) {
	snprintf(argline, sizeof(argline), "+%d", line);
	argv[1] = argline;

	if (vt_forkpty(sel->editor, args[0], argv, NULL, NULL, to, from) < 0) {
	char *cwd = getcwd_by_pid(sel);
	if (vt_forkpty(sel->editor, args[0], argv, cwd, NULL, to, from) < 0) {
		vt_destroy(sel->editor);
		sel->editor = NULL;
		return;