aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
* 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
|
* *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
|
* Merge #4152 'vim-patch:7.4.{798,800,805,810,811,814,815,816,817,820,825}'.Justin M. Keyes2016-02-09
|\
| * vim-patch:7.4.820Jurica Bradaric2016-02-02
| | | | | | | | | | | | | | Problem: Invalid memory access in file_pat_to_reg_pat. Solution: Avoid looking before the start of a string. (Dominique Pelle) https://github.com/vim/vim/commit/8fee878fe277ec1b1b833ba6e5db679151f7982f
| * vim-patch:7.4.817Jurica Bradaric2016-02-02
| | | | | | | | | | | | | | | | Problem: Invalid memory access in file_pat_to_reg_pat(). Solution: Use vim_isspace() instead of checking for a space only. (Dominique Pelle) https://github.com/vim/vim/commit/2288afed428d29ce2e464964df4c5a757281e70e
* | vim-patch:7.4.643watiko2016-02-03
|/ | | | | | | Problem: Using the default file format for Mac files. (Issue 77) Solution: Reset the try_mac counter in the right place. (Oswald) https://github.com/vim/vim/commit/c6b7217ff502b8fc28d6c861d25c1943e30973ad
* Merge pull request #4096 from justinmk/coverity125476Justin M. Keyes2016-01-28
|\ | | | | coverity/125476: RI: Null pointer dereference
| * file_pat_to_reg_pat(): handle empty string.oni-link2016-01-28
| |
| * glob2regpat(): handle empty string.Justin M. Keyes2016-01-27
| |
* | window.c: change return types to boolCharles Joachim2016-01-25
|/ | | | Co-authored-by: Wayne Rowcliffe (@war1025)
* fileio: Change return types to boolCharles Joachim2016-01-17
| | | | Co-authored-by: Wayne Rowcliffe (@war1025)
* Windows: Include <fcntl.h> for file constants.Seth Jackson2016-01-17
| | | | | | This header is required by POSIX for the constants (O_RDONLY, etc.) but we were only including it on Unix systems as a side effect of including <unistd.h>.
* doc: Remove more references to MS-DOSSeth Jackson2016-01-16
| | | | | | Among other things, this includes: - lies about command.com - references to pcterm
* fileio: Replace some event checking functions with one has_eventCharles Joachim2016-01-11
|
* coverity/62611: Nesting level does not match indentationoni-link2016-01-07
| | | | | | | The nested line was the else-branch of an if-then-else block that dealt with cryptography, but after commit 85338fe1d5a56f82546e16c305c2048c081771e0 (Remove cryptography) removed the if-then part, the indentation of this line was not adjusted.
* Merge pull request #3903 from justinmk/vim-7.4.605Justin M. Keyes2016-01-01
|\ | | | | vim-patch:7.4.605
| * 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.
* | Port fsync() to libuv.Seth Jackson2016-01-01
|/
* Merge pull request #3834 from Shougo/vim-7.4.635Justin M. Keyes2015-12-13
|\ | | | | vim-patch:7.4.635
| * vim-patch:7.4.635Shougo Matsushita2015-12-13
| | | | | | | | | | | | | | | | Problem: If no NL or CR is found in the first block of a file then the 'fileformat' may be set to "mac". (Issue 77) Solution: Check if a CR was found. (eswald) https://github.com/vim/vim/commit/05eb612ff3597fb7102f892bfd320f28b56d2fc6
* | Merge #3443 'vim-patch:7.4.{785,795,898}'Justin M. Keyes2015-12-13
|\ \ | |/ |/|
| * vim-patch:7.4.785Johan Klokkhammer Helsing2015-11-22
| | | | | | | | | | | | | | | | Problem: On some systems automatically adding the missing EOL causes problems. Setting 'binary' has too many side effects. Solution: Add the 'fixeol' option, default on. (Pavel Samarkin) https://github.com/vim/vim/commit/34d72d4b6c1a2b04a214d8a49b7d22c97bc7a8bc
* | Merge pull request #3753 from watiko/vim-7.4.790Justin M. Keyes2015-12-12
|\ \ | | | | | | Vim 7.4.{786,787,789,790}
| * | vim-patch:7.4.786watiko2015-11-28
| | | | | | | | | | | | | | | | | | | | | Problem: It is not possible for a plugin to adjust to a changed setting. Solution: Add the OptionSet autocommand event. (Christian Brabandt) https://github.com/vim/vim/commit/537443018d41918639695a442c91b34ccec69fc3
* | | Windows: Remove unnecessary codepath from modname.Seth Jackson2015-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File names starting with periods are perfectly acceptable on Windows file systems. The only place where this is not acceptable is on MS-DOS FAT file systems which only support 8.3 file names. See here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx Since Neovim does not support MS-DOS or 8.3 file names (#605) we can drop this codepath. It was not compiling anyways since we do not define WIN3264.
* | | src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.