aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/api/buffer.c15
-rw-r--r--src/nvim/api/private/dispatch.c2
-rw-r--r--src/nvim/api/private/helpers.c10
-rw-r--r--src/nvim/api/private/helpers.h2
-rw-r--r--src/nvim/api/vim.c2
-rw-r--r--src/nvim/api/win_config.c2
-rw-r--r--src/nvim/arabic.h4
-rw-r--r--src/nvim/ascii.h2
-rw-r--r--src/nvim/assert.h40
-rw-r--r--src/nvim/autocmd.h30
-rw-r--r--src/nvim/buffer.h48
-rw-r--r--src/nvim/buffer_defs.h325
-rw-r--r--src/nvim/channel.h46
-rw-r--r--src/nvim/charset.h6
-rw-r--r--src/nvim/context.h1
-rw-r--r--src/nvim/cursor_shape.h44
-rw-r--r--src/nvim/decoration.h8
-rw-r--r--src/nvim/diff.h2
-rw-r--r--src/nvim/digraph.h2
-rw-r--r--src/nvim/edit.h38
-rw-r--r--src/nvim/eval.h260
-rw-r--r--src/nvim/ex_cmds.h14
-rw-r--r--src/nvim/ex_cmds_defs.h26
-rw-r--r--src/nvim/ex_docmd.h2
-rw-r--r--src/nvim/ex_eval.h56
-rw-r--r--src/nvim/ex_getln.h2
-rw-r--r--src/nvim/extmark.h2
-rw-r--r--src/nvim/extmark_defs.h2
-rw-r--r--src/nvim/file_search.h14
-rw-r--r--src/nvim/fileio.h2
-rw-r--r--src/nvim/fold.h6
-rw-r--r--src/nvim/func_attr.h26
-rw-r--r--src/nvim/garray.h4
-rw-r--r--src/nvim/getchar.h4
-rw-r--r--src/nvim/globals.h220
-rw-r--r--src/nvim/grid_defs.h6
-rw-r--r--src/nvim/hardcopy.h16
-rw-r--r--src/nvim/hashtab.h20
-rw-r--r--src/nvim/highlight.h5
-rw-r--r--src/nvim/iconv.h18
-rw-r--r--src/nvim/if_cscope.h4
-rw-r--r--src/nvim/if_cscope_defs.h14
-rw-r--r--src/nvim/indent_c.c2
-rw-r--r--src/nvim/keymap.h30
-rw-r--r--src/nvim/lib/kbtree.h2
-rw-r--r--src/nvim/lib/khash.h2
-rw-r--r--src/nvim/lib/klist.h2
-rw-r--r--src/nvim/lib/kvec.h2
-rw-r--r--src/nvim/lib/queue.h2
-rw-r--r--src/nvim/lib/ringbuf.h2
-rw-r--r--src/nvim/log.h10
-rw-r--r--src/nvim/macros.h68
-rw-r--r--src/nvim/main.h2
-rw-r--r--src/nvim/map.h6
-rw-r--r--src/nvim/mark.h56
-rw-r--r--src/nvim/mark_defs.h6
-rw-r--r--src/nvim/marktree.h5
-rw-r--r--src/nvim/math.c1
-rw-r--r--src/nvim/mbyte.h26
-rw-r--r--src/nvim/memfile_defs.h4
-rw-r--r--src/nvim/memline.h4
-rw-r--r--src/nvim/memline_defs.h8
-rw-r--r--src/nvim/memory.h2
-rw-r--r--src/nvim/menu.h6
-rw-r--r--src/nvim/message.h18
-rw-r--r--src/nvim/misc1.h14
-rw-r--r--src/nvim/mouse.h2
-rw-r--r--src/nvim/move.h1
-rw-r--r--src/nvim/normal.h43
-rw-r--r--src/nvim/ops.h10
-rw-r--r--src/nvim/option.h8
-rw-r--r--src/nvim/option_defs.h436
-rw-r--r--src/nvim/os_unix.h2
-rw-r--r--src/nvim/path.h28
-rw-r--r--src/nvim/popupmnu.h4
-rw-r--r--src/nvim/pos.h8
-rw-r--r--src/nvim/profile.h4
-rw-r--r--src/nvim/quickfix.h4
-rw-r--r--src/nvim/rbuffer.h30
-rw-r--r--src/nvim/regexp.c2
-rw-r--r--src/nvim/regexp.h2
-rw-r--r--src/nvim/regexp_defs.h30
-rw-r--r--src/nvim/regexp_nfa.c2
-rw-r--r--src/nvim/screen.h14
-rw-r--r--src/nvim/search.h48
-rw-r--r--src/nvim/sha256.h2
-rw-r--r--src/nvim/sign.h1
-rw-r--r--src/nvim/sign_defs.h33
-rw-r--r--src/nvim/spell.h2
-rw-r--r--src/nvim/spell_defs.h78
-rw-r--r--src/nvim/spellfile.h2
-rw-r--r--src/nvim/state.h4
-rw-r--r--src/nvim/strings.h4
-rw-r--r--src/nvim/syntax.h40
-rw-r--r--src/nvim/syntax_defs.h32
-rw-r--r--src/nvim/tag.h32
-rw-r--r--src/nvim/terminal.h2
-rw-r--r--src/nvim/testdir/samples/memfile_test.c2
-rw-r--r--src/nvim/tui/terminfo_defs.h3
-rw-r--r--src/nvim/types.h2
-rw-r--r--src/nvim/ugrid.h2
-rw-r--r--src/nvim/ui.h5
-rw-r--r--src/nvim/ui_bridge.h4
-rw-r--r--src/nvim/ui_compositor.h2
-rw-r--r--src/nvim/undo.c2
-rw-r--r--src/nvim/undo.h2
-rw-r--r--src/nvim/undo_defs.h44
-rw-r--r--src/nvim/version.h4
-rw-r--r--src/nvim/vim.h17
-rw-r--r--src/nvim/window.h30
110 files changed, 1330 insertions, 1331 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 569c0c9771..3a38a14cdd 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -1166,8 +1166,7 @@ Boolean nvim_buf_del_mark(Buffer buffer, String name, Error *err)
/// @return true if the mark was set, else false.
/// @see |nvim_buf_del_mark()|
/// @see |nvim_buf_get_mark()|
-Boolean nvim_buf_set_mark(Buffer buffer, String name,
- Integer line, Integer col, Error *err)
+Boolean nvim_buf_set_mark(Buffer buffer, String name, Integer line, Integer col, Error *err)
FUNC_API_SINCE(8)
{
bool res = false;
@@ -1578,8 +1577,8 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
if (opts->id.type == kObjectTypeInteger && opts->id.data.integer > 0) {
id = (uint64_t)opts->id.data.integer;
} else if (HAS_KEY(opts->id)) {
- api_set_error(err, kErrorTypeValidation, "id is not a positive integer");
- goto error;
+ api_set_error(err, kErrorTypeValidation, "id is not a positive integer");
+ goto error;
}
int line2 = -1;
@@ -1655,10 +1654,10 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
}
#define OPTION_TO_BOOL(target, name, val) \
- target = api_object_to_bool(opts-> name, #name, val, err); \
- if (ERROR_SET(err)) { \
- goto error; \
- }
+ target = api_object_to_bool(opts-> name, #name, val, err); \
+ if (ERROR_SET(err)) { \
+ goto error; \
+ }
OPTION_TO_BOOL(decor.virt_text_hide, virt_text_hide, false);
OPTION_TO_BOOL(decor.hl_eol, hl_eol, false);
diff --git a/src/nvim/api/private/dispatch.c b/src/nvim/api/private/dispatch.c
index ee0cdc4c07..519bf8ff14 100644
--- a/src/nvim/api/private/dispatch.c
+++ b/src/nvim/api/private/dispatch.c
@@ -14,8 +14,8 @@
#include "nvim/api/tabpage.h"
#include "nvim/api/ui.h"
#include "nvim/api/vim.h"
-#include "nvim/api/window.h"
#include "nvim/api/win_config.h"
+#include "nvim/api/window.h"
#include "nvim/log.h"
#include "nvim/map.h"
#include "nvim/msgpack_rpc/helpers.h"
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index d03a61d1cc..aed87048ce 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -4,9 +4,9 @@
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
+#include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#include <stddef.h>
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
@@ -831,10 +831,10 @@ void modify_keymap(Buffer buffer, bool is_unmap, String mode, String lhs, String
MapArguments parsed_args = MAP_ARGUMENTS_INIT;
if (opts) {
#define KEY_TO_BOOL(name) \
- parsed_args. name = api_object_to_bool(opts-> name, #name, false, err); \
- if (ERROR_SET(err)) { \
- goto fail_and_free; \
- }
+ parsed_args. name = api_object_to_bool(opts-> name, #name, false, err); \
+ if (ERROR_SET(err)) { \
+ goto fail_and_free; \
+ }
KEY_TO_BOOL(nowait);
KEY_TO_BOOL(noremap);
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h
index dc9452e832..08d2c8d90c 100644
--- a/src/nvim/api/private/helpers.h
+++ b/src/nvim/api/private/helpers.h
@@ -141,8 +141,8 @@ typedef struct {
} while (0)
#ifdef INCLUDE_GENERATED_DECLARATIONS
-# include "keysets.h.generated.h"
# include "api/private/helpers.h.generated.h"
+# include "keysets.h.generated.h"
#endif
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 9b39b18c4e..0565f8cd77 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -2846,7 +2846,7 @@ Array nvim_get_mark(String name, Error *err)
bufnr = mark.fmark.fnum;
filename = (char *)buflist_nr2name(bufnr, true, true);
allocated = true;
- // Marks comes from shada
+ // Marks comes from shada
} else {
filename = (char *)mark.fname;
bufnr = 0;
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c
index d82e7e8a03..d8105810aa 100644
--- a/src/nvim/api/win_config.c
+++ b/src/nvim/api/win_config.c
@@ -616,7 +616,7 @@ static bool parse_float_config(Dict(float_config) *config, FloatConfig *fconfig,
fconfig->style = kWinStyleUnused;
} else if (striequal(config->style.data.string.data, "minimal")) {
fconfig->style = kWinStyleMinimal;
- } else {
+ } else {
api_set_error(err, kErrorTypeValidation, "Invalid value of 'style' key");
}
} else if (HAS_KEY(config->style)) {
diff --git a/src/nvim/arabic.h b/src/nvim/arabic.h
index 7ea728ed47..eaab463777 100644
--- a/src/nvim/arabic.h
+++ b/src/nvim/arabic.h
@@ -6,8 +6,8 @@
/// Whether c belongs to the range of Arabic characters that might be shaped.
static inline bool arabic_char(int c)
{
- // return c >= a_HAMZA && c <= a_MINI_ALEF;
- return c >= 0x0621 && c <= 0x0670;
+ // return c >= a_HAMZA && c <= a_MINI_ALEF;
+ return c >= 0x0621 && c <= 0x0670;
}
#ifdef INCLUDE_GENERATED_DECLARATIONS
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h
index 7b5e82cd3f..44ed94d2fc 100644
--- a/src/nvim/ascii.h
+++ b/src/nvim/ascii.h
@@ -3,8 +3,8 @@
#include <stdbool.h>
-#include "nvim/macros.h"
#include "nvim/func_attr.h"
+#include "nvim/macros.h"
#include "nvim/os/os_defs.h"
// Definitions of various common control characters.
diff --git a/src/nvim/assert.h b/src/nvim/assert.h
index 1361879876..fc1a4be164 100644
--- a/src/nvim/assert.h
+++ b/src/nvim/assert.h
@@ -49,11 +49,11 @@
#define STATIC_ASSERT_PRAGMA_START
#define STATIC_ASSERT_PRAGMA_END
#define STATIC_ASSERT(cond, msg) \
- do { \
- STATIC_ASSERT_PRAGMA_START \
- STATIC_ASSERT_STATEMENT(cond, msg); \
- STATIC_ASSERT_PRAGMA_END \
- } while (0)
+ do { \
+ STATIC_ASSERT_PRAGMA_START \
+ STATIC_ASSERT_STATEMENT(cond, msg); \
+ STATIC_ASSERT_PRAGMA_END \
+ } while (0)
// the easiest case, when the mode is C11 (generic compiler) or Clang
// advertises explicit support for c_static_assert, meaning it won't warn.
@@ -68,19 +68,19 @@
# undef STATIC_ASSERT_PRAGMA_START
-#if __GNUC__ >= 6
-# define STATIC_ASSERT_PRAGMA_START \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
-#else
-# define STATIC_ASSERT_PRAGMA_START \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-pedantic\"")
-#endif
+# if __GNUC__ >= 6
+# define STATIC_ASSERT_PRAGMA_START \
+ _Pragma("GCC diagnostic push")\
+ _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
+# else
+# define STATIC_ASSERT_PRAGMA_START \
+ _Pragma("GCC diagnostic push")\
+ _Pragma("GCC diagnostic ignored \"-pedantic\"")
+# endif
# undef STATIC_ASSERT_PRAGMA_END
# define STATIC_ASSERT_PRAGMA_END \
- _Pragma("GCC diagnostic pop")
+ _Pragma("GCC diagnostic pop")
// the same goes for clang in C99 mode, but we suppress a different warning
#elif defined(__clang__) && __has_extension(c_static_assert)
@@ -89,12 +89,12 @@
# undef STATIC_ASSERT_PRAGMA_START
# define STATIC_ASSERT_PRAGMA_START \
- _Pragma("clang diagnostic push") \
- _Pragma("clang diagnostic ignored \"-Wc11-extensions\"")
+ _Pragma("clang diagnostic push")\
+ _Pragma("clang diagnostic ignored \"-Wc11-extensions\"")
# undef STATIC_ASSERT_PRAGMA_END
# define STATIC_ASSERT_PRAGMA_END \
- _Pragma("clang diagnostic pop")
+ _Pragma("clang diagnostic pop")
// TODO(aktau): verify that this works, don't have MSVC on hand.
#elif _MSC_VER >= 1600
@@ -113,14 +113,14 @@
// These can't be used after statements in c89.
#ifdef __COUNTER__
# define STATIC_ASSERT_EXPR(e, m) \
- ((enum { ASSERT_CONCAT(static_assert_, __COUNTER__) = 1/(!!(e)) }) 0)
+ ((enum { ASSERT_CONCAT(static_assert_, __COUNTER__) = 1/(!!(e)) }) 0)
#else
// This can't be used twice on the same line so ensure if using in headers
// that the headers are not included twice (by wrapping in #ifndef...#endif)
// Note it doesn't cause an issue when used on same line of separate modules
// compiled with gcc -combine -fwhole-program.
# define STATIC_ASSERT_EXPR(e, m) \
- ((enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) }) 0)
+ ((enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) }) 0)
#endif
/// @def STRICT_ADD
diff --git a/src/nvim/autocmd.h b/src/nvim/autocmd.h
index 1c0f88f08f..ac12e2acf3 100644
--- a/src/nvim/autocmd.h
+++ b/src/nvim/autocmd.h
@@ -17,22 +17,22 @@ typedef struct {
} aco_save_T;
typedef struct AutoCmd {
- char_u *cmd; // Command to be executed (NULL when
- // command has been removed)
+ char_u *cmd; // Command to be executed (NULL when
+ // command has been removed)
bool once; // "One shot": removed