aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/tui/input.c4
-rw-r--r--src/nvim/tui/input.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 2c9c8b78f3..124f96e039 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -22,11 +22,13 @@
#define KEY_BUFFER_SIZE 0xfff
+#ifndef UNIT_TESTING
typedef enum {
kIncomplete = -1,
kNotApplicable = 0,
kComplete = 1,
} HandleState;
+#endif
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/input.c.generated.h"
@@ -547,7 +549,7 @@ static HandleState handle_background_color(TermInput *input)
return kComplete;
}
#ifdef UNIT_TESTING
-bool ut_handle_background_color(TermInput *input)
+HandleState ut_handle_background_color(TermInput *input)
{
return handle_background_color(input);
}
diff --git a/src/nvim/tui/input.h b/src/nvim/tui/input.h
index b30546c815..ed76455189 100644
--- a/src/nvim/tui/input.h
+++ b/src/nvim/tui/input.h
@@ -32,7 +32,13 @@ typedef struct term_input {
#endif
#ifdef UNIT_TESTING
-bool ut_handle_background_color(TermInput *input);
+typedef enum {
+ kIncomplete = -1,
+ kNotApplicable = 0,
+ kComplete = 1,
+} HandleState;
+
+HandleState ut_handle_background_color(TermInput *input);
#endif
#endif // NVIM_TUI_INPUT_H