summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/lua/xdiff.c
AgeCommit message (Collapse)AuthorFiles
2025-08-14refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl1
These are not needed after #35129 but making uncrustify still play nice with them was a bit tricky. Unfortunately `uncrustify --update-config-with-doc` breaks strings with backslashes. This issue has been reported upstream, and in the meanwhile auto-update on every single run has been disabled.
2025-07-12refactor(lua): rename vim.diff => vim.text.diff #34864Justin M. Keyes1
Problem: `vim.diff()` was introduced before we had the `vim.text` module, where it obviously belongs. Solution: Move it.
2025-05-04feat(messages): cleanup Lua error messagesJustin M. Keyes1
"Error" in error messages is redundant. Just provide the context, don't say "Error ...".
2024-12-23refactor: iwyu #31637Justin M. Keyes1
Result of `make iwyu` (after some "fixups").
2024-09-30fix(diff): use mmfile_t in linematchLewis Russell1
Problem: Linematch used to use strchr to navigate a string, however strchr does not supoprt embedded NULs. Solution: Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`. Also remove heap allocations from `matching_char_iwhite()` Fixes: #30505
2024-08-29 fix(build): issues with s390x CIbfredl1
Does not fix everything, but at least let's test run to finish before timeout
2024-02-13refactor(lua): use a keyset for vim.diff opts parsingbfredl1
2024-02-13refactor(lua): use Arena when converting from lua stack to API argsbfredl1
and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
2024-01-11refactor(IWYU): fix headersdundargoc1
Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
2023-12-21refactor: run IWYU on entire repodundargoc1
Reference: https://github.com/neovim/neovim/issues/6371.
2023-12-18docs: add style rule regarding initializationdundargoc1
Specifically, specify that each initialization should be done on a separate line.
2023-11-29refactor: move function macros out of vim_defs.h (#26300)zeertzjq1
2023-11-28refactor: fix headers with IWYUdundargoc1
2023-11-27build(IWYU): fix includes for undo_defs.hdundargoc1
2023-11-20refactor: enable formatting for ternariesdundargoc1
This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
2023-11-16refactor: iwyu (#26062)zeertzjq1
2023-11-12build: remove PVSdundargoc1
We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
2023-11-05refactor: the long goodbyedundargoc1
long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
2023-10-23build(lint): remove unnecessary clint.py rulesdundargoc1
Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
2023-10-09refactor: the long goodbyedundargoc1
long is 32 bits on windows, while it is 64 bits on other architectures. This makes the type suboptimal for a codebase meant to be cross-platform. Replace it with more appropriate integer types.
2023-09-30build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq1
2023-04-26refactor: uncrustifydundargoc1
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
2023-04-04feat(vim.diff): allow passing an integer for linematchLewis Russell1
2023-02-11build: enable MSVC level 3 warnings (#21934)dundargoc1
MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
2022-11-15build: allow IWYU to fix includes for all .c filesdundargoc1
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-05fix(vim.diff): fix fastforward off-by-1 (#20937)Lewis Russell1
2022-11-04fix(vim.diff): correctly apply hunk offsets with linematch (#20931)Lewis Russell1
2022-11-04fix(diff): remove size_t underflow (#20929)Lewis Russell1
2022-11-04Enable new diff option linematch (#14537)Jonathon1
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-08-11refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq1
vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
2022-04-29refactor(uncrustify): change rules to better align with the style guideDundar Goc1
Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
2022-03-09chore(lgtm): fix "empty block without comment" warningsDundar Göc1
2022-02-05fix(diff): make algorithm work for vim.diff (#17300)Lewis Russell1
Fixes #17207
2021-11-19refactor: saner options for uncrustify (#16204)dundargoc1
* 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-10-19refactor: remove space after starDundar Göc1
2021-10-01refactor: update path to xdiff in commentsDundar Göc1
2021-09-25refactor: format with uncrustify #15778dundargoc1
* fixup: force exactly one whitespace between type and variable
2021-09-21ci(PVS): PVS/V009: add required header #15751dundargoc1
2021-09-19refactor: format with uncrustify #15722dundargoc1
2021-09-08vim-patch:8.2.3390: included xdiff code is outdatedChristian Clason1
Problem: Included xdiff code is outdated. Solution: Sync with xdiff in git 2.33. (Christian Brabandt, closes vim/vim#8431) https://github.com/vim/vim/commit/ba02e4720f863fdb456e7023520f0a354eec0dcf
2021-08-22feat(api): add lua C bindings for xdiff (#14536)Lewis Russell1
* feat(api): add lua C bindings for xdiff * chore: opt.hunk_lines -> opt.result_type opt.on_hunk now takes precedence over opt.result_type * chore: fix indents Fix indents * chore: change how priv is managed Assign priv NULL and unconditionally apply XFREE_CLEAR to it when finished.