diff options
author | Richard Russon <rich@flatcap.org> | 2023-10-03 15:10:52 +0100 |
---|---|---|
committer | Richard Russon <rich@flatcap.org> | 2023-10-03 15:15:33 +0100 |
commit | 9b56ab7a5a22e75e14a1e685b0289d7ed28d701c (patch) | |
tree | eab6a626e2647ec34f9b9e56435c11441c3aeabf | |
parent | bb36b8971159e13a1b5ae9c79abc8d280732803b (diff) |
history: rename categories for clarity
- HC_CMD -> HC_EXT_COMMAND
- HC_COMMAND -> HC_NEO_COMMAND
- HC_MBOX -> HC_MAILBOX
-rw-r--r-- | attach/recvattach.c | 2 | ||||
-rw-r--r-- | browser/complete.c | 2 | ||||
-rw-r--r-- | editor/wdata.h | 2 | ||||
-rw-r--r-- | external.c | 11 | ||||
-rw-r--r-- | gui/curs_lib.c | 2 | ||||
-rw-r--r-- | history/history.c | 2 | ||||
-rw-r--r-- | history/lib.h | 14 |
7 files changed, 18 insertions, 17 deletions
diff --git a/attach/recvattach.c b/attach/recvattach.c index 94b6b86e8..773275771 100644 --- a/attach/recvattach.c +++ b/attach/recvattach.c @@ -732,7 +732,7 @@ void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, state.flags = STATE_CHARCONV; if (mw_get_field((filter ? _("Filter through: ") : _("Pipe to: ")), buf, - MUTT_COMP_NO_FLAGS, HC_CMD, &CompleteFileOps, NULL) != 0) + MUTT_COMP_NO_FLAGS, HC_EXT_COMMAND, &CompleteFileOps, NULL) != 0) { goto cleanup; } diff --git a/browser/complete.c b/browser/complete.c index 212aa29de..fe7a50120 100644 --- a/browser/complete.c +++ b/browser/complete.c @@ -74,7 +74,7 @@ int complete_file_mbox(struct EnterWindowData *wdata, int op) wdata->state->lastchar * sizeof(wchar_t)) == 0))) { SelectFileFlags flags = MUTT_SEL_NO_FLAGS; - if (wdata->hclass == HC_MBOX) + if (wdata->hclass == HC_MAILBOX) flags |= MUTT_SEL_FOLDER; if (cdata->multiple) flags |= MUTT_SEL_MULTI; diff --git a/editor/wdata.h b/editor/wdata.h index 73874706e..3edae6572 100644 --- a/editor/wdata.h +++ b/editor/wdata.h @@ -48,7 +48,7 @@ struct EnterWindowData struct Buffer *buffer; ///< struct Buffer for the result CompletionFlags flags; ///< Flags, see #CompletionFlags struct EnterState *state; ///< Current state of text entry - enum HistoryClass hclass; ///< History to use, e.g. #HC_COMMAND + enum HistoryClass hclass; ///< History to use, e.g. #HC_NEO_COMMAND const struct CompleteOps *comp_api; ///< Auto-Completion API void *cdata; ///< Auto-Completion private data diff --git a/external.c b/external.c index ebb84cff1..0a58eb07d 100644 --- a/external.c +++ b/external.c @@ -413,8 +413,8 @@ void mutt_pipe_message(struct Mailbox *m, struct EmailArray *ea) struct Buffer *buf = buf_pool_get(); - if (mw_get_field(_("Pipe to command: "), buf, MUTT_COMP_NO_FLAGS, HC_CMD, - &CompleteFileOps, NULL) != 0) + if (mw_get_field(_("Pipe to command: "), buf, MUTT_COMP_NO_FLAGS, + HC_EXT_COMMAND, &CompleteFileOps, NULL) != 0) { goto cleanup; } @@ -583,8 +583,8 @@ bool mutt_shell_escape(void) bool rc = false; struct Buffer *buf = buf_pool_get(); - if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_NO_FLAGS, HC_CMD, - &CompleteFileOps, NULL) != 0) + if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_NO_FLAGS, + HC_EXT_COMMAND, &CompleteFileOps, NULL) != 0) { goto done; } @@ -627,7 +627,8 @@ void mutt_enter_command(void) window_redraw(NULL); /* if enter is pressed after : with no command, just return */ - if ((mw_get_field(":", buf, MUTT_COMP_NO_FLAGS, HC_COMMAND, &CompleteCommandOps, NULL) != 0) || + if ((mw_get_field(":", buf, MUTT_COMP_NO_FLAGS, HC_NEO_COMMAND, + &CompleteCommandOps, NULL) != 0) || buf_is_empty(buf)) { goto done; diff --git a/gui/curs_lib.c b/gui/curs_lib.c index e3600890e..9cecf2ce3 100644 --- a/gui/curs_lib.c +++ b/gui/curs_lib.c @@ -308,7 +308,7 @@ int mw_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox, buf_alloc(fname, 1024); struct FileCompletionData cdata = { multiple, m, files, numfiles }; - enum HistoryClass hclass = mailbox ? HC_MBOX : HC_FILE; + enum HistoryClass hclass = mailbox ? HC_MAILBOX : HC_FILE; if (mw_get_field(pc, fname, MUTT_COMP_CLEAR, hclass, &CompleteMailboxOps, &cdata) != 0) { buf_reset(fname); diff --git a/history/history.c b/history/history.c index b4a7b9e70..d414d13ed 100644 --- a/history/history.c +++ b/history/history.c @@ -78,7 +78,7 @@ #include "core/lib.h" #include "lib.h" -#define HC_FIRST HC_CMD +#define HC_FIRST HC_EXT_COMMAND /** * struct History - Saved list of user-entered commands/searches diff --git a/history/lib.h b/history/lib.h index bcefcaff2..978e7bc7d 100644 --- a/history/lib.h +++ b/history/lib.h @@ -46,13 +46,13 @@ */ enum HistoryClass { - HC_CMD, ///< External commands - HC_ALIAS, ///< Aliases - HC_COMMAND, ///< NeoMutt commands - HC_FILE, ///< Files - HC_PATTERN, ///< Patterns - HC_OTHER, ///< Miscellaneous strings - HC_MBOX, ///< Mailboxes + HC_EXT_COMMAND, ///< External commands + HC_ALIAS, ///< Aliases + HC_NEO_COMMAND, ///< NeoMutt commands + HC_FILE, ///< Files + HC_PATTERN, ///< Patterns + HC_OTHER, ///< Miscellaneous strings + HC_MAILBOX, ///< Mailboxes HC_MAX, }; |