aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
Commit message (Collapse)AuthorAge
* 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(misc1): move line_breakcheck family of functions to os/input.cBjörn Linse2021-12-09
|
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* | refactor: reduce number of unique char castsDundar Göc2021-10-13
|/
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* feat(decorations): support virtual lines (for now: only one block at a time)Björn Linse2021-09-26
|
* refactor: convert TRUE/FALSE to true/false (#15660)dundargoc2021-09-18
|
* fix: "redundant cast to the same type" #15662dundargoc2021-09-14
| | | Apply "redundant cast to the same type" fix from clangd.
* refactor: format files with uncrustify #15607dundargoc2021-09-10
|
* refactor: replace TRUE/FALSE with true/false #15425dundargoc2021-08-22
|
* refactor(plines): move out plines related code from misc1.cBjörn Linse2021-08-10
|
* vim-patch:8.2.1702: crash when using undo after deleting folded linesJan Edmund Lazo2021-06-10
| | | | | | Problem: Crash when using undo after deleting folded lines. Solution: Check for NULL pointer. (closes vim/vim#6968) https://github.com/vim/vim/commit/da697645d5917eb3d4168c06c3442bef9fb746bf
* vim-patch:8.2.2447: 'foldlevel' not applied to folds restored from sessionJan Edmund Lazo2021-02-01
| | | | | | Problem: 'foldlevel' not applied to folds restored from session. Solution: Set 'foldlevel' after creaiting the folds. (closes vim/vim#7767) https://github.com/vim/vim/commit/f9547eb6ef02e305203b859d2dcfdae930b9d544
* vim-patch:8.2.2176: crash with a sequence of fold commandsJan Edmund Lazo2020-12-21
| | | | | | | | | | | | | | | | | | | | | | Problem: Crash with a sequence of fold commands. Solution: Bail out when there are no folds at all. Add a test (Dominique Pellé) (closes vim/vim#7515) https://github.com/vim/vim/commit/6a78f328442073c32d58eafc13ce5a1ca7729eeb N/A patches for version.c: vim-patch:8.2.2174: Mac version doesn't specify the CPU architecture Problem: Mac version doesn't specify the CPU architecture. Solution: Add "arm64" or "x86_64". (Yee Cheng Chin, closes vim/vim#7519) https://github.com/vim/vim/commit/8c9d98a8af5351a3ac98cf11dede9f0268461511 vim-patch:8.2.2175: github actions: clang-11 handling suboptimal Problem: Github actions: clang-11 handling suboptimal. Solution: Separate step of installing clang-11. Get ubuntu release name dynamically. (Ozaki Kiichi, closes vim/vim#7514) https://github.com/vim/vim/commit/9aff970204234193045cfee205d51e2393e93bfd
* refactor: pass window to was_set_insecurelyMatthieu Coudron2020-11-23
| | | | | | working on get_foldtext and wanted to get rid of the curwin backup/restore. Turns out it's not possible else f_foldtext is run on the same window. Kept the cleanup anyway.
* vim-patch:8.1.0805: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 1. https://github.com/vim/vim/commit/135059724f140ceac889c9f8136bd1bf5c41d49d
* vim-patch:8.2.1972: crash when recreating nested foldJan Edmund Lazo2020-11-11
| | | | | | | | | | | | | | Problem: Crash when recreating nested fold. Solution: Check for empty growarray. (closes vim/vim#7278) https://github.com/vim/vim/commit/5e1f22ff614821b8fc7294c9dd22765acd403aeb N/A patches for version.c: vim-patch:8.2.1974: Vim9: test for has('gui_running') fails with VIMDLL Problem: Vim9: test for has('gui_running') fails with VIMDLL. Solution: Adjust the #ifdef. (Ken Takata, closes vim/vim#7276) https://github.com/vim/vim/commit/29b281ba8ddf176ae34b22e6a9b8e0ddcbcce665
* vim-patch:8.2.1947: crash when using "zj" without folds (#13222)Sean Dewar2020-11-03
| | | | | Problem: Crash when using "zj" without folds. (Sean Dewar) Solution: Check for at least one fold. (closes vim/vim#7245) https://github.com/vim/vim/commit/c136a3528b7ebb825c3863d701af44f023381181
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* folds: pass column on fold creationMatthieu Coudron2020-09-28
| | | | | useful if we want to have inline folds later and/or let users create folds that remember their start/end columns.
* screen: more work on fold_line replacementBjörn Linse2020-09-24
|
* extmark: separate extmark_splice_cols for column-only changeBjörn Linse2020-09-09
| | | | as the byte logic will be the same for all of these
* robustness: avoid adding offset to NULL pointerBjörn Linse2020-09-04
| | | | | | | | | | | UBSAN with clang 10.0 is checking for adding offsets to a `NULL` pointer which is not allowed. This is not yet checked in the version of clang used in CI (7.0.0). I will work on cases of this so that tests passes locally for me. This could be tested in CI by either upgrading the clang of the ASAN/UBSAN to 10.0, or add yet another CI target which builds with clang 10.0.
* lintJames McCoy2020-09-04
|
* vim-patch:8.2.1560: using NULL pointers in some codeJames McCoy2020-09-04
| | | | | | | | | Problem: Using NULL pointers in some code. (James McCoy) Solution: Avoid adding to a NULL pointer. Use byte as unsigned. https://github.com/vim/vim/commit/9c2b06637b32742cac11bfd66b1a4e84583c6c2e The changes to eval.c (skip_expr_concatenate) and vim9compile.c aren't included since they're specific to vim9script support.
* vim-patch:8.2.1553: crash in edit testJames McCoy2020-09-04
| | | | | | Problem: Crash in edit test. Solution: Avoid using invalid pointer. https://github.com/vim/vim/commit/2c93c685e3334c50d9a748ad699df727a4501b08
* vim-patch:8.2.1552: warnings from asan with clang-11James McCoy2020-09-03
| | | | | | Problem: Warnings from asan with clang-11. (James McCoy) Solution: Avoid using a NULL pointer. (issue vim/vim#6811) https://github.com/vim/vim/commit/64f37d309025a65210dbc33823ec9ec5d547775f
* vim-patch:8.2.1561: using NULL pointers in fold codeJan Edmund Lazo2020-09-02
| | | | | | | Problem: Using NULL pointers in fold code. Solution: Avoid using a NULL pointer. (Dominique Pellé, closes vim/vim#6831, closes vim/vim#6831) https://github.com/vim/vim/commit/81fcb67fb32a12414512b72e691a1bbbff9f8511
* vim-patch:8.2.1554: crash in normal testJan Edmund Lazo2020-09-02
| | | | | | Problem: Crash in normal test. Solution: Skip adjusting marks if there are no folds. https://github.com/vim/vim/commit/07e87e9eb5e7195d47d47c0ca752b6c8372a99ea
* lint: fix linting issuesMatthieu Coudron2020-04-24
|
* extmark: introduce extmark_splice_colsMatthieu Coudron2020-04-24
| | | | to ease up notations.
* folds: decrease reliance on global 'curwin'Matthieu Coudron2020-04-24
| | | | | | TODO in a future commit: - remains 2 instances of changed_lines that dont take into account buffer
* folds: decrease reliance on global "curwin" (#12132)Matthieu Coudron2020-04-16
| | | | | | | | Pass the window in which to create/delete folds instead of using the global "curwin" (current window). Preliminary work for a fold API. TODO: I kept changed_lines prototype unchanged. This should be updated when a fold API sees the light.
* foldcolumn: allow auto:XMatthieu Coudron2020-02-29
| | | | | | | | Similar to signcolumn, allow foldcolumn to adapt itself to the number of folds. Regression: vim supports a maximum fdc of 12, this limits it to 9.
* refactor: move session functions to ex_session.cJustin M. Keyes2020-01-28
|
* shed biking: it's always extmarks, never marks extendedBjörn Linse2020-01-20
|
* extmarks/bufhl: reimplement using new marktree data structureBjörn Linse2020-01-16
| | | | | | | | | | | | | | | | | | | | Add new "splice" interface for tracking buffer changes at the byte level. This will later be reused for byte-resolution buffer updates. (Implementation has been started, but using undocumented "_on_bytes" option now as interface hasn't been finalized). Use this interface to improve many edge cases of extmark adjustment. Changed tests indicate previously incorrect behavior. Adding tests for more edge cases will be follow-up work (overlaps on_bytes tests) Don't consider creation/deletion of marks an undoable event by itself. This behavior was never documented, and imposes complexity for little gain. Add nvim__buf_add_decoration temporary API for direct access to the new implementation. This should be refactored into a proper API for decorations, probably involving a huge dict. fixes #11598
* vim-patch:8.1.1922: in diff mode global operations can be very slowJan Edmund Lazo2019-11-16
| | | | | | | Problem: In diff mode global operations can be very slow. Solution: Do not call diff_redraw() many times, call it once when redrawing. And also don't update folds multiple times. https://github.com/vim/vim/commit/4f57eefe1e84b5a90e08474092ea6fc8825ad5c9
* vim-patch:8.1.1890: ml_get error when deleting fold markerJan Edmund Lazo2019-08-19
| | | | | | | | Problem: Ml_get error when deleting fold marker. Solution: Check that the line number is not below the last line. Adjust the fold when deleting the empty line. (Christian Brabandt, closes vim/vim#4834) https://github.com/vim/vim/commit/9a4a8c4d5993c6371486c895a515c2ad351e9aaa
* includesDaniel Hahler2019-08-07
|
* api: allow nvim_buf_attach from lua using callbacksBjörn Linse2019-06-04
|
* vim-patch:8.1.0527: using 'shiftwidth' from wrong buffer for folding (#9234)Jan Edmund Lazo2018-11-15
| | | | | Problem: Using 'shiftwidth' from wrong buffer for folding. Solution: Use "buf" instead of "curbuf". (Christian Brabandt) https://github.com/vim/vim/commit/0c27cbcacf0f58ad30f0b15d1f442f73f40347c2
* globals: KeyTyped is boolJan Edmund Lazo2018-09-14
|
* Merge #8744 from janlazo/vim-8.0.0890Justin M. Keyes2018-08-08
|\
| * memline: copy in ml_replace() is boolJan Edmund Lazo2018-08-07
| |
* | style: fixing minor issues noted in code review.ZviRackover2018-08-06
| |