From f58a9795990a3b324f66912e4ae33dae7eb7474d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Aug 2022 06:26:06 +0800 Subject: vim-patch:9.0.0318: clearing screen causes flicker (#19993) Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return". https://github.com/vim/vim/commit/13608d851a0470ced30921428b3313c023d395d8 Only 2 lines of actual code change. --- src/nvim/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/input.c') diff --git a/src/nvim/input.c b/src/nvim/input.c index 37c2903cfd..0aa9feaca3 100644 --- a/src/nvim/input.c +++ b/src/nvim/input.c @@ -46,7 +46,7 @@ int ask_yesno(const char *const str, const bool direct) int r = ' '; while (r != 'y' && r != 'n') { - // Same highlighting as for wait_return. + // same highlighting as for wait_return() smsg_attr(HL_ATTR(HLF_R), "%s (y/n)?", str); if (direct) { r = get_keystroke(NULL); -- cgit From d7358118aa57ec636ef6f84c6ac96f26d8bed32c Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 28 Sep 2022 10:53:44 +0200 Subject: fix: compiler warnings from clang 15 (#20321) Add -Wno-strict-prototypes flag to external dependencies to suppress cjson warnings. These needs to be fixed upstream first. --- src/nvim/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/input.c') diff --git a/src/nvim/input.c b/src/nvim/input.c index 0aa9feaca3..681d9d5f9c 100644 --- a/src/nvim/input.c +++ b/src/nvim/input.c @@ -83,7 +83,6 @@ int get_keystroke(MultiQueue *events) int len = 0; int n; int save_mapped_ctrl_c = mapped_ctrl_c; - int waited = 0; mapped_ctrl_c = 0; // mappings are not used here for (;;) { @@ -110,10 +109,8 @@ int get_keystroke(MultiQueue *events) // Replace zero and K_SPECIAL by a special key code. n = fix_input_buffer(buf + len, n); len += n; - waited = 0; - } else if (len > 0) { - waited++; // keep track of the waiting time } + if (n > 0) { // found a termcode: adjust length len = n; } -- cgit From 66360675cf4d091b7460e4a8e1435c13216c1929 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 11 Sep 2022 17:12:44 +0200 Subject: build: allow IWYU to fix includes for all .c files Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers. --- src/nvim/input.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/nvim/input.c') diff --git a/src/nvim/input.c b/src/nvim/input.c index 681d9d5f9c..0f0af9d5f0 100644 --- a/src/nvim/input.c +++ b/src/nvim/input.c @@ -4,21 +4,29 @@ // input.c: high level functions for prompting the user or input // like yes/no or number prompts. -#include #include +#include +#include "nvim/ascii.h" +#include "nvim/event/multiqueue.h" #include "nvim/func_attr.h" #include "nvim/getchar.h" +#include "nvim/gettext.h" +#include "nvim/globals.h" +#include "nvim/highlight_defs.h" #include "nvim/input.h" +#include "nvim/keycodes.h" #include "nvim/mbyte.h" #include "nvim/memory.h" +#include "nvim/message.h" #include "nvim/mouse.h" #include "nvim/os/input.h" +#include "nvim/types.h" #include "nvim/ui.h" #include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS -# include "input.c.generated.h" +# include "input.c.generated.h" // IWYU pragma: export #endif /// Ask for a reply from the user, 'y' or 'n' -- cgit From b4d669e7acd819cd5723b387a5a79023994d438d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 17 Jan 2023 16:53:37 +0800 Subject: vim-patch:8.2.4928: various white space and cosmetic mistakes (#21854) Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments. https://github.com/vim/vim/commit/6ed545e79735f23ff8e650bc2f0967e5a0baedc9 Co-authored-by: Bram Moolenaar --- src/nvim/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/input.c') diff --git a/src/nvim/input.c b/src/nvim/input.c index 0f0af9d5f0..96214d45c2 100644 --- a/src/nvim/input.c +++ b/src/nvim/input.c @@ -29,7 +29,8 @@ # include "input.c.generated.h" // IWYU pragma: export #endif -/// Ask for a reply from the user, 'y' or 'n' +/// Ask for a reply from the user, a 'y' or a 'n', with prompt "str" (which +/// should have been translated already). /// /// No other characters are accepted, the message is repeated until a valid /// reply is entered or is hit. -- cgit