Auto-completion helpers. More...
#include "config.h"#include <stdbool.h>#include <stdio.h>#include <string.h>#include <strings.h>#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "lib.h"#include "editor/lib.h"#include "index/lib.h"#include "key/lib.h"#include "menu/lib.h"#include "compapi.h"#include "data.h"
Include dependency graph for helpers.c:Go to the source code of this file.
Functions | |
| void | matches_ensure_morespace (struct CompletionData *cd, int new_size) |
| Allocate more space for auto-completion. | |
| bool | candidate (struct CompletionData *cd, char *user, const char *src, char *dest, size_t dlen) |
| Helper function for completion. | |
| int | mutt_command_complete (struct CompletionData *cd, struct Buffer *buf, int pos, int numtabs) |
| Complete a command name. | |
| static int | label_sort (const void *a, const void *b, void *sdata) |
| Compare two label strings - Implements sort_t -. | |
| int | mutt_label_complete (struct CompletionData *cd, struct Buffer *buf, int numtabs) |
| Complete a label name. | |
| int | mutt_var_value_complete (struct CompletionData *cd, struct Buffer *buf, int pos) |
| Complete a variable/value. | |
| enum FunctionRetval | complete_command (struct EnterWindowData *wdata, int op) |
| Complete a NeoMutt Command - Implements CompleteOps::complete() -. | |
| enum FunctionRetval | complete_label (struct EnterWindowData *wdata, int op) |
| Complete a label - Implements CompleteOps::complete() -. | |
Variables | |
| const struct CompleteOps | CompleteCommandOps |
| Auto-Completion of Commands. | |
| const struct CompleteOps | CompleteLabelOps |
| Auto-Completion of Labels. | |
Auto-completion helpers.
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 helpers.c.
| void matches_ensure_morespace | ( | struct CompletionData * | cd, |
| int | new_size ) |
Allocate more space for auto-completion.
| cd | Completion Data |
| new_size | Space required |
Definition at line 53 of file helpers.c.
Here is the caller graph for this function:| bool candidate | ( | struct CompletionData * | cd, |
| char * | user, | ||
| const char * | src, | ||
| char * | dest, | ||
| size_t | dlen ) |
Helper function for completion.
| cd | Completion Data |
| user | User entered data for completion |
| src | Candidate for completion |
| dest | Completion result gets here |
| dlen | Length of dest buffer |
| true | If candidate string matches |
Changes the dest buffer if necessary/possible to aid completion.
Definition at line 77 of file helpers.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_command_complete | ( | struct CompletionData * | cd, |
| struct Buffer * | buf, | ||
| int | pos, | ||
| int | numtabs ) |
Complete a command name.
| cd | Completion Data |
| buf | Buffer for the result |
| pos | Cursor position in the buffer |
| numtabs | Number of times the user has hit 'tab' |
| 1 | Success, a match |
| 0 | Error, no match |
Definition at line 111 of file helpers.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_label_complete | ( | struct CompletionData * | cd, |
| struct Buffer * | buf, | ||
| int | numtabs ) |
Complete a label name.
| cd | Completion Data |
| buf | Buffer for the result |
| numtabs | Number of times the user has hit 'tab' |
| 1 | Success, a match |
| 0 | Error, no match |
Definition at line 310 of file helpers.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_var_value_complete | ( | struct CompletionData * | cd, |
| struct Buffer * | buf, | ||
| int | pos ) |
Complete a variable/value.
| cd | Completion Data |
| buf | Buffer for the result |
| pos | Cursor position in the buffer |
| 1 | Success |
| 0 | Failure |
Definition at line 372 of file helpers.c.
Here is the call graph for this function:
Here is the caller graph for this function:| const struct CompleteOps CompleteCommandOps |
Auto-Completion of Commands.
| const struct CompleteOps CompleteLabelOps |
Auto-Completion of Labels.