From 71e954ad303eec25b67541f3a99392446f6de8b3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 17:01:27 +0800 Subject: [PATCH] refactor(IWYU): fix includes for ugrid.h (#26267) --- Makefile | 1 - src/clint.py | 1 - src/nvim/ugrid.h | 16 ++++------------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index ea494e05ed..8188697fbe 100644 --- a/Makefile +++ b/Makefile @@ -243,7 +243,6 @@ iwyu: build/.ran-cmake |src/nvim/textobject.h\ |src/nvim/tui/input.h\ |src/nvim/tui/tui.h\ - |src/nvim/ugrid.h\ |src/nvim/ui.h\ |src/nvim/ui_client.h\ |src/nvim/ui_compositor.h\ diff --git a/src/clint.py b/src/clint.py index 812464b753..9daa1ad21f 100755 --- a/src/clint.py +++ b/src/clint.py @@ -998,7 +998,6 @@ def CheckIncludes(filename, lines, error): "src/nvim/textobject.h", "src/nvim/tui/input.h", "src/nvim/tui/tui.h", - "src/nvim/ugrid.h", "src/nvim/ui.h", "src/nvim/ui_client.h", "src/nvim/ui_compositor.h", diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h index 53278dbf7a..a82b0e1c9d 100644 --- a/src/nvim/ugrid.h +++ b/src/nvim/ugrid.h @@ -1,25 +1,17 @@ #pragma once -#include "nvim/globals.h" #include "nvim/grid_defs.h" -#include "nvim/ui.h" -struct ucell; -struct ugrid; - -typedef struct ucell UCell; -typedef struct ugrid UGrid; - -struct ucell { +typedef struct ucell { schar_T data; sattr_T attr; -}; +} UCell; -struct ugrid { +typedef struct ugrid { int row, col; int width, height; UCell **cells; -}; +} UGrid; #define UGRID_FOREACH_CELL(grid, row, startcol, endcol, code) \ do { \