aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
Commit message (Collapse)AuthorAge
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* fix PVS warnings (#18459)dundargoc2022-05-15
| | | | | | | | | | | | | * 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.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* vim-patch:8.2.4402: missing parenthesis may cause unexpected problemsBrian Leung2022-04-03
| | | | | | Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
* vim-patch:8.2.4639: not sufficient parenthesis in preprocessor macrosBrian Leung2022-04-03
| | | | | | Problem: Not sufficient parenthesis in preprocessor macros. Solution: Add more parenthesis. https://github.com/vim/vim/commit/9dac9b1751dd43c02470cc6a2aecaeea27abcc80
* feat(statusline): support multibyte fillcharzeertzjq2022-01-16
| | | | | | | | This includes a partial port of Vim patch 8.2.2569 and some changes to nvim_eval_statusline() to allow a multibyte fillchar. Literally every line of C code touched by that patch has been refactored in Nvim, and that patch contains some irrelevant foldcolumn tests I'm not sure how to port (as Nvim's foldcolumn behavior has diverged from Vim's).
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* refactor(macroman): get rid of MB_COPY_CHAR macroBjörn Linse2021-11-14
| | | | clean up docs for MB_PTR_ADV and MB_PTR_BACK
* refactor(macros): delete multibyte macros which just are aliasesBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_char2len alias for utf_char2lenBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* refactor: uncrustify #16090dundargoc2021-10-29
|
* refactor: format all C files under nvim/ #15977dundargoc2021-10-12
| | | | | | | | * refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
* buffer: move BUFEMPTY to a functionThomas Vigouroux2021-07-06
|
* buffer: don't rely on curbuf in BUFEMPTYThomas Vigouroux2021-07-06
|
* PVS/V1051: Ignore "modulo by 1" warning for ARRAY_SIZE. (#14943)dundargoc2021-07-03
| | | | | The warning is triggered by the second division when arr is a char array since sizeof(char) is 1. A modulo by 1 may normally indicate a logic error, but in this case it's intended.
* macros: add a dummy statement to allow FALLTHROUGH in an empty case.Björn Linse2021-06-11
|
* vim-patch:8.2.0877: cannot get the search statisticsshadmansaleh2021-05-09
| | | | | | | | | | | | Problem: Cannot get the search statistics. Solution: Add the searchcount() function. (Fujiwara Takuya, closes vim/vim#4446) https://github.com/vim/vim/commit/e8f5ec0d30b629d7166f0ad03434065d8bc822df Additional changes: - Tests weren't passing because the test ran assuming the cursor was at start of buffer but append() left the cursor at end of buffer . So cursor is moved to start of buffer after append. - searchcount() added to list of builtin functions.
* macros.h: Remove unused CURSOR_BAR_RIGHT macro. (#13506)Edwin Pujols2020-12-11
| | | Closes #13505.
* Only use __has_include when it is definedJames McCoy2020-09-20
| | | | | | | | | | | | | | Per GCC's documentation: > The __has_include operator by itself, without any operand or parentheses, acts as a predefined macro so that support for it can be tested in portable code. Thus, the recommended use of the operator is as follows: > > #if defined __has_include > # if __has_include (<stdatomic.h>) > # include <stdatomic.h> > # endif > #endif > > The first ‘#if’ test succeeds only when the operator is supported by the version of GCC (or another compiler) being used. Only when that test succeeds is it valid to use __has_include as a preprocessor operator.
* Disable -Wimplicit-fallthrough for funcs.generated.hJames McCoy2020-08-23
| | | | | | This is code generated by gperf, so there's nothing we can do about it. The code does have /*FALLTHROUGH*/ comments but clang doesn't recognize them.
* vim-patch:8.1.2366: using old C style commentsJan Edmund Lazo2020-04-12
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/9bf703d46a79fbffeb829246ea5ce385bddc4166
* vim-patch:8.1.2120: some MB_ macros are more complicated than necessaryJan Edmund Lazo2019-10-06
| | | | | | | Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline. https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
* vim-patch:8.1.0362: cannot get the script line number when executing a functionerw72019-09-04
| | | | | | | Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes vim/vim#3362) Also display the line number with ":verbose set". https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
* vim-patch:8.0.1236: Mac features are confusing #10837Jan Edmund Lazo2019-08-24
| | | | | | Problem: Mac features are confusing. Solution: Make feature names more consistent, add "osxdarwin". Rename feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes vim/vim#2178) https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9
* Merge #10645 from janlazo/vim-8.1.0999Justin M. Keyes2019-07-29
|\ | | | | vim-patch:8.1.{1005,1041,1049,1052,1053,1086,1394}
| * vim-patch:8.1.1086: too many curly bracesJan Edmund Lazo2019-07-28
| | | | | | | | | | | | | | | | | | | | Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes vim/vim#3982) https://github.com/vim/vim/commit/abab0b0fdd6535969447b03a4fffc1947918cf6c Neovim code style requires the opposite. Add curly braces to minimize lint errors when applying Vim patches.
* | build/macOS: enable fallthrough attribute #10653Gavin D. Howard2019-07-29
|/
* cleanup: remove mch_fopen in favor of os_fopenJustin M. Keyes2019-07-25
|
* os/fs: introduce os_fopen()Justin M. Keyes2019-07-25
| | | | | | | Windows: Using fopen() directly may need UTF-16 filepath conversion. To achieve that, os_fopen() goes through os_open(). fix #10586
* build: PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPESJustin M. Keyes2019-02-04
| | | | | | | | | | | | On Travis CI, -Wmissing-prototypes gives strange error: In file included from ../src/nvim/eval.c:5965: /home/travis/build/neovim/neovim/build/src/nvim/auto/funcs.generated.h.gperf:215:1: error: conflicting types for 'find_internal_func_gperf' find_internal_func_gperf (register const char *str, register unsigned int len) ^ ../src/nvim/eval.c:5962:20: note: previous declaration is here const VimLFuncDef *find_internal_func_gperf(register const char *str, ^
* lint: cleanup after parent commitsZviRackover2018-08-16
|
* Remove occurences of mb_head_offZviRackover2018-08-15
|
* Remove all occurences of the mb_ptr2char macroZviRackover2018-08-06
| | | | | | | First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* macros: Rename LAST_ARRAY_ENTRY to ARRAY_LAST_ENTRYZyX2018-03-27
|
* shada: Save numbered marksZyX2018-03-26
| | | | | | | Problems so far: - Marks in the current instance are not adjusted. - Duplicates are not removed (not that it works in Vim either now, not at 8.0.134 at least).
* build/MSVC: fix "C4005: RGB: macro redefinition"Justin M. Keyes2018-03-18
|
* vim-patch:8.0.0448: some macros are lower case (#7936)KunMing Xie2018-01-30
| | | | | | | Problem: Some macros are in lower case, which can be confusing. Solution: Make a few lower case macros upper case. https://github.com/vim/vim/commit/b5aedf3e228d35821591da9ae8501b61cf2e264c ref #6297
* Make 'langnoremap' apply directly after a mapMatthew Malcomson2018-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | We were initially checking whether to apply 'langmap' translation based on typebuf.tb_maplen. This gets set to 0 on the last byte of a map when the del_typebuf() function is called, which means that the option was not working for the last character of a mapping. For this reason, we switched to using KeyTyped to decide whether to apply the transformation or not in commit 53da57d27. Substituting one for the other isn't enough, because KeyTyped isn't set until vgetorpeek() is returning. This means 'langmap' translations are not applied when searching for characters to map in the vgetorpeek() function if the *previous* key was not typed. We can't assert that both hold, as we would then *not* apply the transformation when looking for a map starting with the first typed key after a previously expanded map (as KeyTyped would be `false` from the previously expanded map, and not yet reset). Hence we assert that if we are looking for the mapping while in vgetorpeek(), the map length should be zero, otherwise, KeyTyped must be `true`. This is implemented by checking for the variable `vgetc_busy`.
* Merge #7863 'mingw64: fix gcc warnings'Justin M. Keyes2018-01-20
|\
| * Fix warning, read/write have unsigned int count on windows.George Zhao2018-01-19
| |
| * Fix warning when assing size_t type value to uv_buf_t.len, convert type to ↵George Zhao2018-01-18
| | | | | | | | ULONG on Windows.
| * Fix warning when redefine RGB on WindowsGeorge Zhao2018-01-18
|/ | | | 1
* *: Fix all V641 errorsZyX2017-05-20
|
* *: Use __attribute__((fallthrough)) where comments aren't supportedJames McCoy2017-05-12
| | | | | | | | | Although GCC now detects possibly unintentional fall through, there rules around which the comments are detected are rather strict. In cases where a comment isn't detected, upstream [recommends] using their fallthrough attribute. [recommends]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817#c11
* macros: Fix excessive checkZyX2017-04-16
|
* refactor: pos_T macros to functions (#6496)Felipe Oliveira Carvalho2017-04-11
|