dundargoc
4c531714ff
refactor: replace char_u with char 25 ( #21838 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-19 22:25:56 +08:00
dundargoc
0344bfad0f
refactor: replace char_u with char 22 ( #21786 )
...
Work on https://github.com/neovim/neovim/issues/459
2023-01-17 21:17:40 +08:00
dundargoc
f2141de9e4
refactor: replace char_u with char 20 ( #21714 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-13 07:35:39 +08:00
dundargoc
ec1738a6ed
refactor: replace char_u with char 16 - remove STRNCMP ( #21208 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-12-21 19:00:05 +08:00
Dundar Göc
bd22585061
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-11-26 15:52:21 +01:00
dundargoc
66360675cf
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.
2022-11-15 10:30:03 +01:00
bfredl
fae7540732
Merge pull request #20821 from dundargoc/refactor/clang-tidy
...
refactor: fix clang-tidy warnings
2022-11-08 09:48:48 +01:00
Lewis Russell
bdb98de2d1
refactor: more clint ( #20910 )
2022-11-07 10:21:44 +00:00
dundargoc
731cdde28e
refactor: fix clang-tidy warnings
...
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
2022-11-06 11:44:10 +01:00
dundargoc
b05d1943f0
build(lint): remove clint.py rules for braces #20880
...
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
See also https://github.com/neovim/neovim/pull/18563
2022-11-01 07:39:49 -07:00
dundargoc
6d557e324f
vim-patch:8.1.0941: macros for MS-Windows are inconsistent ( #20215 )
...
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes vim/vim#3932 )
4f97475d32
2022-09-18 09:17:15 +08:00
Dundar Göc
3ff46544c9
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-11 13:28:59 +02:00
Dundar Göc
c5322e752e
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-09 21:02:42 +02:00
Dundar Göc
73207cae61
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-06 16:44:37 +02:00
dundargoc
12afc344de
refactor: migrate comment style 2 #20080
2022-09-06 07:23:00 -07:00
Lewis Russell
1ffd527c83
refactor: migrate comment style ( #20012 )
...
Done automatically using the following perl command:
perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-09-02 17:39:49 +01:00
Dundar Göc
49e893f296
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-01 10:47:42 +02:00
dundargoc
2828aae7b4
refactor: replace char_u with char 4 ( #19987 )
...
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-08-30 14:52:09 +02:00
Dundar Göc
58f30a326f
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-29 15:48:56 +02:00
Lewis Russell
93f24403f8
refactor: pre-incr to post-incr
2022-08-25 13:10:41 +01:00
Lewis Russell
542fa8a9cc
refactor: change pre-decrement/increment to post ( #19799 )
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-08-16 12:26:08 +01:00
Dundar Goc
094cdf2d69
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-12 14:22:02 +02:00
Lewis Russell
bcb4186cf6
refactor: replace_makeprg ( #19570 )
2022-08-01 12:02:53 +01:00
Dundar Goc
824a729628
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-07-31 00:52:59 +02:00
kylo252
7b952793d5
refactor: missing parenthesis may cause unexpected problems ( #17443 )
...
related vim-8.2.{4402,4639}
2022-05-26 10:49:25 +08:00
dundargoc
9fec6dc9a2
refactor(uncrustify): set maximum number of consecutive newlines to 2 ( #18695 )
2022-05-25 12:31:14 -06:00
James McCoy
b3453ea4a6
Merge pull request #18648 from jamessan/coverity-fixes
2022-05-20 14:22:15 -04:00
Dundar Goc
1a0de90068
refactor: move reverse_text to strings.c as it's a string operation
...
Also add tests for reverse_text.
Co-authored-by: Kalle Ranki <kalle.ranki@gmail.com >
2022-05-20 16:11:54 +02:00
James McCoy
501ee06d3a
fix(cid/352782): assert str->items is non-NULL to hint static analyzers
...
The earlier vsnprintf() call checks whether str->items is NULL, sets of
the "possible NULL" spidey sense. kv_ensure_space() guarantees
str->items is non-NULL but since it doesn't use NULL checks to decide
whether to alloc, static analyzers can't tell this code path is safe.
2022-05-20 08:17:33 -04:00
Dundar Goc
5084b6fb92
fix(PVS/V568): correct placement of ignore directive
2022-05-17 22:26:25 +02:00
Dundar Goc
f0148de790
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-16 13:27:06 +02:00
dundargoc
793496aecc
fix PVS warnings ( #18459 )
...
* fix(PVS/V547): remove ifs that are always true or false
* fix(PVS/V560): remove partial conditions that are always true
* fix(PVS/V1044): suppress warning about loop break conditions
* fix(PVS/V1063): suppress "modulo by 1 operation is meaningless"
* fix(PVS/V568): suppress "operator evaluates the size of a pointer"
Also mark vim-patch:8.2.4958 as ported.
2022-05-15 21:04:56 +08:00
Famiu Haque
566f8f80d6
refactor(api/nvim_cmd): use kvec_t
for constructing cmdline string
...
Co-authored-by: Björn Linse <bjorn.linse@gmail.com >
2022-05-14 10:25:52 +06:00
Dundar Goc
e31b32a293
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-09 10:03:29 +02:00
Dundar Goc
2a378e6e82
refactor: replace char_u variables and functions with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-05-07 14:54:01 +02:00
Dundar Goc
21a31ea929
refactor: enable -Wconversion warning for edit.c
...
Work on https://github.com/neovim/neovim/issues/567
2022-05-06 11:00:29 +02:00
Dundar Goc
88270a5735
refactor: add function xstrnsave
...
xstrnsave is a clone of vim_strnsave that uses char* instead of char_u*.
Its purpose short-term is to help reduce the number of casts and for
long-term to replace vim_strnsave as the need to use char_u is
eliminated.
2022-04-16 18:09:26 +02:00
Dundar Göc
4d2744ffe3
refactor: fix clang-tidy bugprone-signed-char-misuse warnings
...
Prefer to declare variables with correct type instead of explicit casts
wherever possible.
2022-03-04 19:52:41 +01:00
zeertzjq
658ef9c01e
vim-patch:8.2.3663: using %S in printf() does not work correctly
...
Problem: Using %S in printf() does not work correctly.
Solution: Fix the problem and add more tests. (closes vim/vim#9208 )
1f2453fec6
2022-01-16 17:37:06 +08:00
zeertzjq
9afefd32d3
vim-patch:8.2.3630: printf() with %S does not handle multi-byte correctly
...
Problem: Printf() with %S does not handle multi-byte correctly.
Solution: Count cells instead of bytes. (closes vim/vim#9169 , closes vim/vim#7486 )
d85fccdfed
2022-01-16 17:37:06 +08:00
Björn Linse
df54d82b7c
refactor(misc1): move out high-level input functions to a new file: input.c
...
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
2021-12-10 18:15:33 +01:00
Claes Nästén
8f1fdbc54a
fix: add STRNLEN compatability macro
...
Older SunOS systems come without strnlen, add STRNLEN macro in line with
the other str* compat macros.
2021-12-06 17:34:26 +01:00
dundargoc
725cbe7d41
refactor: saner options for uncrustify ( #16204 )
...
* sp_enum_after_assign = force
* sp_brace_typedef = force
* nl_do_brace = remove
* sp_do_brace_open = force
* sp_brace_close_while = force
* sp_before_semi = remove
* sp_before_semi_for = remove
* sp_before_semi_for_empty = remove
* sp_between_semi_for_empty = remove
* sp_after_semi_for_empty = remove
* sp_before_square = remove
* sp_before_squares = remove
* sp_inside_square = remove
* sp_inside_fparens = remove
* sp_inside_fparen = remove
* sp_inside_tparen = remove
* sp_after_tparen_close = remove
* sp_return_paren = force
* pos_bool = lead
* sp_pp_concat = remove
* sp_pp_stringify = remove
* fixup: disable formatting for the INIT section
2021-11-19 14:21:53 -05:00
Björn Linse
1450a6f753
refactor(macroman): get rid of MB_COPY_CHAR macro
...
clean up docs for MB_PTR_ADV and MB_PTR_BACK
2021-11-14 17:08:50 +01:00
Björn Linse
0039ba04b0
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
2021-11-14 12:49:12 +01:00
James McCoy
efa924f66b
vim-patch:8.1.0743: giving error messages is not flexible
...
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302 ) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
f9e3e09fdc
2021-11-01 06:41:28 -04:00
dundargoc
a68faed02d
refactor: saner options for uncrustify #16196
...
* refactor: general good option changes
sp_deref = remove
sp_not = remove
sp_inv = remove
sp_inside_paren_cast = remove
mod_remove_duplicate_include = true
sp_after_semi = add
sp_after_semi_for = force
sp_sizeof_paren = remove
nl_return_expr = remove
nl_else_brace = remove
nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
2021-10-31 17:03:08 -07:00
dundargoc
9c268263b1
refactor: format with uncrustify #15842
...
* refactor: format with uncrustify
* refactor: convert function comments to doxygen
2021-10-02 07:59:41 -07:00
Jason Cox
d3c6f1ebbb
vim-patch:8.2.3393: escaping for fish shell is skipping some characters
...
Problem: Escaping for fish shell is skipping some characters.
Solution: Escape character after backslash if needed. (Jason Cox,
closes vim/vim#8827 )
6631597452
2021-09-02 13:07:29 -06:00
Jason Cox
85ba41a4b3
vim-patch:8.2.3385: escaping for fish shell does not work properly
...
Problem: Escaping for fish shell does not work properly.
Solution: Insert a backslash before a backslash. (Jason Cox, closes vim/vim#8810 )
6e82351130
2021-09-02 13:07:29 -06:00