From a10777de6dc366db16caee967ae7f71ae7bb0160 Mon Sep 17 00:00:00 2001 From: op Date: Tue, 4 Jun 2024 06:51:15 +0000 Subject: [PATCH] now that we have dired-up-directory, use it in dired-jump too it's handy to be able to do C-x C-j (dired-jump) repeatedly to navigate upwards starting from a buffer, and follows GNU Emacs behaviour too. --- usr.bin/mg/dired.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c index 128ed0a31e0..4129343f06a 100644 --- a/usr.bin/mg/dired.c +++ b/usr.bin/mg/dired.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dired.c,v 1.103 2024/06/04 06:48:34 op Exp $ */ +/* $OpenBSD: dired.c,v 1.104 2024/06/04 06:51:15 op Exp $ */ /* This file is in the public domain. */ @@ -1125,7 +1125,7 @@ dired_jump(int f, int n) for (i = 0; i <= curbp->b_nmodes; i++) { modename = curbp->b_modes[i]->p_name; if (strncmp(modename, "dired", 5) == 0) - return (dobeep_msg("In dired mode already")); + return (d_updirectory(f, n)); } if (getbufcwd(dname, sizeof(dname)) != TRUE) -- 2.20.1