aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent_c.c
Commit message (Collapse)AuthorAge
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* docs: fix typos (#19588)dundargoc2022-08-03
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
* vim-patch:9.0.0095: conditions are always truezeertzjq2022-07-28
| | | | | | Problem: Conditions are always true. Solution: Remove useless conditions. (closes vim/vim#10802) https://github.com/vim/vim/commit/122dea70073d140aa89212d344c3f62bd3b5b3fa
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* vim-patch:8.2.4968: reading past end of the line when C-indentingzeertzjq2022-05-17
| | | | | | Problem: Reading past end of the line when C-indenting. Solution: Check for NUL. https://github.com/vim/vim/commit/60ae0e71490c97f2871a6344aca61cacf220f813
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): enable formatting for regexp and indent files (#18549)dundargoc2022-05-14
| | | | | | | | The formatting for these files were originally disabled as to signal that "we don't own these files", meaning we intentionally want to minimize the amount of work put in these files as the return will be very little. This unfortunately conflicts with other refactoring efforts that happen to touch these files, and it's easier to simply enable formatting.
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4703: memory leak in handling 'cinscopedecls'Tom Praschan2022-04-09
| | | | | | Problem: Memory leak in handling 'cinscopedecls'. Solution: Free the memory before returning. https://github.com/vim/vim/commit/cb49a1d934d38cbc0d445af59b71ffe45cbcae75
* vim-patch:8.2.4702: C++ scope labels are hard-codedTom Praschan2022-04-09
| | | | | | | Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Tom Praschan, closes vim/vim#10109) https://github.com/vim/vim/commit/3506cf34c17c5eae6c2d1317db1fcd5a8493c288
* refactor(indent_c.c): add const qualifierszeertzjq2022-01-31
|
* vim-patch:8.2.3938: line comment start is also found in a stringzeertzjq2022-01-31
| | | | | | Problem: Line comment start is also found in a string. Solution: Skip line comments in a string. https://github.com/vim/vim/commit/ba26367fea3b63df49d274f3d5cca0af38402add
* vim-patch:8.2.3787: no proper formatting of a C line comment after a statementzeertzjq2022-01-31
| | | | | | | Problem: No proper formatting of a C line comment after a statement. Solution: Find the start of the line comment, insert the comment leader and indent the comment properly. https://github.com/vim/vim/commit/6e371ecb27227ff8fedd8561d0f3880a17576848
* Merge pull request #16748 from zeertzjq/vim-8.1.1434zeertzjq2022-01-31
|\ | | | | vim-patch:8.1.{1434,1585},8.2.{3482,3625,3876}: some cindent patches
| * vim-patch:8.2.3876: 'cindent' does not recognize inline namespacezeertzjq2021-12-23
| | | | | | | | | | | | Problem: 'cindent' does not recognize inline namespace. Solution: Skip over "inline" to find "namespace". (closes vim/vim#9383) https://github.com/vim/vim/commit/f2f0bddf303e37d4d532ca22e2d53179c20b1d19
| * vim-patch:8.2.3625: illegal memory access when C-indentingzeertzjq2021-12-23
| | | | | | | | | | | | Problem: Illegal memory access when C-indenting. Solution: Also set the cursor column. https://github.com/vim/vim/commit/2de9b7c7c8791da8853a9a7ca9c467867465b655
| * vim-patch:8.2.3482: reading beyond end of line ending in quote and backslashzeertzjq2021-12-23
| | | | | | | | | | | | Problem: Reading beyond end of line ending in quote and backslash. Solution: Check for non-NUL after backslash. (closes vim/vim#8964) https://github.com/vim/vim/commit/78e0fa4cf4fcd563c0bc8c87afa54d4f5dc22020
* | chore: fix compiler warning for multi-line comment (#16812)zeertzjq2021-12-28
| |
* | vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
|/ | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* 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
* indent_c: pvs/v1071Jan Edmund Lazo2021-06-05
| | | | "void" cast unused return value of find_last_paren().
* vim-patch:8.1.0874: using old style comments in new fileJan Edmund Lazo2021-03-29
| | | | | | Problem: Using old style comments in new file. Solution: Convert to // comments in new file. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/9c46efd7dc57c1a8eae5137d05c7e67c4f82c3d7
* vim-patch:8.2.0864: pragmas are indented all the way to the leftJan Edmund Lazo2020-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Pragmas are indented all the way to the left. Solution: Add an option to indent progmas like normal code. (Max Rumpf, closes vim/vim#5468) https://github.com/vim/vim/commit/d881b516da0184052d2f9d33c3f72c5c014316bd N/A patches for version.c: vim-patch:8.1.2030: tests fail when build with normal features and terminal Problem: Tests fail when build with normal features and terminal. (Dominique Pelle) Solution: Disable tests that won't work. (closes vim/vim#4932) https://github.com/vim/vim/commit/997d42427eaab889058eb047e08d55de9e4a968a vim-patch:8.1.2063: some tests fail when +balloon_eval_term is missing Problem: Some tests fail when +balloon_eval_term is missing but _balloon_eval is present. (Dominique Pelle) Solution: Check the right feature in the test. (closes vim/vim#4962) https://github.com/vim/vim/commit/1e82a784ace6d2c4dce594dd6156bcb0028bba9e vim-patch:8.2.1938: wiping out a terminal buffer makes some tests fail Problem: Wiping out a terminal buffer makes some tests fail. Solution: Do not wipe out the terminal buffer unless wanted. https://github.com/vim/vim/commit/a46765a79745ff27b4a44659fb8389519c961977
* pvs/v1048: variable was assigned same valueJan Edmund Lazo2020-03-01
|
* vim-patch:8.2.0112: illegal memory access when using 'cindent'Jan Edmund Lazo2020-01-17
| | | | | | Problem: Illegal memory access when using 'cindent'. Solution: Check for NUL byte. (Dominique Pelle, closes vim/vim#5470) https://github.com/vim/vim/commit/02ad46394e8f887b60fda994f8a5da2ac1937b23
* lintJustin M. Keyes2019-09-13
|
* getdigits: introduce `strict`, `def` parametersJustin M. Keyes2019-09-13
| | | | | | | | | | | | Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555
* Remove excess <stdint.h>Jan Edmund Lazo2019-09-11
|
* lintJan Edmund Lazo2018-08-23
|
* vim-patch:8.0.0999: indenting raw C++ strings is wrongJan Edmund Lazo2018-08-23
| | | | | | Problem: Indenting raw C++ strings is wrong. Solution: Add special handling of raw strings. (Christian Brabandt) https://github.com/vim/vim/commit/dde81312b031211752d1fcb8539d79f90f324a2e
* vim-patch:8.0.0431 (#7908)KunMing Xie2018-01-25
| | | | | | | vim-patch:8.0.0431: 'cinoptions' cannot set indent for extern block Problem: 'cinoptions' cannot set indent for extern block. Solution: Add the "E" flag in 'cinoptions'. (Hirohito Higashi) https://github.com/vim/vim/commit/7720ba8599162fbbb8f7fc034f674a2ccd3ca7f1
* vim-patch:8.0.0423: changing 'cinoptions' does not always workckelsel2018-01-20
| | | | | | | | Problem: The effect of adding "vim/vim#" to 'cinoptions' is not always removed. (David Briscoe) Solution: Reset b_ind_hash_comment. (Christian Brabandt, closes vim/vim#1475) https://github.com/vim/vim/commit/6b64394f346594404cffb9591d71ac693040679f
* vim-patch:8.0.0148 #7344ckelsel2017-10-07
| | | | | | | | | Problem: When a C preprocessor statement has two line continuations the following line does not have the right indent. (Ken Takata) Solution: Add the indent of the previous continuation line. (Hirohito Higashi) https://github.com/vim/vim/commit/c6aa475a27e3ed1645446b014c32ebf68d005d49
* vim-patch:8.0.0092Lech Lorens2017-08-21
| | | | | | | | Problem: C indenting does not support nested namespaces that C++ 17 has. Solution: Add check that passes double colon inside a name. (Pauli, closes vim/vim#1214) https://github.com/vim/vim/commit/ca8b8d6956dd881de6446fc32c38e817a364a6cc
* vim-patch:7.4.2360Michael Ennen2017-06-08
| | | | | | | Problem: Invalid memory access when formatting. (Dominique Pelle) Solution: Make sure cursor line and column are associated. https://github.com/vim/vim/commit/80c3fd7c559c7d329d57afe10db9bfb0adf10e46
* *: Add comment to all C filesZyX2017-04-19
|
* refactor: pos_T macros to functions (#6496)Felipe Oliveira Carvalho2017-04-11
|
* *: Fix some Windows-specific warningsZyX2017-03-29
| | | | Also fixed an error in path_fnamecmp().
* win: fix warningsJustin M. Keyes2017-01-19
|
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* vim-patch:7.4.912watiko2016-02-15
| | | | | | | Problem: Wrong indenting for C++ constructor. Solution: Recognize ::. (Anhong) https://github.com/vim/vim/commit/e01f4f86cef7bed3cb99b26f9f57d86f6eb5fe1a
* vim-patch:7.4.893watiko2016-02-15
| | | | | | | | Problem: C indenting is wrong below a "case (foo):" because it is recognized as a C++ base class construct. Issue #38. Solution: Check for the case keyword. https://github.com/vim/vim/commit/d1b15dec4d00d7ed5e92ff4e0fb7fc2e0818e479
* vim-patch:7.4.891watiko2016-02-15
| | | | | | | | Problem: Indentation of array initializer is wrong. Solution: Avoid that calling find_start_rawstring() changes the position returned by find_start_comment(), add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/089af18d1fd0961ff504ee72db0156bbfe509cdf
* Fix linting errors.Johan Klokkhammer Helsing2015-12-13
|