From d95e3269bf7272e8eafe88838e76328719525fe8 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 28 Aug 1998 01:06:54 +0000 Subject: [PATCH] [patch-0.94.4i.tlr.display_filename.1] Introduce a new function "display-filename" which displays the currently selected file's name on the message line. --- OPS | 1 + browser.c | 5 +++++ functions.h | 1 + 3 files changed, 7 insertions(+) diff --git a/OPS b/OPS index d1ca0fb5a..71164634b 100644 --- a/OPS +++ b/OPS @@ -5,6 +5,7 @@ OP_BOTTOM_PAGE "move to the bottom of the page" OP_BOUNCE_MESSAGE "remail a message to another user" OP_BROWSER_NEW_FILE "select a new file in this directory" OP_BROWSER_VIEW_FILE "view file" +OP_BROWSER_TELL "display the currently selected file's name" OP_CHANGE_DIRECTORY "change directories" OP_CHECK_NEW "check mailboxes for new mail" OP_COMPOSE_ATTACH_FILE "attach a file(s) to this message" diff --git a/browser.c b/browser.c index d1d67d3dd..01854efe2 100644 --- a/browser.c +++ b/browser.c @@ -631,6 +631,11 @@ void mutt_select_file (char *f, size_t flen, int buffy) mutt_menuDestroy (&menu); return; + case OP_BROWSER_TELL: + if(state.entrylen) + mutt_message(state.entry[menu->current].name); + break; + case OP_CHANGE_DIRECTORY: strfcpy (buf, LastDir, sizeof (buf)); diff --git a/functions.h b/functions.h index 384c5fd15..01e5a431a 100644 --- a/functions.h +++ b/functions.h @@ -359,6 +359,7 @@ struct binding_t OpPost[] = { /* The file browser */ struct binding_t OpBrowser[] = { { "change-dir", OP_CHANGE_DIRECTORY, "c" }, + { "display-filename", OP_BROWSER_TELL, "@" }, { "enter-mask", OP_ENTER_MASK, "m" }, { "sort", OP_SORT, "o" }, { "sort-reverse", OP_SORT_REVERSE, "O" }, -- 2.40.0