aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
Commit message (Collapse)AuthorAge
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: format with uncrustify #15722dundargoc2021-09-19
|
* vim-patch:8.2.3384: cannot disable modeline for an individual fileSean Dewar2021-09-10
| | | | | | | | Problem: Cannot disable modeline for an individual file. Solution: Recognize "nomodeline" in a modeline. (Hu Jialun, closes vim/vim#8798) https://github.com/vim/vim/commit/9dcd349ca85e1df1abd1cbf1c29c0f1574b70bf8 Cherry-pick missing modeline for test_modeline.vim (heh) from v8.2.1432.
* fix(terminal): close without ! if the job is stoppedGregory Anders2021-08-31
| | | | | | - If the terminal job is still running then ! is still required. Closes #4683
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* feat(terminal): TermClose: set exit code in v:event.status #15406Gregory Anders2021-08-20
| | | Closes #4713
* refactor(highlight): make syn_check_group alloc free for existing groupBjörn Linse2021-08-18
|
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|
* Merge pull request #12971 from vigoux/decurbufBjörn Linse2021-07-09
|\ | | | | Decrease reliance on curbuf in BUFEMPTY and `undo.c`
| * buffer: move BUFEMPTY to a functionThomas Vigouroux2021-07-06
| |
| * buffer: don't rely on curbuf in BUFEMPTYThomas Vigouroux2021-07-06
| |
* | chore: use codespell to spell check #15016dundargoc2021-07-07
|/
* signs: Change b_signcols_max -> b_signcols_validLewis Russell2021-07-04
| | | | | b_signcols_max isn't used to store the max value, it is use to invalidate b_signcols.
* vim-patch:8.2.3097: crash when using "quit" at recovery promptJan Edmund Lazo2021-07-04
| | | | | | | | Problem: Crash when using "quit" at recovery prompt and autocommands are triggered. Solution: Block autocommands when creating an empty buffer to use as the current buffer. (closes vim/vim#8506) https://github.com/vim/vim/commit/1d97efce0ce31ddf0dd4c1ae2228ef4caee6880c
* vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)Daniel Steinberg2021-06-30
| | | | | | Problem: The wininfo list may contain stale entries. Solution: When closing a window remove any other entry where the window pointer is NULL. https://github.com/vim/vim/commit/4882d983397057ea91c584c5a54aaccf15016d18
* vim-patch:8.2.2185: BufUnload is not triggered for the quickfix dummy bufferJan Edmund Lazo2021-06-23
| | | | | | | Problem: BufUnload is not triggered for the quickfix dummy buffer. Solution: Do trigger BufUnload. (Pontus Leitzler,closes vim/vim#7518, closes vim/vim#7517) Fix white space around "=". https://github.com/vim/vim/commit/1cfb9bb5c06c07f14475f39c4eb57fea1f0dfb69
* vim-patch:8.2.2854: custom statusline cannot contain % items (#14558)Shadman2021-05-15
| | | | | Problem: Custom statusline cannot contain % items. Solution: Add "%{% expr %}". (closes vim/vim#8190) https://github.com/vim/vim/commit/30e3de21fc36153c5f7c9cf9db90bcc60dd67fb9
* vim-patch:8.2.2354: crash with a weird combination of autocommandsJan Edmund Lazo2021-05-13
| | | | | | Problem: Crash with a weird combination of autocommands. Solution: Increment b_nwindows when needed. (closes vim/vim#7674) https://github.com/vim/vim/commit/797e63b9f2baa1853e7063aac478d663cd02f207
* vim-patch:8.1.2313: debugging where a delay comes from is not easyJan Edmund Lazo2021-04-15
| | | | | | Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay(). https://github.com/vim/vim/commit/eda1da0c9a8db1400649629117e7d248c07735f7
* vim-patch:8.1.2205: sign entry structure has confusing name (#14289)Lewis Russell2021-04-05
| | | | Problem: Sign entry structure has confusing name. Solution: Rename signlist_T to sign_entry_T and prefix se_ to the fields.
* vim-patch:8.1.0989: various small code uglinessJan Edmund Lazo2021-03-29
| | | | | | | Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes vim/vim#4060) https://github.com/vim/vim/commit/bdace838c67c1bd94e55e34270a8325933891466
* vim-patch:8.1.0936: may leak memory when using 'vartabstop'VVKot2021-03-28
| | | | | | Problem: May leak memory when using 'vartabstop'. (Kuang-che Wu) Solution: Fix handling allocated memory for 'vartabstop'. (closes vim/vim#3976) https://github.com/vim/vim/commit/55c77cf2ea9c15e1ec75d1faf702ec3c9e325271
* vim-patch:8.1.0105: all tab stops are the sameVVKot2021-03-28
| | | | | | | Problem: All tab stops are the same. Solution: Add the variable tabstop feature. (Christian Brabandt, closes vim/vim#2711) https://github.com/vim/vim/commit/04958cbaf25eea27eceedaa987adfb354ad5f7fd
* vim-patch:8.2.0064: diffmode completion doesn't use per-window settingJan Edmund Lazo2021-02-13
| | | | | | Problem: Diffmode completion doesn't use per-window setting. Solution: Check if a window is in diff mode. (Dominique Pell, closes vim/vim#5419) https://github.com/vim/vim/commit/efcc329020ef089267f5f3994b8544eb58806311
* vim-patch:8.2.0054: :diffget and :diffput don't have good completionJan Edmund Lazo2021-02-13
| | | | | | Problem: :diffget and :diffput don't have good completion. Solution: Add proper completion. (Dominique Pelle, closes vim/vim#5409) https://github.com/vim/vim/commit/ae7dba896975051a3f0b7123faa08dac5635972d
* vim-patch:8.2.1904: still using default option values after using ":badd +1"Jan Edmund Lazo2021-02-13
| | | | | | | Problem: Still using default option values after using ":badd +1". Solution: Find a window where options were set. Don't set the window when using ":badd". https://github.com/vim/vim/commit/89b693e5627715cde080c3580c7b641c9bf0c06a
* buffer updates: add on_reload callback and handle it in treesitter parserBjörn Linse2021-02-10
|
* eval: use char* for set_internal_string_var()Jan Edmund Lazo2021-02-07
| | | | | | "name" param was cast to (const char *). All calls to set_internal_string_var() cast from (char *) to (char_u *). Remove these useless casts.
* option: use char* for set_string_option_direct()Jan Edmund Lazo2021-02-07
| | | | | | | "name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
* Merge pull request #13702 from erw7/fix-build_stl_str_hlerw72021-02-06
|\ | | | | buffer.c: fix problem of memory allocation
| * buffer.c: remove useless 'for' loops.erw72021-01-09
| |
| * buffer.c: fix problem of memory allocationerw72021-01-05
| |
* | Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
|/ | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* vim-patch:8.1.1667: flags for Ex commands may clash with other symbolsJan Edmund Lazo2021-01-02
| | | | | | | | | | | | | | | | | Problem: Flags for Ex commands may clash with other symbols. Solution: Prepend with EX_. https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031 N/A patches for version.c: vim-patch:8.1.1672: "make cmdidxs" doesn't work Problem: "make cmdidxs" doesn't work. Solution: Update macro names. (Naruhiko Nishino, closes vim/vim#4660) https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2 Error message for src/nvim/ex_cmds.lua which omits the "EX_" prefix for the flags.
* vim-patch:8.2.2231: when "--remote file" is used "file" is not reloadedJan Edmund Lazo2020-12-27
| | | | | | | | | | | Problem: When "--remote file" is used "file" is not reloaded. Solution: When a :drop command is used for a file that is already displayed in a window and it has not been changed, check if it needs to be reloaded. (closes vim/vim#7560) https://github.com/vim/vim/commit/e4862a0fe62261754daf476866ef2aa8586b716c Remove unused "focus" parameter from "buf_check_timestamp()". It was meant for removed GUI code.
* feat(sign):Allow signs to be 0 width (#13290)Lukas Reineke2020-12-24
| | | | Adds support for signs to be 0 cells wide. If all signs of the same group have no width, the signcolumn will not be rendered for that group.
* vim-patch:8.2.0116: BufEnter autocmd not triggered on ":tab drop"Jan Edmund Lazo2020-12-23
| | | | | | | | | | | | | | | Problem: BufEnter autocmd not triggered on ":tab drop". (Andy Stewart) Solution: Decrement autocmd_no_enter for the last file. (closes vim/vim#1660, closes vim/vim#5473) https://github.com/vim/vim/commit/c10b521628f2b073fa231defa26f23937c91724d N/A patches for version.c: vim-patch:8.1.1805: au_did_filetype is declared twice Problem: Au_did_filetype is declared twice. Solution: Remove it from autocmd.c. (closes vim/vim#4767) https://github.com/vim/vim/commit/6cd57d44669c02af9195f5601b882edd435b47e8
* vim-patch:8.1.0470: pointer ownership around fname_expand() is unclearJan Edmund Lazo2020-12-19
| | | | | | | Problem: Pointer ownership around fname_expand() is unclear. Solution: Allow b_ffname and b_sfname to point to the same allocated memory, only free one. Update comments. https://github.com/vim/vim/commit/3d6014f0336d9a64c01a7518fe45fde0a925fa20
* vim-patch:8.0.1525: using :wqa exits even if a job runs in a terminal windowJan Edmund Lazo2020-12-01
| | | | | | | Problem: Using :wqa exits even if a job runs in a terminal window. (Jason Felice) Solution: Check if a terminal has a running job. (closes vim/vim#2654) https://github.com/vim/vim/commit/7a76092a51fc5446426a4bfd9eb6503ec61bf9e9
* vim-patch:8.0.0953: get "no write since last change" error in terminal windowJan Edmund Lazo2020-12-01
| | | | | | | Problem: Get "no write since last change" error in terminal window. Solution: Use another message when closing a terminal window. Make ":quit!" also end the job. https://github.com/vim/vim/commit/f5be7cd01642fafc4b7d68894eb60cca60c7a405
* 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.1959: crash when terminal buffer name is made emptyJan Edmund Lazo2020-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash when terminal buffer name is made empty. (Dhiraj Mishra) Solution: Fall back to "[No Name]". (closes vim/vim#7262) https://github.com/vim/vim/commit/00806bceb6dc9c8dcd308e5f7e50f720f7dc71b0 N/A patches for version.c: vim-patch:8.1.2422: "make depend" does not work correctly for libvterm Problem: "make depend" does not work correctly for libvterm. Solution: Fix build dependencies. And a few minor improvements. https://github.com/vim/vim/commit/9810cfbe554b166cb05b51119040bb4426c17bac vim-patch:8.2.1962: netbeans may access freed memory Problem: Netbeans may access freed memory. Solution: Check the buffer pointer is still valid. Add a test. (Yegappan Lakshmanan, closes vim/vim#7248) https://github.com/vim/vim/commit/32e5ec0b017adb68fe36adb9a9a362abdaffe7f4 vim-patch:8.2.1963: crash when using a popup window with "latin1" encoding Problem: Crash when using a popup window with "latin1" encoding. Solution: Don't use ScreenLinesUC when enc_utf8 is false. (closes vim/vim#7241) https://github.com/vim/vim/commit/927495b1fef835a8f83c089bb3aa3608b617e972
* vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)tamago3242020-11-06
| | | | | Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes vim/vim#3306) https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f
* Merge pull request #12870 from bfredl/themeparkBjörn Linse2020-11-01
|\ | | | | Color themes (per window/line) and lua theme providers
| * 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()
* | vim-patch:8.2.1909: number of status line items is limited to 80Rom Grk2020-10-31
|/ | | | | | | | | | Problem: Number of status line items is limited to 80. Solution: Dynamically allocate the arrays. (Rom Grk, closes vim/vim#7181) https://github.com/vim/vim/commit/8133cc6bf454eb90bb0868f7cf806fce5c0c9fe6 The members of stl_item_T have not been prefixed with stl_ contrary to the vim patch because the amount of stl_ prefixes on single lines of code in that region was hurtful to readability.
* Revert "vim-patch:8.1.0877: new buffer used every time the quickfix window ↵Jan Edmund Lazo2020-10-20
| | | | | | | | is opened" This reverts commit e82b8ddef16eb7ce96e1d3d063ff529f79ed6bb2. Fix https://github.com/neovim/neovim/issues/13104
* vim-patch:8.1.0877: new buffer used every time the quickfix window is openedJan Edmund Lazo2020-10-10
| | | | | | Problem: New buffer used every time the quickfix window is opened. Solution: Reuse the buffer. (Yegappan Lakshmanan, closes vim/vim#3902) https://github.com/vim/vim/commit/ee8188fc74a7cf9ee7acb634b2bb7a032d0cb24c
* 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.