aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
Commit message (Collapse)AuthorAge
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 21 (#21779)dundargoc2023-01-14
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 17 - remove STRLCPY (#21235)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* fix(diff): avoid restoring invalid 'foldcolumn' value (#21650)zeertzjq2023-01-05
| | | | Use "0" for 'foldcolumn' when w_p_fdc_save is empty, like how "manual" is used for 'foldmethod' when w_p_fdm_save is empty.
* vim-patch:9.0.1098: code uses too much indent (#21540)zeertzjq2022-12-26
| | | | | | | | Problem: Code uses too much indent. Solution: Use an early return. (Yegappan Lakshmanan, closes vim/vim#11747) https://github.com/vim/vim/commit/465de3a57b815f1188c707e7c083950c81652536 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(diff): fix a crash in diff mode with linematch enabled (#21070)Jonathon2022-12-02
| | | | | Problem: With two files open side by side in diff mode and deleting all of the contents of one file, the w_topfill value, which indicates the number of filler lines at the top of the window is set to be a negative number, and it will result in the virtual_lines_passed variable also being negative, and this while loop will run when it shouldn't. While calculating where the cursor and topline should be with linematch enabled, this topfill value is used to put the cursor and top line where it should be in the other windows. If that topfill number is negative, this causes a segfault. Solution: Check for positive top fill.
* feat(aucmd_win): allow crazy things with hidden buffers (#21250)zeertzjq2022-12-02
| | | | Problem: Crash when doing crazy things with hidden buffers. Solution: Dynamically allocate the list of autocommand windows.
* fix: clang warnings (#21247)zeertzjq2022-12-01
|
* vim-patch:9.0.0965: using one window for executing autocommands is insufficientzeertzjq2022-11-29
| | | | | | | | | | | | | | | | | | Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands. https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a N/A patches for version.c: vim-patch:9.0.0966: some compilers don't allow a declaration after a label Problem: Some compilers don't allow a declaration after a label. Solution: Move the declaration to the start of the block. (John Marriott) https://github.com/vim/vim/commit/f86490ed4fdab213a28f667abd055c023a73d645 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: replace char_u with chardundargoc2022-11-28
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-11-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-11-19
| | | | Work on https://github.com/neovim/neovim/issues/459
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | 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.
* refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | 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.
* Enable new diff option linematch (#14537)Jonathon2022-11-04
| | | Co-authored-by: Lewis Russell <me@lewisr.dev>
* fix(diff.c): regression in diffgetput (#20843)Lewis Russell2022-10-28
|
* refactor(diff.c): copy lines via memmoveLewis Russell2022-10-25
|
* refactor(diff.c): factor out diffblock deletionLewis Russell2022-10-25
|
* refactor(diff.c): internal does not need diffstyleLewis Russell2022-10-24
|
* refactor(diff.c): simplify diff_buf_idx()Lewis Russell2022-10-24
|
* refactor(diff.c): factor out hunk processingLewis Russell2022-10-24
|
* refactor(diff.c): factor out hunk extractionLewis Russell2022-10-24
|
* refactor(diff.c): allocate hunks directly in ga_arrayLewis Russell2022-10-24
|
* refactor(diff.c): remove char_u declarationsLewis Russell2022-10-24
|
* refactor(diff.c): break up ex_diffgetput()Lewis Russell2022-10-23
| | | | | | | Problem: ex_diffgetput is too big Solution: factor out main loop into function Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor(diff.c): reduce scope of variables (#20781)Lewis Russell2022-10-23
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Göc2022-09-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-06
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-29
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-27
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Goc2022-08-25
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0206: redraw flags are not named specifically (#19913)zeertzjq2022-08-23
| | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
* vim-patch:8.2.4753: error from setting an option is silently ignored (#19888)zeertzjq2022-08-22
| | | | | Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_(). https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
* vim-patch:8.1.2045: the option.c file is too big (#19854)zeertzjq2022-08-20
| | | | | | | | | | | Problem: The option.c file is too big. Solution: Split off the code dealing with strings. (Yegappan Lakshmanan, closes vim/vim#4937) https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405. Cherry-pick shift_line() comment change from patch 8.1.2096. Move 'clipboard' default parsing to didset_string_options(). Reorder option flags to put Nvim-only flags at the end.
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: remove some unused includes (#19747)zeertzjq2022-08-13
| | | | | - Remove autocmd.h from fileio.h - Remove normal.h from main.h - Move bufinfo_T from undo_defs.h to undo.c
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | 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
* vim-patch:9.0.0124: code has more indent than neededzeertzjq2022-08-01
| | | | | | Problem: Code has more indent than needed. Solution: Use continue and return statements. (closes vim/vim#10824) https://github.com/vim/vim/commit/101d57b34b72f4fbc7df1b6edfd64c64a6be14fc
* refactor: replace char_u with charDundar Goc2022-07-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0101: invalid memory access in diff mode with "dp" and undo ↵zeertzjq2022-07-29
| | | | | | | (#19568) Problem: Invalid memory access in diff mode with "dp" and undo. Solution: Make sure the line number does not go below one. https://github.com/vim/vim/commit/4e677b9c40ccbc5f090971b31dc2fe07bf05541d
* vim-patch:9.0.0026: accessing freed memory with diff put (#19564)zeertzjq2022-07-29
| | | | | Problem: Accessing freed memory with diff put. Solution: Bail out when diff pointer is no longer valid. https://github.com/vim/vim/commit/c5274dd12224421f2430b30c53b881b9403d649e
* fix(options): properly free string options (#19510)zeertzjq2022-07-27
|
* vim-patch:8.2.5164: invalid memory access after diff buffer manipulationszeertzjq2022-07-25
| | | | | | Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block. https://github.com/vim/vim/commit/c101abff4c6756db4f5e740fde289decb9452efa
* vim-patch:8.2.5163: crash when deleting buffers in diff modezeertzjq2022-07-25
| | | | | | Problem: Crash when deleting buffers in diff mode. Solution: Recompute diffs later. Skip window without a valid buffer. https://github.com/vim/vim/commit/cd38bb4d83c942c4bad596835c6766cbf32e5195