aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)KunMing Xie2018-06-24
| | | | | | | Problem: Saving the redo buffer only works one time, resulting in the "." command not working well for a function call inside another function call. (Ingo Karkat) Solution: Save the redo buffer at every user function call. (closes vim/vim#1619) https://github.com/vim/vim/commit/d4863aa99e0527e9505c79cbeafc68a6832200bf
* Merge #8618 'Replace b_changedtick with always-inline functions'Justin M. Keyes2018-06-22
|\
| * *: Replace b_changedtick with new always-inline functionsZyX2018-06-22
|/ | | Ref #8474
* Merge #8526 from janlazo/vim-8.0.0451Justin M. Keyes2018-06-16
|\
| * vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | | | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* | Fix implicit conversion warning (#8536)Marco Hinz2018-06-13
|/
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* Merge #8377 'TextChangedP autocommand'Justin M. Keyes2018-05-19
|\
| * vim-patch:8.0.1494: no autocmd triggered in Insert mode with visible popup menuShougo Matsushita2018-05-14
|/ | | | | | | | | | Problem: No autocmd triggered in Insert mode with visible popup menu. Solution: Add TextChangedP. (Prabir Shrestha, Christian Brabandt, closes vim/vim#2372, closes vim/vim#1691) Fix that the TextChanged autocommands are not always triggered when sourcing a script. https://github.com/vim/vim/commit/5a093437199001a0d60d8e18e2b9539b99a7757c
* Merge #8218 'Fix errors reported by PVS'Justin M. Keyes2018-04-27
|\ | | | | closes #4983
| * *: Fix clint errorsZyX2018-04-22
| |
| * fileio: Silence PVS/V614: buffer is initialized if conv_restlen > 0ZyX2018-04-15
| |
| * fileio: Fix PVS/V547: split is not usedZyX2018-04-15
| | | | | | This is removed functionality, specifically no longer supported 16-bit integers.
| * fileio: Fix PVS/V560: end was already checkedZyX2018-04-15
| | | | | | See condition at line 3309.
* | IO: let 'fsync' option control more casesJustin M. Keyes2018-04-21
| | | | | | | | | | | | | | | | | | | | | | Vim has the 'swapsync' option which we removed in 62d137ce0969. Instead let 'fsync' control swapfile-fsync. These cases ALWAYS force fsync (ignoring 'fsync' option): - Idle (CursorHold). - Exit caused by deadly signal. - SIGPWR signal. - Explicit :preserve command.
* | win: Fix reading content from stdin (#8267)b-r-o-c-k2018-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #6890 by reading from the Windows console input buffer after stdin has been closed. Vim defines HAVE_DUP for Windows and does the close-dup dance[1]: close(0); dup(2); which always fails, then falls back to reading from the Windows console input buffer[2]. [1] https://github.com/vim/vim/blob/e7499ddc33508d3d341e96f84a0e7b95b2d6927c/src/fileio.c#L2397-L2398 [2] https://github.com/vim/vim/blob/e7499ddc33508d3d341e96f84a0e7b95b2d6927c/src/os_win32.c#L1703-L1714
* | Make vim_fgets() return the same values as in VimMarco Hinz2018-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of vim_fgets() differs between Neovim and Vim. Vim says that it only returns `true` for EOF. But it always returns `true` when fgets() returns NULL. This happens for EOF _or_ errors. That probably misguided the author of Neovim's vim_fgets(), which does NOT return `true` for errors. Since all the callers of vim_fgets() probably expect it to work as it does in Vim (and not as it says), it now returns the same values as the Vim implementation. Fixes #8227
* | vim-patch:8.0.1284: loading file type detection slows down startupJustin M. Keyes2018-04-02
|/ | | | | | | Problem: Loading file type detection slows down startup. Solution: Store the last pattern of an autocommand event to make appending quicker. https://github.com/vim/vim/commit/462455ee8b81cb5709007d91248ac4a88308d6e9
* refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
|
* refactor: eliminate `autocmd_fname_full` globalJustin M. Keyes2018-03-24
| | | | | | | | It's a micro-optimization; check path_is_absolute_path(autocmd_fname) instead. The main optimization (which is still in place) afforded by Vim 7.2.021 was to avoid resolving <afile> when it is not needed.
* provider/RPC: apply_autocmds_group(): fix double-freeJustin M. Keyes2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During provider dispatch, eval_call_provider() saves global state--including pointers, such as `autocmd_fname`--into `provider_caller_scope` which is later restored by f_rpcrequest(). But `autocmd_fname` is special-cased in eval_vars(), for performance (see Vim patch 7.2.021; this is also the singular purpose of the `autocmd_fname_full` global. Yay!) If eval_vars() frees `autocmd_fname` then its provider-RPC-scoped alias becomes a problem. Solution: Don't free autocmd_fname in eval_vars(), just copy into it. closes #5245 closes #5617 Reference ------------------------------------------------------------------------ Vim patch 7.2.021 https://github.com/vim/vim/commit/f6dad43c98f47da1ff9d8c99b320fc3674f83c63 Problem: When executing autocommands getting the full file name may be slow. (David Kotchan) Solution: Postpone calling FullName_save() until autocmd_fname is used. vim_dev discussion (2008): "Problem with CursorMoved AutoCommand when Editing Files on a Remote WIndows Share" https://groups.google.com/d/msg/vim_dev/kj95weZa_eE/GTgj4aq5sIgJ
* lintJustin M. Keyes2018-02-11
|
* vim-patch:8.0.0703: illegal memory access with empty :doau commandJustin M. Keyes2018-02-11
| | | | | | | Problem: Illegal memory access with empty :doau command. Solution: Check the event for being out of range. (James McCoy) https://github.com/vim/vim/commit/faf29d7f91477c25c85d9d7165d90e8d8f1c512e
* vim-patch:8.0.0448: some macros are lower case (#7936)KunMing Xie2018-01-30
| | | | | | | Problem: Some macros are in lower case, which can be confusing. Solution: Make a few lower case macros upper case. https://github.com/vim/vim/commit/b5aedf3e228d35821591da9ae8501b61cf2e264c ref #6297
* io: fix handling EOF in vim_fgetsMatt Widmann2017-11-25
| | | | | | | | | If an EOF is returned from `fgets`, `vim_fgets` might spin forever, as it tries to consume the current line. A `NULL` return value from `fgets` should break out of the function (unless `errno` is `EINTR`), and then `feof` should be used to check for the EOF condition on the stream.
* io: retry fgets on EINTR (#7632)Matt Widmann2017-11-25
| | | | | | | | | | | | | | | | | | The calls to `fgets` in `src/nvim/if_cscope.c` (and elsewhere) can show communication errors to the user if a signal is delivered during its system calls. For plugins that proxy subprocess output into cscope requests, a `SIGCHLD` might *always* interfere with calls into `fgets`. To see this in a debugger, put a breakpoint on `cs_reading_emsg` and watch signals come in (with lldb, using `process handle --notify true --pass true`). Next, run a subcommand from neovim that calls through cscope when it returns. A tag picker plugin, like vim-picker and fzy, with `cscopetag` and `cscopetagorder=0` set, reproduced this reliably. The breakpoint will hit after a `SIGCHLD` is delivered, and `errno` will be set to 4, `EINTR`. The caller of `fgets` should retry when `NULL` is returned with `errno` set to `EINTR`.
* vim-patch:8.0.0227 (#7548)Justin M. Keyes2017-11-13
| | | | | | | Problem: Crash when 'fileformat' is forced to "dos" and the first line in the file is empty and does not have a CR character. Solution: Don't check for CR before the start of the buffer. https://github.com/vim/vim/commit/2aa5f696b91a51f29873e340de4bdc182e1e8dd4
* Merge #7530 'vim-patch:8.0.0226 vim-patch:8.0.0224'Justin M. Keyes2017-11-13
|\
| * fix lint errorckelsel2017-11-11
| |
| * vim-patch:8.0.0224ckelsel2017-11-10
|/ | | | | | | | | Problem: When 'fileformats' is changed in a BufReadPre auto command, it does not take effect in readfile(). (Gary Johnson) Solution: Check the value of 'fileformats' after executing auto commands. (Christian Brabandt) https://github.com/vim/vim/commit/7a2699e868bca781e26b060a44fc714d87cfa4ba
* buf_write(): handle NULL fname on non-unixJustin M. Keyes2017-08-10
|
* buf_write(): wrong argument to os_fileinfo_hardlinksJustin M. Keyes2017-08-09
| | | | | | | This was broken in ye olde refactor from 2014: e85fe0957d40080f43cbfcbe9eb8864475325b09 References #4370
* lintckelsel2017-07-13
|
* vim-patch:7.4.2229ckelsel2017-07-13
| | | | | | | | | | | https://github.com/vim/vim/commit/f04507d132fbcb63999167ec006fc6e700b5af4f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 20 15:05:39 2016 +0200 patch 7.4.2229 Problem: Startup test fails on Solaris. Solution: Recognize a character device. (Danek Duvall)
* vim-patch:7.4.2189ckelsel2017-07-13
| | | | | | | | | | | | https://github.com/vim/vim/commit/f71d7b9ee5ceba75f70c30845332ddd728fd16c6 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 9 22:14:05 2016 +0200 patch 7.4.2189 Problem: Cannot detect encoding in a fifo. Solution: Extend the stdin way of detecting encoding to fifo. Add a test for detecting encoding on stdin and fifo. (Ken Takata)
* lintJames McCoy2017-06-04
|
* vim-patch:7.4.1976James McCoy2017-06-04
| | | | | | | Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata) https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
* vim-patch:7.4.1975James McCoy2017-06-04
| | | | | | | | | | | Problem: On MS-Windows large files (> 2Gbyte) cause problems. Solution: Use "off_T" instead of "off_t". Use "stat_T" instead of "struct stat". Use 64 bit system functions if available. (Ken Takata) https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe Only the off_T changes are relevant, since all the "struct stat" usage is abstracted by libuv.
* doc: bracketed-paste-modeJustin M. Keyes2017-05-01
|
* *: Add comment to all C filesZyX2017-04-19
|
* fileio: Simlify help files encoding detectionZyX2017-04-16
| | | | Most of code is dead when enc_utf8 is always true. Given that `c` is being reused for other purposes I left it set to 1 just in case.
* fileio: Fix most linter errorsZyX2017-04-03
| | | One error is still kept: buf_write function is too large.
* fileio: Save details about E212 errorZyX2017-04-03
|
* fileio: Refactor msg_add_fname to something which needs no commentsZyX2017-04-03
|
* fileio: Clean up IObuff-manipulation messZyX2017-04-03
|
* fileio: Refactor errmsg handlingZyX2017-04-03
| | | | | | | | Adds os_strerror() result to a number of places. Also since I could not track where err\* variables are NULL and where they are not, using macros to make sure that all three variables are set at once. Removes #ifdef UNIX around the use of os_fsync, makes it use os_close in place of close in some places.
* *: Fix some Windows-specific warningsZyX2017-03-29
| | | | Also fixed an error in path_fnamecmp().
* eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* vim-patch:8.0.0486Justin M. Keyes2017-03-22
| | | | | | | | | | Problem: Crash and endless loop when closing windows in a SessionLoadPost autocommand. Solution: Check for valid tabpage. (partly neovim/neovim#6308) https://github.com/vim/vim/commit/8c752bd6c4af54c0b7bac35a39acc2bf16015f85 Closes #6308