neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit c12701d4e1404a67fef6da01a8a9d7e2d48d78d6
parent 8d154e5927d728cc2ad74a0dec8b45fab1333f8c
Author: bfredl <bjorn.linse@gmail.com>
Date:   Fri, 15 Aug 2025 11:06:42 +0200

Merge pull request #35329 from bfredl/uncrustify_all

fix(build): also check os_win sources with uncrustify in CI
Diffstat:
Msrc/nvim/CMakeLists.txt | 6++++--
Msrc/nvim/os/os_win_console.c | 7++++---
Msrc/nvim/os/pty_conpty_win.c | 4++--
Msrc/nvim/os/pty_proc_win.c | 2+-
4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt @@ -416,6 +416,8 @@ endforeach() list(SORT NVIM_SOURCES) list(SORT NVIM_HEADERS) +list(APPEND UNCRUSTIFY_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS}) + foreach(sfile ${NVIM_SOURCES}) get_filename_component(f ${sfile} NAME) if(WIN32 AND ${f} MATCHES "^(pty_proc_unix.c)$") @@ -901,13 +903,13 @@ add_glob_target( TARGET lintc-uncrustify COMMAND ${UNCRUSTIFY_PRG} FLAGS -c ${UNCRUSTIFY_CONFIG} -q --check - FILES ${NVIM_SOURCES} ${NVIM_HEADERS}) + FILES ${UNCRUSTIFY_NVIM_SOURCES}) add_glob_target( TARGET formatc COMMAND ${UNCRUSTIFY_PRG} FLAGS -c ${UNCRUSTIFY_CONFIG} --replace --no-backup - FILES ${NVIM_SOURCES} ${NVIM_HEADERS}) + FILES ${UNCRUSTIFY_NVIM_SOURCES}) # TODO(bfredl): there is a bug in "uncrustify --update-config-with-doc" which breaks # our config (backslash escape in strings). Once fixed these two lines should be deleted diff --git a/src/nvim/os/os_win_console.c b/src/nvim/os/os_win_console.c @@ -7,7 +7,7 @@ #include "nvim/os/os.h" #include "nvim/os/os_win_console.h" -# include "os/os_win_console.c.generated.h" +#include "os/os_win_console.c.generated.h" static char origTitle[256] = { 0 }; static HWND hWnd = NULL; @@ -27,7 +27,7 @@ int os_open_conin_fd(void) return conin_fd; } -void os_clear_hwnd(void) +void os_clear_hwnd(void) { hWnd = NULL; } @@ -57,7 +57,8 @@ void os_replace_stdout_and_stderr_to_conout(void) } /// Resets Windows console icon if we got an original one on startup. -void os_icon_reset(void) { +void os_icon_reset(void) +{ if (hWnd == NULL) { return; } diff --git a/src/nvim/os/pty_conpty_win.c b/src/nvim/os/pty_conpty_win.c @@ -143,8 +143,8 @@ finished: return conpty_object; } -bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name, - wchar_t *cmd_line, wchar_t *cwd, wchar_t *env) +bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name, wchar_t *cmd_line, + wchar_t *cwd, wchar_t *env) { PROCESS_INFORMATION pi = { 0 }; if (!CreateProcessW(name, diff --git a/src/nvim/os/pty_proc_win.c b/src/nvim/os/pty_proc_win.c @@ -12,7 +12,7 @@ #include "nvim/os/pty_conpty_win.h" #include "nvim/os/pty_proc_win.h" -# include "os/pty_proc_win.c.generated.h" +#include "os/pty_proc_win.c.generated.h" static void CALLBACK pty_proc_terminate_cb(void *context, BOOLEAN unused) FUNC_ATTR_NONNULL_ALL