NeoMutt  2023-05-17-56-ga67199
Teaching an old dog new tricks
DOXYGEN
functions.c File Reference

Enter functions. More...

#include "config.h"
#include <string.h>
#include <wchar.h>
#include "mutt/lib.h"
#include "config/helpers.h"
#include "core/lib.h"
#include "alias/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "functions.h"
#include "browser/lib.h"
#include "complete/lib.h"
#include "history/lib.h"
#include "pattern/lib.h"
#include "enter.h"
#include "keymap.h"
#include "mutt_history.h"
#include "mutt_mailbox.h"
#include "muttlib.h"
#include "opcodes.h"
#include "state.h"
#include "wdata.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

static void replace_part (struct EnterState *es, size_t from, const char *buf)
 Search and replace on a buffer. More...
 
static int complete_file_simple (struct EnterWindowData *wdata)
 Complete a filename. More...
 
static int complete_alias_complete (struct EnterWindowData *wdata)
 Complete an Alias. More...
 
static int complete_label (struct EnterWindowData *wdata)
 Complete a label. More...
 
static int complete_pattern (struct EnterWindowData *wdata)
 Complete a NeoMutt Pattern. More...
 
static int complete_alias_query (struct EnterWindowData *wdata)
 Complete an Alias Query. More...
 
static int complete_command (struct EnterWindowData *wdata)
 Complete a NeoMutt Command. More...
 
static int complete_file_mbox (struct EnterWindowData *wdata)
 Complete a Mailbox. More...
 
static int complete_nm_query (struct EnterWindowData *wdata)
 Complete a Notmuch Query. More...
 
static int complete_nm_tag (struct EnterWindowData *wdata)
 Complete a Notmuch Tag. More...
 
static int op_editor_complete (struct EnterWindowData *wdata, int op)
 Complete filename or alias - Implements enter_function_t -. More...
 
static int op_editor_history_down (struct EnterWindowData *wdata, int op)
 Scroll down through the history list - Implements enter_function_t -. More...
 
static int op_editor_history_search (struct EnterWindowData *wdata, int op)
 Search through the history list - Implements enter_function_t -. More...
 
static int op_editor_history_up (struct EnterWindowData *wdata, int op)
 Scroll up through the history list - Implements enter_function_t -. More...
 
static int op_editor_mailbox_cycle (struct EnterWindowData *wdata, int op)
 Cycle among incoming mailboxes - Implements enter_function_t -. More...
 
static int op_editor_backspace (struct EnterWindowData *wdata, int op)
 Delete the char in front of the cursor - Implements enter_function_t -. More...
 
static int op_editor_backward_char (struct EnterWindowData *wdata, int op)
 Move the cursor one character to the left - Implements enter_function_t -. More...
 
static int op_editor_backward_word (struct EnterWindowData *wdata, int op)
 Move the cursor to the beginning of the word - Implements enter_function_t -. More...
 
static int op_editor_bol (struct EnterWindowData *wdata, int op)
 Jump to the beginning of the line - Implements enter_function_t -. More...
 
static int op_editor_capitalize_word (struct EnterWindowData *wdata, int op)
 Capitalize the word - Implements enter_function_t - This function handles: More...
 
static int op_editor_delete_char (struct EnterWindowData *wdata, int op)
 Delete the char under the cursor - Implements enter_function_t -. More...
 
static int op_editor_eol (struct EnterWindowData *wdata, int op)
 Jump to the end of the line - Implements enter_function_t -. More...
 
static int op_editor_forward_char (struct EnterWindowData *wdata, int op)
 Move the cursor one character to the right - Implements enter_function_t -. More...
 
static int op_editor_forward_word (struct EnterWindowData *wdata, int op)
 Move the cursor to the end of the word - Implements enter_function_t -. More...
 
static int op_editor_kill_eol (struct EnterWindowData *wdata, int op)
 Delete chars from cursor to end of line - Implements enter_function_t -. More...
 
static int op_editor_kill_eow (struct EnterWindowData *wdata, int op)
 Delete chars from the cursor to the end of the word - Implements enter_function_t -. More...
 
static int op_editor_kill_line (struct EnterWindowData *wdata, int op)
 Delete all chars on the line - Implements enter_function_t -. More...
 
static int op_editor_kill_whole_line (struct EnterWindowData *wdata, int op)
 Delete all chars on the line - Implements enter_function_t -. More...
 
static int op_editor_kill_word (struct EnterWindowData *wdata, int op)
 Delete the word in front of the cursor - Implements enter_function_t -. More...
 
static int op_editor_quote_char (struct EnterWindowData *wdata, int op)
 Quote the next typed key - Implements enter_function_t -. More...
 
static int op_editor_transpose_chars (struct EnterWindowData *wdata, int op)
 Transpose character under cursor with previous - Implements enter_function_t -. More...
 
int enter_function_dispatcher (struct MuttWindow *win, int op)
 Perform an Enter function - Implements function_dispatcher_t -. More...
 

Variables

static const struct EnterFunction EnterFunctions []
 All the NeoMutt functions that Enter supports. More...
 

Detailed Description

Enter functions.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file functions.c.

Function Documentation

◆ replace_part()

static void replace_part ( struct EnterState es,
size_t  from,
const char *  buf 
)
static

Search and replace on a buffer.

Parameters
esCurrent state of the input buffer
fromStarting point for the replacement
bufReplacement string

Definition at line 58 of file functions.c.

59{
60 /* Save the suffix */
61 size_t savelen = es->lastchar - es->curpos;
62 wchar_t *savebuf = NULL;
63
64 if (savelen)
65 {
66 savebuf = mutt_mem_calloc(savelen, sizeof(wchar_t));
67 memcpy(savebuf, es->wbuf + es->curpos, savelen * sizeof(wchar_t));
68 }
69
70 /* Convert to wide characters */
71 es->curpos = mutt_mb_mbstowcs(&es->wbuf, &es->wbuflen, from, buf);
72
73 if (savelen)
74 {
75 /* Make space for suffix */
76 if (es->curpos + savelen > es->wbuflen)
77 {
78 es->wbuflen = es->curpos + savelen;
79 mutt_mem_realloc(&es->wbuf, es->wbuflen * sizeof(wchar_t));
80 }
81
82 /* Restore suffix */
83 memcpy(es->wbuf + es->curpos, savebuf, savelen * sizeof(wchar_t));
84 FREE(&savebuf);
85 }
86
87 es->lastchar = es->curpos + savelen;
88}
size_t mutt_mb_mbstowcs(wchar_t **pwbuf, size_t *pwbuflen, size_t i, const char *buf)
Convert a string from multibyte to wide characters.
Definition: mbyte.c:294
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Definition: memory.c:114
#define FREE(x)
Definition: memory.h:43
size_t curpos
Position of the cursor.
Definition: state.h:36
size_t wbuflen
Length of buffer.
Definition: state.h:34
wchar_t * wbuf
Buffer for the string being entered.
Definition: state.h:33
size_t lastchar
Position of the last character.
Definition: state.h:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_file_simple()

static int complete_file_simple ( struct EnterWindowData wdata)
static

Complete a filename.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 97 of file functions.c.

98{
99 int rc = FR_SUCCESS;
100 size_t i;
101 for (i = wdata->state->curpos;
102 (i > 0) && !mutt_mb_is_shell_char(wdata->state->wbuf[i - 1]); i--)
103 {
104 }
105 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf + i,
106 wdata->state->curpos - i);
107 if (wdata->tempbuf && (wdata->templen == (wdata->state->lastchar - i)) &&
108 (memcmp(wdata->tempbuf, wdata->state->wbuf + i,
109 (wdata->state->lastchar - i) * sizeof(wchar_t)) == 0))
110 {
111 mutt_select_file(wdata->buf, wdata->buflen, MUTT_SEL_NO_FLAGS, wdata->m, NULL, NULL);
112 if (wdata->buf[0] != '\0')
113 replace_part(wdata->state, i, wdata->buf);
114 return FR_CONTINUE;
115 }
116
117 if (mutt_complete(wdata->cd, wdata->buf, wdata->buflen) == 0)
118 {
119 wdata->templen = wdata->state->lastchar - i;
120 mutt_mem_realloc(&wdata->tempbuf, wdata->templen * sizeof(wchar_t));
121 memcpy(wdata->tempbuf, wdata->state->wbuf + i, wdata->templen * sizeof(wchar_t));
122 }
123 else
124 {
125 rc = FR_ERROR;
126 }
127
128 replace_part(wdata->state, i, wdata->buf);
129 return rc;
130}
#define MUTT_SEL_NO_FLAGS
No flags are set.
Definition: lib.h:55
void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:1443
int mutt_complete(struct CompletionData *cd, char *buf, size_t buflen)
Attempt to complete a partial pathname.
Definition: complete.c:58
@ FR_SUCCESS
Valid function - successfully performed.
Definition: dispatcher.h:39
@ FR_ERROR
Valid function - error occurred.
Definition: dispatcher.h:38
@ FR_CONTINUE
Remain in the Dialog.
Definition: dispatcher.h:34
static void replace_part(struct EnterState *es, size_t from, const char *buf)
Search and replace on a buffer.
Definition: functions.c:58
void mutt_mb_wcstombs(char *dest, size_t dlen, const wchar_t *src, size_t slen)
Convert a string from wide to multibyte characters.
Definition: mbyte.c:237
bool mutt_mb_is_shell_char(wchar_t ch)
Is character not typically part of a pathname.
Definition: mbyte.c:343
size_t buflen
Length of result buffer.
Definition: wdata.h:49
struct CompletionData * cd
Auto-completion state data.
Definition: wdata.h:70
wchar_t * tempbuf
Buffer used by completion.
Definition: wdata.h:63
char * buf
Buffer for the result.
Definition: wdata.h:48
struct EnterState * state
Current state of text entry.
Definition: wdata.h:56
struct Mailbox * m
Mailbox.
Definition: wdata.h:53
size_t templen
Length of complete buffer.
Definition: wdata.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_alias_complete()

static int complete_alias_complete ( struct EnterWindowData wdata)
static

Complete an Alias.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 137 of file functions.c.

138{
139 /* invoke the alias-menu to get more addresses */
140 size_t i;
141 for (i = wdata->state->curpos; (i > 0) && (wdata->state->wbuf[i - 1] != ',') &&
142 (wdata->state->wbuf[i - 1] != ':');
143 i--)
144 {
145 }
146 for (; (i < wdata->state->lastchar) && (wdata->state->wbuf[i] == ' '); i++)
147 ; // do nothing
148
149 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf + i,
150 wdata->state->curpos - i);
151 int rc = alias_complete(wdata->buf, wdata->buflen, NeoMutt->sub);
152 replace_part(wdata->state, i, wdata->buf);
153 if (rc != 1)
154 {
155 return FR_CONTINUE;
156 }
157
158 return FR_SUCCESS;
159}
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Alias completion routine.
Definition: dlg_alias.c:384
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_label()

static int complete_label ( struct EnterWindowData wdata)
static

Complete a label.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 166 of file functions.c.

167{
168 size_t i;
169 for (i = wdata->state->curpos; (i > 0) && (wdata->state->wbuf[i - 1] != ',') &&
170 (wdata->state->wbuf[i - 1] != ':');
171 i--)
172 {
173 }
174 for (; (i < wdata->state->lastchar) && (wdata->state->wbuf[i] == ' '); i++)
175 ; // do nothing
176
177 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf + i,
178 wdata->state->curpos - i);
179 int rc = mutt_label_complete(wdata->cd, wdata->buf, wdata->buflen, wdata->tabs);
180 replace_part(wdata->state, i, wdata->buf);
181 if (rc != 1)
182 return FR_CONTINUE;
183
184 return FR_SUCCESS;
185}
int mutt_label_complete(struct CompletionData *cd, char *buf, size_t buflen, int numtabs)
Complete a label name.
Definition: helpers.c:368
int tabs
Number of times the user has hit tab.
Definition: wdata.h:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_pattern()

static int complete_pattern ( struct EnterWindowData wdata)
static

Complete a NeoMutt Pattern.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 192 of file functions.c.

193{
194 size_t i = wdata->state->curpos;
195 if (i && (wdata->state->wbuf[i - 1] == '~'))
196 {
197 if (dlg_select_pattern(wdata->buf, wdata->buflen))
198 replace_part(wdata->state, i - 1, wdata->buf);
199 return FR_CONTINUE;
200 }
201
202 for (; (i > 0) && (wdata->state->wbuf[i - 1] != '~'); i--)
203 ; // do nothing
204
205 if ((i > 0) && (i < wdata->state->curpos) &&
206 (wdata->state->wbuf[i - 1] == '~') && (wdata->state->wbuf[i] == 'y'))
207 {
208 i++;
209 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf + i,
210 wdata->state->curpos - i);
211 int rc = mutt_label_complete(wdata->cd, wdata->buf, wdata->buflen, wdata->tabs);
212 replace_part(wdata->state, i, wdata->buf);
213 if (rc != 1)
214 {
215 return FR_CONTINUE;
216 }
217 }
218 else
219 {
220 return FR_NO_ACTION;
221 }
222
223 return FR_SUCCESS;
224}
@ FR_NO_ACTION
Valid function - no action performed.
Definition: dispatcher.h:37
bool dlg_select_pattern(char *buf, size_t buflen)
Show menu to select a Pattern.
Definition: dlg_pattern.c:335
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_alias_query()

static int complete_alias_query ( struct EnterWindowData wdata)
static

Complete an Alias Query.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 231 of file functions.c.

232{
233 size_t i = wdata->state->curpos;
234 if (i != 0)
235 {
236 for (; (i > 0) && (wdata->state->wbuf[i - 1] != ','); i--)
237 ; // do nothing
238
239 for (; (i < wdata->state->curpos) && (wdata->state->wbuf[i] == ' '); i++)
240 ; // do nothing
241 }
242
243 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf + i,
244 wdata->state->curpos - i);
245 struct Buffer *tmp = buf_pool_get();
246 buf_strcpy(tmp, wdata->buf);
248 mutt_str_copy(wdata->buf, buf_string(tmp), wdata->buflen);
249 buf_pool_release(&tmp);
250 replace_part(wdata->state, i, wdata->buf);
251
252 return FR_CONTINUE;
253}
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:401
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:90
int query_complete(struct Buffer *buf, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlg_query.c:448
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:653
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:81
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:94
String manipulation buffer.
Definition: buffer.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_command()

static int complete_command ( struct EnterWindowData wdata)
static

Complete a NeoMutt Command.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 260 of file functions.c.

261{
262 int rc = FR_SUCCESS;
263 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf, wdata->state->curpos);
264 size_t i = strlen(wdata->buf);
265 if ((i != 0) && (wdata->buf[i - 1] == '=') &&
266 (mutt_var_value_complete(wdata->cd, wdata->buf, wdata->buflen, i) != 0))
267 {
268 wdata->tabs = 0;
269 }
270 else if (mutt_command_complete(wdata->cd, wdata->buf, wdata->buflen, i, wdata->tabs) == 0)
271 {
272 rc = FR_ERROR;
273 }
274
275 replace_part(wdata->state, 0, wdata->buf);
276 return rc;
277}
int mutt_var_value_complete(struct CompletionData *cd, char *buf, size_t buflen, int pos)
Complete a variable/value.
Definition: helpers.c:560
int mutt_command_complete(struct CompletionData *cd, char *buf, size_t buflen, int pos, int numtabs)
Complete a command name.
Definition: helpers.c:164
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_file_mbox()

static int complete_file_mbox ( struct EnterWindowData wdata)
static

Complete a Mailbox.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 284 of file functions.c.

285{
286 int rc = FR_SUCCESS;
287 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf, wdata->state->curpos);
288
289 /* see if the path has changed from the last time */
290 if ((!wdata->tempbuf && !wdata->state->lastchar) ||
291 (wdata->tempbuf && (wdata->templen == wdata->state->lastchar) &&
292 (memcmp(wdata->tempbuf, wdata->state->wbuf,
293 wdata->state->lastchar * sizeof(wchar_t)) == 0)))
294 {
295 mutt_select_file(wdata->buf, wdata->buflen,
298 wdata->m, wdata->files, wdata->numfiles);
299 if (wdata->buf[0] != '\0')
300 {
301 mutt_pretty_mailbox(wdata->buf, wdata->buflen);
302 if (!wdata->pass)
303 mutt_hist_add(wdata->hclass, wdata->buf, true);
304 wdata->done = true;
305 return FR_SUCCESS;
306 }
307
308 /* file selection cancelled */
309 return FR_CONTINUE;
310 }
311
312 if (mutt_complete(wdata->cd, wdata->buf, wdata->buflen) == 0)
313 {
314 wdata->templen = wdata->state->lastchar;
315 mutt_mem_realloc(&wdata->tempbuf, wdata->templen * sizeof(wchar_t));
316 memcpy(wdata->tempbuf, wdata->state->wbuf, wdata->templen * sizeof(wchar_t));
317 }
318 else
319 {
320 return FR_ERROR; // let the user know that nothing matched
321 }
322 replace_part(wdata->state, 0, wdata->buf);
323 return rc;
324}
#define MUTT_SEL_FOLDER
Select a local directory.
Definition: lib.h:58
#define MUTT_SEL_MULTI
Multi-selection is enabled.
Definition: lib.h:57
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:481
void mutt_hist_add(enum HistoryClass hclass, const char *str, bool save)
Add a string to a history.
Definition: history.c:485
#define MUTT_COMP_FILE_MBOX
File completion, plus incoming folders (in browser)
Definition: mutt.h:59
bool pass
Password mode, conceal characters.
Definition: wdata.h:60
int * numfiles
Number of files selected.
Definition: wdata.h:55
CompletionFlags flags
Flags, see CompletionFlags.
Definition: wdata.h:51
bool done
Is text-entry done?
Definition: wdata.h:68
bool multiple
Allow multiple matches.
Definition: wdata.h:52
char *** files
List of files selected.
Definition: wdata.h:54
enum HistoryClass hclass
History to use, e.g. HC_COMMAND.
Definition: wdata.h:62
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_nm_query()

static int complete_nm_query ( struct EnterWindowData wdata)
static

Complete a Notmuch Query.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 332 of file functions.c.

333{
334 int rc = FR_SUCCESS;
335 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf, wdata->state->curpos);
336 size_t len = strlen(wdata->buf);
337 if (!mutt_nm_query_complete(wdata->cd, wdata->buf, wdata->buflen, len, wdata->tabs))
338 rc = FR_ERROR;
339
340 replace_part(wdata->state, 0, wdata->buf);
341 return rc;
342}
bool mutt_nm_query_complete(struct CompletionData *cd, char *buf, size_t buflen, int pos, int numtabs)
Complete to the nearest notmuch tag.
Definition: helpers.c:437
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complete_nm_tag()

static int complete_nm_tag ( struct EnterWindowData wdata)
static

Complete a Notmuch Tag.

Parameters
wdataEnter window data
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 349 of file functions.c.

350{
351 int rc = FR_SUCCESS;
352 mutt_mb_wcstombs(wdata->buf, wdata->buflen, wdata->state->wbuf, wdata->state->curpos);
353 if (!mutt_nm_tag_complete(wdata->cd, wdata->buf, wdata->buflen, wdata->tabs))
354 rc = FR_ERROR;
355
356 replace_part(wdata->state, 0, wdata->buf);
357 return rc;
358}
bool mutt_nm_tag_complete(struct CompletionData *cd, char *buf, size_t buflen, int numtabs)
Complete to the nearest notmuch tag.
Definition: helpers.c:501
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ EnterFunctions

const struct EnterFunction EnterFunctions[]
static
Initial value:
= {
{ OP_EDITOR_BACKSPACE, op_editor_backspace },
{ OP_EDITOR_BACKWARD_CHAR, op_editor_backward_char },
{ OP_EDITOR_BACKWARD_WORD, op_editor_backward_word },
{ OP_EDITOR_BOL, op_editor_bol },
{ OP_EDITOR_CAPITALIZE_WORD, op_editor_capitalize_word },
{ OP_EDITOR_COMPLETE, op_editor_complete },
{ OP_EDITOR_COMPLETE_QUERY, op_editor_complete },
{ OP_EDITOR_DELETE_CHAR, op_editor_delete_char },
{ OP_EDITOR_DOWNCASE_WORD, op_editor_capitalize_word },
{ OP_EDITOR_EOL, op_editor_eol },
{ OP_EDITOR_FORWARD_CHAR, op_editor_forward_char },
{ OP_EDITOR_FORWARD_WORD, op_editor_forward_word },
{ OP_EDITOR_HISTORY_DOWN, op_editor_history_down },
{ OP_EDITOR_HISTORY_SEARCH, op_editor_history_search },
{ OP_EDITOR_HISTORY_UP, op_editor_history_up },
{ OP_EDITOR_KILL_EOL, op_editor_kill_eol },
{ OP_EDITOR_KILL_EOW, op_editor_kill_eow },
{ OP_EDITOR_KILL_LINE, op_editor_kill_line },
{ OP_EDITOR_KILL_WHOLE_LINE, op_editor_kill_whole_line },
{ OP_EDITOR_KILL_WORD, op_editor_kill_word },
{ OP_EDITOR_MAILBOX_CYCLE, op_editor_mailbox_cycle },
{ OP_EDITOR_QUOTE_CHAR, op_editor_quote_char },
{ OP_EDITOR_TRANSPOSE_CHARS, op_editor_transpose_chars },
{ OP_EDITOR_UPCASE_WORD, op_editor_capitalize_word },
{ 0, NULL },
}
static int op_editor_kill_line(struct EnterWindowData *wdata, int op)
Delete all chars on the line - Implements enter_function_t -.
Definition: functions.c:613
static int op_editor_mailbox_cycle(struct EnterWindowData *wdata, int op)
Cycle among incoming mailboxes - Implements enter_function_t -.
Definition: functions.c:461
static int op_editor_delete_char(struct EnterWindowData *wdata, int op)
Delete the char under the cursor - Implements enter_function_t -.
Definition: functions.c:563
static int op_editor_history_down(struct EnterWindowData *wdata, int op)
Scroll down through the history list - Implements enter_function_t -.
Definition: functions.c:417
static int op_editor_history_search(struct EnterWindowData *wdata, int op)
Search through the history list - Implements enter_function_t -.
Definition: functions.c:433
static int op_editor_backward_char(struct EnterWindowData *wdata, int op)
Move the cursor one character to the left - Implements enter_function_t -.
Definition: functions.c:512
static int op_editor_complete(struct EnterWindowData *wdata, int op)
Complete filename or alias - Implements enter_function_t -.
Definition: functions.c:368
static int op_editor_history_up(struct EnterWindowData *wdata, int op)
Scroll up through the history list - Implements enter_function_t -.
Definition: functions.c:445
static int op_editor_kill_eow(struct EnterWindowData *wdata, int op)
Delete chars from the cursor to the end of the word - Implements enter_function_t -.
Definition: functions.c:605
static int op_editor_eol(struct EnterWindowData *wdata, int op)
Jump to the end of the line - Implements enter_function_t -.
Definition: functions.c:571
static int op_editor_forward_word(struct EnterWindowData *wdata, int op)
Move the cursor to the end of the word - Implements enter_function_t -.
Definition: functions.c:589
static int op_editor_backward_word(struct EnterWindowData *wdata, int op)
Move the cursor to the beginning of the word - Implements enter_function_t -.
Definition: functions.c:520
static int op_editor_kill_word(struct EnterWindowData *wdata, int op)
Delete the word in front of the cursor - Implements enter_function_t -.
Definition: functions.c:629
static int op_editor_quote_char(struct EnterWindowData *wdata, int op)
Quote the next typed key - Implements enter_function_t -.
Definition: functions.c:637
static int op_editor_forward_char(struct EnterWindowData *wdata, int op)
Move the cursor one character to the right - Implements enter_function_t -.
Definition: functions.c:581
static int op_editor_kill_whole_line(struct EnterWindowData *wdata, int op)
Delete all chars on the line - Implements enter_function_t -.
Definition: functions.c:621
static int op_editor_transpose_chars(struct EnterWindowData *wdata, int op)
Transpose character under cursor with previous - Implements enter_function_t -.
Definition: functions.c:659
static int op_editor_backspace(struct EnterWindowData *wdata, int op)
Delete the char in front of the cursor - Implements enter_function_t -.
Definition: functions.c:491
static int op_editor_kill_eol(struct EnterWindowData *wdata, int op)
Delete chars from cursor to end of line - Implements enter_function_t -.
Definition: functions.c:597
static int op_editor_capitalize_word(struct EnterWindowData *wdata, int op)
Capitalize the word - Implements enter_function_t - This function handles:
Definition: functions.c:540
static int op_editor_bol(struct EnterWindowData *wdata, int op)
Jump to the beginning of the line - Implements enter_function_t -.
Definition: functions.c:528

All the NeoMutt functions that Enter supports.

Definition at line 669 of file functions.c.