aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
...
* readfile(): Remove "Reading from stdin..." #6298Vadim A. Misbakh-Soloviov2017-03-18
|
* job-control: set CLOEXEC on pty processes. #5986Matthew Malcomson2017-03-17
| | | | | Before this change, new processes started with libuv prevented SIGHUP from reaching pty processes (by keeping the ptmx file descriptor open).
* lintJames McCoy2017-03-11
|
* vim-patch:7.4.2101James McCoy2017-03-11
| | | | | | | Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07
* *: Fix linter errorsZyX2017-02-15
|
* *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* 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
* coverity/155512: Pass correct length to strncat()Justin M. Keyes2017-01-23
| | | | References 8bc2bffda94bf2de4e8adae57b4b5597ed4e8247
* coverity/155512: Pass correct length to strncat()ZyX2017-01-23
|
* readfile(): Fix read-after-free.Justin M. Keyes2017-01-21
| | | | | | References https://github.com/neovim/neovim/pull/5956#pullrequestreview-17812620 Helped-by: oni-link <knil.ino@gmail.com>
* Merge #5928 'New event: DirChanged'Marco Hinz2017-01-16
|\
| * Don't expand filenames during autocmdMarco Hinz2017-01-13
| |
* | readfile(): Avoid file message when reading from stdin. #5956Michael Schupikov2017-01-16
| | | | | | | | Closes #5921
* | 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.2314lonerover2017-01-09
| | | | | | | | | | | | | | Problem: No error when deleting an augroup while it's the current one. Solution: Disallow deleting an augroup when it's the current one. https://github.com/vim/vim/commit/de653f08805dde14424d417502a0480a6ad292f8
| * vim-patch:7.4.2313lonerover2017-01-09
| | | | | | | | | | | | | | | | Problem: Crash when deleting an augroup and listing an autocommand. (Dominique Pelle) Solution: Make sure deleted_augroup is valid. https://github.com/vim/vim/commit/b62cc36a600e2e1e5a1d1d484fef89898c847c4c
| * vim-patch:7.4.2300lonerover2017-01-09
| | | | | | | | | | | | | | | | Problem: Get warning for deleting autocommand group when the autocommand using the group is scheduled for deletion. (Pavol Juhas) Solution: Check for deleted autocommand. https://github.com/vim/vim/commit/5c80908ced601be6db7554a147cdb0f98ac8daa1
| * vim-patch:7.4.2117lonerover2017-01-09
| | | | | | | | | | | | | | | | | | Problem: Deleting an augroup that still has autocmds does not give a warning. The next defined augroup takes its place. Solution: Give a warning and prevent the index being used for another group name. https://github.com/vim/vim/commit/f2c4c391192cab6e923b1a418d4af09106fba25f
* | 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
* | Merge pull request #5860 from jamessan/vim-7.4.1889James McCoy2017-01-09
|\ \ | |/ |/| vim-patch:7.4.1889
| * vim-patch:7.4.1889James McCoy2017-01-02
| | | | | | | | | | | | | | Problem: When umask is set to 0177 Vim can't create temp files. (Lcd) Solution: Also correct umask when using mkdtemp(). https://github.com/vim/vim/commit/35d88f4e2ff5dcd9904f04612d5febede996137c
* | fix lint errorlonerover2017-01-06
| |
* | vim-patch:7.4.2103lonerover2017-01-05
|/ | | | | | | Problem: Can't have "augroup END" right after ":au!". Solution: Check for the bar character before the command argument. https://github.com/vim/vim/commit/e99e84497b89e5f91df519790802770920ecf4fe
* lintJames McCoy2016-12-08
|
* vim-patch:7.4.1754James McCoy2016-12-08
| | | | | | | | | Problem: When 'filetype' was set and reloading a buffer which does not cause it to be set, the syntax isn't loaded. (KillTheMule) Solution: Remember whether the FileType event was fired and fire it if not. (Anton Lindqvist, closes vim/vim#747) https://github.com/vim/vim/commit/c3691332f72169c486066200c0f3935418364900
* Merge #5561 'inccommand'Justin M. Keyes2016-11-09
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Initial work by: Robin Elrharbi-Fleury (Robinhola) Audrey Rayé (Adrey06) Philémon Hullot (DesbyP) Aymeric Collange (aym7) Clément Guyomard (Clement0) Major revisions by: KillTheMule Björn Linse <bjorn.linse@gmail.com> Justin M. Keyes <justinkz@gmail.com>
| * 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.
* | encoding: cleanup mbyte.c given fixed encoding=utf-8Björn Linse2016-11-05
|/ | | | | | | | | Eliminate mb_init(): Set "enc_utf" and "has_mbyte" early. Eliminate "enc_unicode" and "enc_latin1like". init_chartab() and screenalloc() are already invoked elsewhere in the initialization process. The EncodingChanged autocmd cannot be triggered. At initialization, there is no spellfiles to reload
* read_string: Use char if you mean char.Justin M. Keyes2016-09-13
|
* 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
* vim-patch:7.4.1913 (#5260)Jurica Bradarić2016-09-04
| | | | | | | Problem: When ":doautocmd" is used modelines are used even when no autocommands were executed. (Daniel Hahler) Solution: Skip processing modelines. (closes vim/vim#854) https://github.com/vim/vim/commit/1610d052413e0ed664498853a47acc2d677a22d1
* win32: readfile(): Directories should not show "[Permission Denied]".Justin M. Keyes2016-08-07
| | | | | | | | | | | | | | | 77135447e09903b45d1482da45869946212f7904 introduced: if (!newfile) { return FAIL; } which changed the semantics of the un-braced `else` in the `#ifndef UNIX` block immediately above it. This commit restores the semantics of Vim. Until now it mostly worked by accident, but on Windows it would mean that opening a directory would show "[Permission Denied]".
* readfile(): Ensure `perm` for non-Unix.Justin M. Keyes2016-08-07
| | | | | | In the (!read_buffer && !read_stdin) case, always set `perm` for all platforms. This also means we no longer need to set `perm` in the case of (fd < 0) for non-Unix.
* readfile(): readonly: Also check "not writable".Justin M. Keyes2016-08-04
|
* readfile(): Less-destructive readonly check.Shougo Matsushita2016-08-04
| | | | | | | | | Fixes #4162 Fixes #4200 Closes #4944 Regression by 4a138137f78907703aa9215b45f46b8f37d84ae5. That commit mentions a "possible race condition" but the cost isn't worth the (unexplained) gain.
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* vim-patch:7.4.1276Michael Ennen2016-05-17
| | | | | | | Problem: Warning for not using return value of fcntl(). Solution: Explicitly ignore the return value. https://github.com/vim/vim/commit/fbc4b4db3a9690906a96e16724350a6241cf32a5
* Linting.KillTheMule2016-05-08
|
* vim-patch:7.4.896Rui Abreu Ferreira2016-05-08
| | | | | | | | | Problem: Editing a URL, which netrw should handle, doesn't work. Solution: Avoid changing slashes to backslashes. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/b4f6a46b01ed00b642a2271e9d1559e51ab0f2c4 Cherry-picked from https://github.com/neovim/neovim/pull/810, rebased.
* *: 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.
* os_nodetype: impl with libuvJustin M. Keyes2016-04-29
|
* Remove old UNIX ifdef from buf_write()Rui Abreu Ferreira2016-04-28
| | | | | | | | | | | When backupcopy=auto buf_write assumes backupcopy=yes when the file is a hard/symbolic link. However this check was guarded by a UNIX ifdef. The check itself is portable and the guard can be removed. Added a couple tests to check the behaviour of bkc=auto and bkc=no with a symbolic link. Reported in #4525
* Fix another linter error.Jurica Bradaric2016-04-20
|
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* *: Fix preincrement lint errorsZyX2016-04-18
|