aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
...
* 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
|
* 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