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 #include "view.h"
12
13 typedef struct {
14 PointerArray macro;
15 PointerArray prev_macro;
16 String insert_buffer;
17 bool recording;
18 } MacroRecorder;
19
20 10 static inline bool macro_is_recording(const MacroRecorder *m)
21 {
22 10 return m->recording;
23 }
24
25 bool macro_record(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
26 bool macro_stop(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
27 bool macro_cancel(MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
28 void macro_command_hook(MacroRecorder *m, const char *cmd_name, char **args) NONNULL_ARGS;
29 void macro_search_hook(MacroRecorder *m, StringView pattern, SelectionType sel_type, bool reverse, bool add_to_history) NONNULL_ARGS;
30 void macro_insert_char_hook(MacroRecorder *m, CodePoint c) NONNULL_ARGS;
31 void macro_insert_text_hook(MacroRecorder *m, StringView text) NONNULL_ARGS;
32 String dump_macro(const MacroRecorder *m) WARN_UNUSED_RESULT NONNULL_ARGS;
33 void free_macro(MacroRecorder *m) NONNULL_ARGS;
34
35 #endif
36