aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
Commit message (Collapse)AuthorAge
...
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* vim-patch:7.4.2330lonerover2017-03-27
| | | | | | | Problem: Coverity complains about not checking curwin to be NULL. Solution: Use firstwin to avoid the warning. https://github.com/vim/vim/commit/030cddc7ec0c3d2fe3969140cd1b92b2f18633c0
* lintJustin M. Keyes2017-03-22
|
* vim-patch:7.4.2328Justin M. Keyes2017-03-22
| | | | | | Problem: Crash when BufWinLeave autocmd goes to another tab page. (Hirohito Higashi) Solution: Make close_buffer() go back to the right window.
* vim-patch:7.4.2324Justin M. Keyes2017-03-22
| | | | | | | | | | Problem: Crash when editing a new buffer and BufUnload autocommand wipes out the new buffer. (Norio Takagi) Solution: Don't allow wiping out this buffer. (partly by Hirohito Higashi) Move old style test13 into test_autocmd. Avoid ml_get error when editing a file. https://github.com/vim/vim/commit/e0ab94e7123ca7855f45919114d948ef2bc1e8c3
* vim-patch:7.4.2348raichoo2017-03-19
| | | | | | | Problem: Crash on exit when EXITFREE is defined. (Dominique Pelle) Solution: Don't access curwin when exiting. https://github.com/vim/vim/commit/9a27c7fde6d453d9892b6f6baa756bce4d6d419d
* vim-patch:8.0.0229raichoo2017-03-19
| | | | | | | | Problem: When freeing a buffer the local value of the 'formatprg' option is not cleared. Solution: Add missing change. https://github.com/vim/vim/commit/24a2d416ec261829ff7fd29f7b66739c96dd6513
* vim-patch:7.4.2362raichoo2017-03-19
| | | | | | | | Problem: Illegal memory access with ":1@". (Dominique Pelle) Solution: Correct cursor column after setting the line number. Also avoid calling end_visual_mode() when not in Visual mode. https://github.com/vim/vim/commit/4930a76a0357f76a829eafe4985d04cf3ce0e9e0
* vim-patch:7.4.2347raichoo2017-03-19
| | | | | | | | | Problem: Crash when closing a buffer while Visual mode is active. (Dominique Pelle) Solution: Adjust the position before computing the number of lines. When closing the current buffer stop Visual mode. https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
* Replace hashtab with handle buffer functionsJack Bracewell2017-03-16
|
* buffer.c: enable -Wconversion #3744Justin M. Keyes2017-03-03
|
* buffer.c: enable -Wconversion #3744Adam-K-P2017-03-02
| | | | Closes #3744
* buffer: Provide an initializer for di_keyZyX2017-02-24
|
* buffer: Remove b:changedtick from b: before freeing b:ZyX2017-02-24
| | | Avoids loosing b:changedtick value at `:bdelete`.
* eval: Do not allocate b:changedtick dictionary itemZyX2017-02-24
|
* eval: Make sure `islocked('b:.changedtick')` does not error outZyX2017-02-23
| | | Port of vim-patch:8.0.0345
* buffer: Forbid unletting b:changedtickZyX2017-02-23
|
* buffer: Bind b:changedtick to b:['changedtick'], remove special casesZyX2017-02-23
|
* coverity/13728: Null pointer dereference (#6100)Justin M. Keyes2017-02-12
| | | coverity claims that `valid_tabpage(NULL)` can return true...
* Merge pull request #5913 from mhinz/buf-lookup-patchesJames McCoy2017-02-06
|\ | | | | vim-patch:7.4.2017,7.4.2018,7.4.2021,7.4.2022,7.4.2023,7.4.2024
| * Fix clint issuesMarco Hinz2017-02-04
| |
| * vim-patch:7.4.2024Marco Hinz2017-02-04
| | | | | | | | | | | | | | | | | | | | Problem: More buf_valid() calls can be optimized. Solution: Use bufref_valid() instead. NOTE: Some changes related to channels and the Python and Netbeans interfaces were obviously left out. https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
| * vim-patch:7.4.2023Marco Hinz2017-02-04
| | | | | | | | | | | | | | | | | | | | | | Problem: buflist_findname_stat() may find a dummy buffer. Solution: Set the BF_DUMMY flag after loading a dummy buffer. Start finding buffers from the end of the list. NOTE: In Neovim, buflist_findname_stat() was replaced by buflist_findname_file_id() in c41535d69. https://github.com/vim/vim/commit/ea3f2e7be447a8f0c4436869620f908de5e8ef1e
| * vim-patch:7.4.2021Marco Hinz2017-02-04
| | | | | | | | | | | | | | Problem: Still too many buf_valid() calls. Solution: Make au_new_curbuf a bufref. Use bufref_valid() in more places. https://github.com/vim/vim/commit/19ff9bf454b7492be64dd87aaf0830fa7961871e
| * vim-patch:7.4.2018Marco Hinz2017-02-04
| | | | | | | | | | | | | | | | Problem: buf_valid() can be slow when there are many buffers. Solution: Add bufref_valid(), only go through the buffer list when a buffer was freed. https://github.com/vim/vim/commit/b25f9a97e9aad3cbb4bc3fe87cdbd5700f8aa0c6
| * vim-patch:7.4.2017Marco Hinz2017-02-04
| | | | | | | | | | | | | | | | | | | | | | Problem: When there are many errors adding them to the quickfix list takes a long time. Solution: Add BLN_NOOPT. Don't call buf_valid() in buf_copy_options(). Remember the last file name used. When going through the buffer list start from the end of the list. Only call buf_valid() when autocommands were executed. https://github.com/vim/vim/commit/8240433f48f7383c281ba2453cc55f10b8ec47d9
* | refactor: fix warningsJustin M. Keyes2017-02-04
|/
* Merge #5865 from lonerover/vim-7.4.2036Justin M. Keyes2017-01-19
|\ | | | | vim-patch:7.4.2036
| * buffer.c: use a map instead of hashtabrover2017-01-19
| |
| * fix lint errorlonerover2017-01-04
| |
| * vim-patch:7.4.2036lonerover2017-01-03
| | | | | | | | | | | | | | Problem: Looking up a buffer by number is slow if there are many. Solution: Use a hashtab. https://github.com/vim/vim/commit/480778b805bd8bdc5d657560230e9c50feda1d0f
* | Merge #5918 'vim-patch: 7.4.2006, 7.4.2075, 7.4.2077, 7.4.2117, 7.4.2300, ↵Justin M. Keyes2017-01-16
|\ \ | | | | | | | | | 7.4.2313, 7.4.2314'.
| * | vim-patch:7.4.2006rover2017-01-08
| |/ | | | | | | | | | | | | | | Problem: Crash when using tabnext in BufUnload autocmd. (Norio Takagi) Solution: First check that the current buffer is the right one. (Hirohito Higashi) https://github.com/vim/vim/commit/30445cb6e94698d212ba866ef3e4022ac625540a
* | vim-patch:7.4.2099 (#5951)Shougo2017-01-15
| | | | | | | | | | | | | | Problem: When a keymap is active only "(lang)" is displayed. (Ilya Dogolazky) Solution: Show the keymap name. (Dmitri Vereshchagin, closes vim/vim#933) https://github.com/vim/vim/commit/73ac0c4281a3606651604a3cbcc334bfb3859a87
* | lintJustin M. Keyes2017-01-13
| |
* | open_buffer(): Do `BufEnter` for directories.Justin M. Keyes2017-01-12
|/ | | | | | | | | | | | | | | | | | | Abuse NOTDONE to give some nuance to the return value of readfile(), so that open_buffer() can distinguish between "failed, lol" and "failed because the path is a directory". Before this change, Vim *already* creates a new buffer when a directory is edited. So there is no reason it should not raise BufEnter, that was an implementation detail of ye olde readfile(). Most of the changes in this commit merely preserve the old semantics. The "implicit" change that we actually are interested in, is this line in `open_buffer()`, where `retval` being non-FAIL allows EVENT_BUFENTER to be applied: apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf, &retval); References https://github.com/vim/vim/issues/1353
* vim-patch:7.4.1837 (#5834)lonerover2016-12-27
| | | | | | | Problem: The BufUnload event is triggered twice, when :bunload is used with set to or . Solution: Do not trigger the event when ml_mfp is NULL. (Hirohito Higashi) https://github.com/vim/vim/commit/c67e89213476b5f4756d92208b57ce9ef4a4cf24
* vim-patch:8.0.0110 (#5700)Justin M. Keyes2016-12-03
| | | | | | | | Closes #5616 Problem: Drop command doesn't use existing window. Solution: Check the window width properly. (Hirohito Higashi) https://github.com/vim/vim/commit/5a030a540f4157d5c9905e3564282c92b4dcec9a
* 'inccommand': buftype=nofile, restore cursor/viewJustin M. Keyes2016-11-10
| | | | | | | - Use a standard scratch buffer instead of a new 'buftype', functions like curbufIsChanged() already have special handling for scratch bufs. - Cleanup some stuff from the previous merge. - Add support for :smagic, :snomagic. Closes #5578
* lintJustin M. Keyes2016-11-08
|
* 'inccommand': reworkJustin M. Keyes2016-11-08
| | | | | | | | | | | | | | | | | - Eliminate/isolate static/global variables - Remove special-case parameter from buflist_new() - Remove special-case ECMD_RESERVED_BUFNR - To determine when u_undo_and_forget() should be done, check b_changedtick instead of a heuristic. - use mb_string2cells() instead of strlen() to measure the :sub patterns - call ml_close() before buf_clear_file(). Avoids leaks caught by ASan. Original patch by: Robin Elrharbi-Fleury (Robinhola) Audrey Rayé (Adrey06) Philémon Hullot (DesbyP) Aymeric Collange (aym7) Clément Guyomard (Clement0)
* LintedKillTheMule2016-10-30
|
* Incsubsitution featureKillTheMule2016-10-30
| | | | | | | | | | | | | | | | | Originally implemented by * Clement0 * DesbyP * aym7 * Adrey06 * Robinhola in #4811. Major reworkings and bug fixes by * bfredl Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
* Merge #5500Justin M. Keyes2016-10-26
|\ | | | | | | Closes #5246
| * Fix lint errors.Grzegorz Milka2016-10-23
| |
| * vim-patch:7.4.2312Grzegorz Milka2016-10-23
| | | | | | | | | | | | | | | | Problem: Crash when autocommand moves to another tab. (Dominique Pelle) Solution: When navigating to another window halfway the :edit command go back to the right window. https://github.com/vim/vim/commit/5a49789a9b1f6447aeafbbbdd5b235dd10c471d5
| * vim-patch:7.4.2212Grzegorz Milka2016-10-22
| | | | | | | | | | | | | | | | Problem: Mark " is not set when closing a window in another tab. (Guraga) Solution: Check all tabs for the window to be valid. (based on patch by Hirohito Higashi, closes vim/vim#974) https://github.com/vim/vim/commit/e59215c7dcae17b03daf39517560cfaa03314f5a
* | modeline: Handle version number overflow. #5450Florian Larysch2016-10-26
|/ | | | | | | | | | | Closes #5449 A file containing the string "vim" followed by a very large number in a modeline location will trigger an overflow in getdigits() which is called by chk_modeline() when trying to parse the version number. Add getdigits_safe(), which does not assert overflows, but reports them to the caller.
* main.c: "BufReadCmd term://": Skip existing terminal.Justin M. Keyes2016-10-12
| | | | | | | | | Check `exists('b:term_title')` to avoid the BufReadCmd for already-initialized :terminal buffers. Move the test for `:argadd`. Add a test for `:edit<CR>`. Tweak comments and code style.
* 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