aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
Commit message (Collapse)AuthorAge
* 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
|
* win: mch_open_rw: specify S_IWRITE #6487erw72017-04-11
| | | | | | | | | | | | | | | | | | | | | | On Windows, `mch_open_rw` is not actually doing what it claims. This manifests as "E301: Oops, lost the swap file !!!" when filename is changed with :file {name}. Steps to reproduce (covered by test/functional/ex_cmds/file_spec.lua): nvim -u NONE :edit test :file test2 E301 Oops, lost the swap file!!! From libuv/src/win/fs.c: void fs__open(uv_fs_t* req) { ... attributes |= FILE_ATTRIBUTE_NORMAL; if (flags & _O_CREAT) { if (!((req->fs.info.mode & ~current_umask) & _S_IWRITE)) { attributes |= FILE_ATTRIBUTE_READONLY; } }
* mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
|
* vim-patch:7.4.2236lonerover2017-04-01
| | | | | | | | | | Problem: The 'langnoremap' option leads to double negatives. And it does not work for the last character of a mapping. Solution: Add 'langremap' with the opposite value. Keep 'langnoremap' for backwards compatibility. Make it work for the last character of a mapping. Make the test work. https://github.com/vim/vim/commit/920694c1b60fac8017b8909efcc24f189804a9bb
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* vim-patch:7.4.2223James McCoy2017-03-11
| | | | | | | Problem: Buffer overflow when using latin1 character with feedkeys(). Solution: Check for an illegal character. Add a test. https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
* tui: "backpressure": Drop messages to avoid flooding.Justin M. Keyes2016-12-09
| | | | | | | | | Closes #1234 multiqueue: - Implement multiqueue_size() - Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion with MultiQueue.parent.
* encoding: cleanup mbyte.c given fixed encoding=utf-8Björn Linse2016-11-05
| | | | | | | | | Eliminate mb_init(): Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like". init_chartab() and screenalloc() are already invoked elsewhere in the initialization process. The EncodingChanged autocmd cannot be triggered. At initialization, there is no spellfiles to reload
* vim-patch:7.4.1147 (#5005)prollings2016-07-10
| | | | | | | Problem: Conflict for "chartab". (Kazunobu Kuriyama) Solution: Rename the global one to something less obvious. Move it into src/chartab.c. https://github.com/vim/vim/commit/88e8f9f14434a7cd538d0c159dc432bea869a5bd
* eval: Split out typval_T dumping functions to nvim/encode.cZyX2016-04-18
|
* src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.
* Move MAX and MIN macros to macros.hMichael Reed2015-08-25
| | | | | | | | vim.h is too big, and these were missing parens around the arguments. These may already be defined in <sys/param.h> or <windef.h>, so guard them with an #ifndef. extracted from #810
* completion: Add v:completed_item feature #2563Shougo Matsushita2015-05-24
| | | | | | | Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Luke Andrew <luke.github@la.id.au> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Florian Walch <florian@fwalch.com>
* Passing by: wrap mb_ptr_adv(), mb_cptr_adv(), mb_ptr_back() macros in ↵Mark Bainter2015-05-06
| | | | parenthesis.
* Remove char_u: make_percent_swname()Mark Bainter2015-05-06
|
* Remove char_u: modname()Mark Bainter2015-05-06
|