summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorOmar Polo <op@cvs.openbsd.org>2024-06-04 06:51:16 +0000
committerOmar Polo <op@cvs.openbsd.org>2024-06-04 06:51:16 +0000
commit7ac4cf800ad5a70579b1d9c21e28bf2fe459c3b5 (patch)
tree4776ab2735b4a56bf406780a002d69383621ddaf /usr.bin/mg
parent20838781e9d278d36859ece0569d0647e7d8163f (diff)
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.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/dired.c4
1 files 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)