aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
* vim-patch:8.2.4639: not sufficient parenthesis in preprocessor macrosBrian Leung2022-04-03
| | | | | | Problem: Not sufficient parenthesis in preprocessor macros. Solution: Add more parenthesis. https://github.com/vim/vim/commit/9dac9b1751dd43c02470cc6a2aecaeea27abcc80
* [RFC] vim-patch:8.1.1378: delete() can not handle a file name that looks ↵Shougo2022-04-03
| | | | | | | | | | | | li… (#16268) 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 Cherry-pick a change to Test_delete_rf() from patch 8.1.1921. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.2.3453: autocmd not executed when editing a directory (#17846)zeertzjq2022-03-26
| | | | | | Problem: Autocmd not executed when editing a directory ending in a path separator inside try block. Solution: Return NOTDONE instead of FAIL. (closes vim/vim#8885) https://github.com/vim/vim/commit/40fa12aea352474d229f2f750e954a4318aead4e
* refactor: convert function comments to doxygen format (#17710)dundargoc2022-03-24
|
* refactor(uncrustify): disable uncrustify for misformatted code sectionsDundar Göc2022-03-10
| | | | | Uncrustify version 0.74 has a bug that deindents and misformats the entire fileio.c.
* chore(lgtm): fix "empty block without comment" warningsDundar Göc2022-03-09
|
* refactor: remove redundant castsDundar Göc2022-03-06
|
* feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
|
* vim-patch:8.2.4343: when reloading not all properties are detectedzeertzjq2022-02-14
| | | | | | | | Problem: When reloading not all properties are detected. Solution: Add the "edit" value to v:fcs_choice. (Rob Pilling, closes vim/vim#9579) https://github.com/vim/vim/commit/8196e94a8b72ed8618605cb66615571313097d78 Cherry-pick some test changes from patch 8.1.1826.
* vim-patch:8.2.3515: nano time test fails on Mac and FreeBSDzeertzjq2022-02-13
| | | | | | | Problem: Nano time test fails on Mac and FreeBSD. Solution: Also check nano time when not on Linux. (Ozaki Kiichi, closes vim/vim#9000) https://github.com/vim/vim/commit/def69dffb3d09a69629b071c89b7893a1783ba53
* vim-patch:8.2.3510: changes are only detected with one second accuracyzeertzjq2022-02-13
| | | | | | | | | Problem: Changes are only detected with one second accuracy. Solution: Use the nanosecond time if possible. (Leah Neukirchen, closes vim/vim#8873, closes vim/vim#8875) https://github.com/vim/vim/commit/0a7984af5601323fae7b3398f05a48087db7b767 In Nvim Test_checktime_fast() is also flaky. Add a delay to avoid that.
* vim-patch:8.2.2199: first write after setting 'eol' does not have NL addedzeertzjq2022-02-09
| | | | | | | Problem: First write after setting 'eol' does not have NL added. (Tomáš Janoušek) Solution: Only use b_no_eol_lnum when doing a binary write. (closes vim/vim#7535) https://github.com/vim/vim/commit/b3c8b1d25414f2e24ad03551cdf125b3e2c142b1
* vim-patch:8.2.1128: the write message mentions characters, but it's byteszeertzjq2022-02-04
| | | | | | Problem: The write message mentions characters, but it's actually bytes. Solution: Change "C" to "B" and "characters" to "bytes". https://github.com/vim/vim/commit/3f40ce78f5c178d15871bd784ed878c78f0b8a44
* vim-patch:8.1.2302: :lockmarks does not work for '[ and ']Sean Dewar2022-01-27
| | | | | | | | | Problem: :lockmarks does not work for '[ and ']. Solution: save and restore '[ and '] marks. (James McCoy, closes vim/vim#5222) https://github.com/vim/vim/commit/f4a1d1c0542df151bc59ac3b798ed198b5c71ccc Test_diff_maintains_change_mark doesn't actually fail without these changes. This is fixed in v8.2.3936.
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* Merge pull request #16381 from VVKot/vim-8.1.0228Jan Edmund Lazo2021-11-30
|\ | | | | vim-patch:8.1.0228, 8.1.1384, 8.1.1386, 8.1.1393, 8.2.3040
| * vim-patch:8.1.1386: unessesary type casts for lalloc()VVKot2021-11-22
| | | | | | | | | | | | Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size). https://github.com/vim/vim/commit/18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced
* | fix(fileio): replace characters over INT_MAX with U+FFFD (#16354)Javier Lopez2021-11-23
|/ | | | fixes #11877 credit: @zubairabid https://github.com/neovim/neovim/pull/12010
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* vim-patch:8.1.0306: plural messages are not translated properlyJames McCoy2021-11-01
| | | | | | Problem: Plural messages are not translated properly. Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin) https://github.com/vim/vim/commit/da6e8919e75fa8f961d1b805e877c8a92e76dafb
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* refactor: remove space after starDundar Göc2021-10-19
|
* refactor: make commas trail in enumsDundar Göc2021-10-19
|
* vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-06
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* 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
|