dte test coverage


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 50.0% high: ≥ 85.0%
Coverage Exec / Excl / Total
Lines: 100.0% 2 / 0 / 2
Functions: 100.0% 1 / 0 / 1
Branches: -% 0 / 0 / 0

src/command/macro.h
Line Branch Exec Source
1 #ifndef COMMAND_MACRO_H
2 #define COMMAND_MACRO_H
3
4 #include <stdbool.h>
5 #include <stddef.h>
6 #include "util/macros.h"
7 #include "util/ptr-array.h"
8 #include "util/string-view.h"
9 #include "util/string.h"
10 #include "util/unicode.h"
11
12 typedef struct {
13 PointerArray macro;
14 PointerArray prev_macro;
15 String insert_buffer;
16 bool recording;
17 } MacroRecorder;
18
19 10 static inline bool macro_is_recording(const MacroRecorder *m)
20 {
21 10 return m->recording;
22 }
23
24 bool macro_record(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
25 bool macro_stop(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
26 bool macro_cancel(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
27 void macro_command_hook(MacroRecorder *m, const char *cmd_name, char **args) NONNULL_ARGS;
28 void macro_search_hook(MacroRecorder *m, const char *pattern, bool reverse, bool add_to_history) NONNULL_ARG(1);
29 void macro_insert_char_hook(MacroRecorder *m, CodePoint c) NONNULL_ARGS;
30 void macro_insert_text_hook(MacroRecorder *m, StringView text) NONNULL_ARGS;
31 String dump_macro(const MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
32 void free_macro(MacroRecorder *m) NONNULL_ARGS;
33
34 #endif
35