aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
Commit message (Collapse)AuthorAge
...
* | 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
* api: unify buffer numbers and window ids with handlesBjörn Linse2016-08-31
| | | | also allow handle==0 meaning curbuf/curwin/curtab
* os_resolve_shortcut: initial port from Vim sourceJustin M. Keyes2016-07-30
|
* Always resize the embedded vterm properlyMarco Hinz2016-06-20
|
* Add new functionality to the `=` marker in the STLTJ DeVries2016-06-14
| | | | | | This new functionality is explained in the documentation. Also, many tests have been added to the buffer_spec.lua file
* vim-patch:7.4.1142James McCoy2016-06-02
| | | | | | | Problem: Cannot define keyword characters for a syntax file. Solution: Add the ":syn iskeyword" command. (Christian Brabandt) https://github.com/vim/vim/commit/b8060fe862f684b591f9ac679eac5b2594d6c5a0
* lib/kvec: Remove useless type argument from kv_push macrosZyX2016-05-30
|
* vim-patch: 7.4.1086 #4626Michael Ennen2016-05-06
| | | | | | | Problem: Crash with an extremely long buffer name. Solution: Limit the return value of vim_snprintf(). (Dominique Pelle) https://github.com/vim/vim/commit/507edf63df75fe228e0f76b845b58d60266e65d8
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* vim-patch: 7.4.1401Michael Ennen2016-04-27
| | | | | | | | | Problem: Having 'autochdir' set during startup and using diff mode doesn't work. (Axel Bender) Solution: Don't use 'autochdir' while still starting up. (Christian Brabandt) https://github.com/vim/vim/commit/6bd364e08461159ad3c153ffba4def5b896486a1
* Merge pull request #4273 from watiko/vim-7.4.957Justin M. Keyes2016-04-25
|\ | | | | vim-patch:7.4.{941,942,957}
| * vim-patch:7.4.941watiko2016-03-06
| | | | | | | | | | | | | | Problem: There is no way to ignore case only for tag searches. Solution: Add the 'tagcase' option. (Gary Johnson) https://github.com/vim/vim/commit/0f6562e9036f889185dff49a75c7fc5ffb28b307
* | buffer.c: change return type to boolCharles Joachim2016-04-03
| | | | | | | | Co-authored-by: Wayne Rowcliffe (@war1025)
* | test: minor changesJustin M. Keyes2016-03-17
| |
* | 'shortmess': Add "F" flag. #4446Shougo Matsushita2016-03-17
| | | | | | | | | | | | | | Add "Don't give the file editing message" flag in shortmess option. Add the UI tests by @fmoralesc Fix the changes for Vim 7.4.1570
* | vim-patch:7.4.1511Nicolas Dumazet2016-03-08
|/ | | | | | | Problem: Statusline highlighting is sometimes wrong. Solution: Check for Highlight type. (Christian Brabandt) https://github.com/vim/vim/commit/af6e36ff16736106a1bc63bb4d01f51fdfeb29a2
* bufhl: new mechanism for plugins to add highlights to a bufferBjörn Linse2016-02-23
|
* coverity/135589: (FP) Null pointer dereferencesJustin M. Keyes2016-02-19
| | | | | False positive: buflist_findnr() should not be NULL in this case because it is given a buffer number that (should be) guaranteed to exist.
* Merge pull request #4187 from watiko/vim-7.4.742Justin M. Keyes2016-02-09
|\ | | | | vim-patch:7.4.742
| * vim-patch:7.4.742watiko2016-02-07
| | | | | | | | | | | | | | | | Problem: Cannot specify a vertical split when loading a buffer for a quickfix command. Solution: Add the "vsplit" value to 'switchbuf'. (Brook Hong) https://github.com/vim/vim/commit/a594d77ffcccf2ac0e4079c41342ca55d4c9bb08
* | vim-patch:7.4.805Jurica Bradaric2016-02-02
|/ | | | | | | | Problem: The ruler shows "Bot" even when there are only filler lines missing. (Gary Johnson) Solution: Use "All" when the first line and one filler line are visible. https://github.com/vim/vim/commit/29bc9db36e41cb519dca9381cc29a3fc1ff02106
* tabline: Switch to functions, handle different click typesZyX2016-02-01
|
* tabline: Add %[] atom to the tabline, for random commands on clickZyX2016-02-01
| | | | Currently untested and undocumented.
* file_pat_to_reg_pat, buflist_findpat: const paramsJustin M. Keyes2016-01-01
| | | | | file_pat_to_reg_pat() and buflist_findpat() do not modify the data of these parameters.
* vim-patch:7.4.605Justin M. Keyes2015-12-30
| | | | | | | | Problem: The # register is not writable, it cannot be restored after jumping around. Solution: Make the # register writable. (Marcin Szamotulski) https://github.com/vim/vim/commit/3b3a9498d1eab3c28c524cce115160528a9a9297
* vim-patch:7.4.645Shougo Matsushita2015-12-13
| | | | | | | | Problem: When splitting the window in a BufAdd autocommand while still in the first, empty buffer the window count is wrong. Solution: Do not reset b_nwindows to zero and don't increment it. https://github.com/vim/vim/commit/8da9bbfd02957b79edd595c8c7397453012510b0
* statusline: Check width before advancing pointer. #3818Enrico Ghirardi2015-12-10
| | | | | | Closes #3763 Helped-by: oni-link <knil.ino@gmail.com>