ref: 1785a4f4a71ae682429a2e68f66fe4bcfb7c1035
parent: dbaf91baa27c6df0fc7ad200def611300cff4ffd
author: phil9 <telephil9@gmail.com>
date: Mon Dec 26 11:57:08 EST 2022
implement command to change other panel to current directory.
--- a/dirviewcmd.c
+++ b/dirviewcmd.c
@@ -147,6 +147,18 @@
}
static void
+cmdcdmatch(void)
+{
+ Dirpanel *o;
+ char *path;
+
+ path = dirviewcurrentpanel(dview)->model->path;
+ o = dirviewotherpanel(dview);
+ dirpanelresetcursor(o);
+ dirmodelcd(o->model, path);
+}
+
+static void
cmdselectgroup(void)
{
Dirpanel *p;
@@ -347,6 +359,7 @@
{ '\t', cmdswitchfocus },
{ 'r', cmdreload },
{ 'c', cmdcd },
+ { '=', cmdcdmatch },
{ '\n', cmdview },
{ '+', cmdselectgroup },
{ '-', cmdunselectgroup },