aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: convert TRUE/FALSE to true/false (#15660)dundargoc2021-09-18
|
* fix: "redundant cast to the same type" #15662dundargoc2021-09-14
| | | Apply "redundant cast to the same type" fix from clangd.
* refactor: replace TRUE/FALSE with true/false #15647dundargoc2021-09-13
|
* refactor: format files with uncrustify #15607dundargoc2021-09-10
|
* fix: remove trailing slashes before making directoryGregory Anders2021-08-27
| | | | | | Remove the trailing slashes from 'undofile' and 'backupdir' before creating directories. They cause problems on Windows which doesn't recognize these slashes as proper path separators.
* feat: defaults: auto-create backup dirGregory Anders2021-08-27
| | | | | | | | | | | | | | | | | Copy the behavior of 'undodir' and create the last specified directory in the 'backupdir' option if it doesn't exist. Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir' by default. Note that 'undodir' always behaves as though it has the trailing slashes, regardless of whether or not they are present. They are added to the default option value to minimize surprise. The '.' value in 'backupdir' is kept because the default behavior for backups is solely to have a backup if the save of the main file to disk fails. As soon as that save is completed the backup file is removed, so generally there is no need to put them in a central location. Co-authored by: murphy66 <murphy66@gmail.com>
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-26
| | | | Focus is on global variables.
* refactor(undo): don't assume curbuf in u_compute_hashThomas Vigouroux2021-07-09
|
* buffer: move BUFEMPTY to a functionThomas Vigouroux2021-07-06
|
* undo: reduce reliance on curbufThomas Vigouroux2021-07-06
|
* buffer: don't rely on curbuf in BUFEMPTYThomas Vigouroux2021-07-06
|
* Revert "vim-patch:8.1.1378: delete() can not handle a file name that looks ↵Marco Hinz2021-05-12
| | | | | | | | | like a pattern (#12784)" This reverts commit 4be0e92db01a502863ac4bb26dd0fee16d833145. Unfortunately, that commit stalled the Windows builds on GHA and likely requires other patches to work properly.
* vim-patch:8.1.1378: delete() can not handle a file name that looks like a ↵Shougo2021-05-07
| | | | | | | | pattern (#12784) Problem: Delete() can not handle a file name that looks like a pattern. Solution: Use readdir() instead of appending "/*" and expanding wildcards. (Ken Takata, closes vim/vim#4424, closes vim/vim#696) https://github.com/vim/vim/commit/701ff0a3e53d253d7300c385e582659bbff7860d
* vim-patch:8.2.2828: Coverity complains about not checking rename() return valueJan Edmund Lazo2021-05-05
| | | | | | Problem: Coverity complains about not checking the rename() return value. Solution: Add "(void)", can't do anything in case of a failure. https://github.com/vim/vim/commit/97a6c6a1fb6043fd6520fbaaafc6970334186167
* vim-patch:8.1.2313: debugging where a delay comes from is not easyJan Edmund Lazo2021-04-15
| | | | | | Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay(). https://github.com/vim/vim/commit/eda1da0c9a8db1400649629117e7d248c07735f7
* clang/'Dead store': do not assign fnamelenJan Edmund Lazo2021-04-02
| | | | | | Vim hasn't changed this line in buf_modname(). Assigning a value to fnamelen is useless when evaluating strlen() is sufficient for the condition check.
* buffer updates: add on_reload callback and handle it in treesitter parserBjörn Linse2021-02-10
|
* option: use char* for set_string_option_direct()Jan Edmund Lazo2021-02-07
| | | | | | | "name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
* vim-patch:8.1.1032: warnings from clang static analyzerJan Edmund Lazo2020-12-28
| | | | | | Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan) Solution: Fix relevant warnings. https://github.com/vim/vim/commit/2c519cf3bfe76083767ac94c674d2e161ed36587
* vim-patch:8.2.2231: when "--remote file" is used "file" is not reloadedJan Edmund Lazo2020-12-27
| | | | | | | | | | | Problem: When "--remote file" is used "file" is not reloaded. Solution: When a :drop command is used for a file that is already displayed in a window and it has not been changed, check if it needs to be reloaded. (closes vim/vim#7560) https://github.com/vim/vim/commit/e4862a0fe62261754daf476866ef2aa8586b716c Remove unused "focus" parameter from "buf_check_timestamp()". It was meant for removed GUI code.
* vim-patch:8.2.0928: many type casts are used for vim_strnsave()Jan Edmund Lazo2020-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes vim/vim#5633) Remove some type casts. https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff N/A patches for version.c: vim-patch:8.2.0315: build failure on HP-UX system Problem: Build failure on HP-UX system. Solution: Use LONG_LONG_MIN instead of LLONG_MIN. Add type casts for switch statement. (John Marriott) https://github.com/vim/vim/commit/c593bec4120f122e8a9129ec461968f1bd214435 vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/39cb2dab18e85fc60f116a4543e433616872b690 vim-patch:8.2.2232: compiler error for falling through into next case Problem: Compiler error for falling through into next case. Solution: Move FALLTHROUGH below the #endif https://github.com/vim/vim/commit/9618a25b9c054f0ee4e267d2db96b6e7c113ed7a
* Merge pull request #13595 from teto/fix-fillerBjörn Linse2020-12-24
|\ | | | | de curwinify some functions
| * fix: appease linterMatthieu Coudron2020-12-24
| |
| * refactor: de-curwin-ify update_topline/curs_columnsMatthieu Coudron2020-12-23
| |
* | vim-patch:8.1.0470: pointer ownership around fname_expand() is unclearJan Edmund Lazo2020-12-19
|/ | | | | | | Problem: Pointer ownership around fname_expand() is unclear. Solution: Allow b_ffname and b_sfname to point to the same allocated memory, only free one. Update comments. https://github.com/vim/vim/commit/3d6014f0336d9a64c01a7518fe45fde0a925fa20
* fileio: detach buffer when buffer was reloaded (like with :edit)Björn Linse2020-12-08
|
* vim-patch:8.1.0825: code for autocommands is mixed with file I/O code (#13305)TJ DeVries2020-11-24
|
* globals: eliminate "enc_utf8" macroJan Edmund Lazo2020-11-14
| | | | | "enc_utf8" macro evaluates to "true". Continue dead code removal, started in https://github.com/neovim/neovim/pull/13275.
* vim-patch:8.1.0805: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 1. https://github.com/vim/vim/commit/135059724f140ceac889c9f8136bd1bf5c41d49d
* vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)tamago3242020-11-06
| | | | | Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes vim/vim#3306) https://github.com/vim/vim/commit/d569bb029983cff947dce704e6f830276204c13f
* vim-patch:8.2.1219: symlink not followed if dirname ends in //Jan Edmund Lazo2020-10-17
| | | | | | Problem: Symlink not followed if dirname ends in //. Solution: Resolve symlink earlier. (Tomáš Janoušek, closes vim/vim#6454) https://github.com/vim/vim/commit/5966ea105ea86e52a734e04267956e11efffc92d
* fileio: fix "is a directory" warning on Windowserw72020-10-06
| | | | | | The porting of vim/vim@c8fe645 by #13040 on Windows was incomplete. This fixes that and makes the "is a directory" warning appear properly on Windows as well.
* vim-patch:8.2.1793: not consistently giving the "is a directory" warningShougo Matsushita2020-10-06
| | | | | | | Problem: Not consistently giving the "is a directory" warning. Solution: Adjust check for illegal file name and directory. (Yasuhiro Matsumoto, closes vim/vim#7067) https://github.com/vim/vim/commit/c8fe645c198e2ca55c4e3446efbbdb9b995c63ce
* vim-patch:8.2.1088: a very long translation might cause a buffer overflowJan Edmund Lazo2020-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: A very long translation might cause a buffer overflow. Solution: Trunctate the message if needed. https://github.com/vim/vim/commit/6378b21d6dd38cc0f80aa6d31d747db6c287483b N/A patches for version.c: vim-patch:8.1.0524: terminal test fails on Windows Problem: Terminal test fails on Windows. Solution: Skip Test_terminal_does_not_truncate_last_newlines() for now. https://github.com/vim/vim/commit/c2c02574ec76f8d44b948cede9cca38ac91622de vim-patch:8.1.1613: popup window test fails with Athena and Motif Problem: Popup window test fails with Athena and Motif. Solution: Compute the highlight attribut when the GUI is not active. https://github.com/vim/vim/commit/a83e70000f106a1e1e0f86e8e362ec94c0df074c vim-patch:8.2.1713: Motif GUI: crash when setting menu colors Problem: Motif GUI: crash when setting menu colors. (Andrzej Bylicki) Solution: Add {} to make "n" incremented correctly. (closes vim/vim#6989, closes vim/vim#5948) https://github.com/vim/vim/commit/7795bfea6d30c85f2c05d986a0cfe4019df4d74d vim-patch:8.2.1715: Motif GUI: commented out code missed {} Problem: Motif GUI: commented out code missed {}. Solution: Add {} and reenable the code. (similar to vim/vim#6989) https://github.com/vim/vim/commit/26cd3063b2e2084cfd17989e7584c64f278aaaef vim-patch:8.2.1717 Problem: MS-Windows installer doesn't have Russian translations. Solution: Add Russian translations. (closes vim/vim#6985) https://github.com/vim/vim/commit/809fcecddce59ccb59384d63f5e0505c89f69209 vim-patch:8.2.1721: MS-Windows installer doesn't work Problem: MS-Windows installer doesn't work. Solution: Write "Russian" in ASCII. (closes vim/vim#6995, see #). https://github.com/vim/vim/commit/7f9c9c51a3680f120e1c3f2bb7239c9fa115b27f vim-patch:8.2.1735: Github actions appear to timeout too soon Problem: Github actions appear to timeout too soon. Solution: use "timeout" instead of "ping". https://github.com/vim/vim/commit/851d108313317a062371a6750e6c6bf370a9bafa vim-patch:8.2.1738: Mac: str2float() recognizes comma instead of decimal point Problem: Mac: str2float() recognizes comma instead of decimal point. Solution: Set LC_NUMERIC to "C". (closes vim/vim#7003) https://github.com/vim/vim/commit/509f8031b2b347c033327ef33f3e5573a0595dbc vim-patch:8.2.1745: tiny version doesn't build Problem: Tiny version doesn't build. Solution: Add dummy ex_var() function. https://github.com/vim/vim/commit/d47f50b3312af2b8baf37505b7a589daf3f7d942
* api/buffer: add "on_bytes" callback to nvim_buf_attachBjörn Linse2020-09-09
| | | | | | This implements byte-resolution updates of buffer changes. Note: there is no promise that the buffer state is valid inside the callback!
* vim-patch:8.1.1115: cannot build with older C compilerJan Edmund Lazo2020-08-17
| | | | | | Problem: Cannot build with older C compiler. Solution: Move variable declaration to start of block. https://github.com/vim/vim/commit/8f4aeb5572d604d1540ee0cb7e721b5f0cc6d612
* vim-patch:8.0.1774: reading very long lines can be slowJan Edmund Lazo2020-08-02
| | | | | | | Problem: Reading very long lines can be slow. Solution: Read up to 1 Mbyte at a time to avoid a lot of copying. Add a check for going over the column limit. https://github.com/vim/vim/commit/13d3b05ed2cf9a54b18b4e8236f0af2c5386200c
* vim-patch:8.2.0966: 'shortmess' flag "n" not used in two placesJan Edmund Lazo2020-06-18
| | | | | | | Problem: 'shortmess' flag "n" not used in two places. Solution: Make use of the "n" flag consistent. (Nick Jensen, closes vim/vim#6245, closes vim/vim#6244) https://github.com/vim/vim/commit/722e505d1a55dfde5ab62241d10da91d2e10c3c1
* vim-patch:8.1.0475: memory not freed on exit when quit in autocmderw72020-05-07
| | | | | | Problem: Memory not freed on exit when quit in autocmd. Solution: Remember funccal stack when executing autocmd. https://github.com/vim/vim/commit/27e80c885bcb5c5cf6a6462d71d6c81b06ba2451
* Merge #11851 'eval.c: factor out eval/userfunc.c'Justin M. Keyes2020-04-26
|\ | | | | | | vim-patch:7.4.2058
| * rename: user_funcs -> userfuncJakub Łuczyński2020-02-13
| | | | | | | | Lets stick with vim for now
| * fix: includesJakub Łuczyński2020-02-13
| |
* | Make neovim building even with libuv 1.18.0Matěj Cepl2020-04-21
| | | | | | | | (found for example on openSUSE/Leap 15.*)
* | vim-patch:8.2.0474: cannot use :write when using a plugin with BufWriteCmdJan Edmund Lazo2020-04-13
| | | | | | | | | | | | Problem: Cannot use :write when using a plugin with BufWriteCmd. Solution: Reset BF_NOTEDITED after BufWriteCmd. (closes vim/vim#5807) https://github.com/vim/vim/commit/0fff44152d06e6b662ad4bef172af07a041d2f3f
* | vim-patch:8.0.1660: the terminal API "drop" command doesn't support optionsJan Edmund Lazo2020-02-16
|/ | | | | | Problem: The terminal API "drop" command doesn't support options. Solution: Implement the options. https://github.com/vim/vim/commit/333b80acf3a44e462456e6d5730e47ffa449c83d
* doc: fix typos [ci skip] #11787Hye Sung Jung2020-01-30
|
* autocmd: WinClosed exposes window id as <afile>notomo2020-01-18
|