fix: add UIMode enum to test_tui.c and remove unused yank_count variables

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 19:34:14 +00:00
parent 2c02901d4e
commit 51f5905a22

View File

@@ -6,6 +6,13 @@
#include <stdatomic.h> #include <stdatomic.h>
#include "tui.h" #include "tui.h"
// Mode definitions (mirrored from tui.c)
typedef enum {
MODE_NORMAL,
MODE_VISUAL,
MODE_MOVE
} UIMode;
// Test helper // Test helper
static Engine *create_test_engine(void) { static Engine *create_test_engine(void) {
Engine *engine = (Engine *)calloc(1, sizeof(Engine)); Engine *engine = (Engine *)calloc(1, sizeof(Engine));
@@ -851,7 +858,6 @@ void test_paste_clips(void) {
// Simulate yanking clip at position (1, 1) = clip 9 // Simulate yanking clip at position (1, 1) = clip 9
int yank_buffer[] = {9}; int yank_buffer[] = {9};
int yank_count = 1;
int selected_row = 3, selected_col = 3; // Paste at position (3, 3) = clip 27 int selected_row = 3, selected_col = 3; // Paste at position (3, 3) = clip 27
// Calculate offset // Calculate offset
@@ -889,7 +895,6 @@ void test_paste_bounds_checking(void) {
// Yank clip at position (7, 7) = clip 63 (bottom-right) // Yank clip at position (7, 7) = clip 63 (bottom-right)
int yank_buffer[] = {63}; int yank_buffer[] = {63};
int yank_count = 1;
int selected_row = 0, selected_col = 0; // Paste at top-left int selected_row = 0, selected_col = 0; // Paste at top-left
// Calculate offset // Calculate offset