aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: remove some unused includes (#19740)zeertzjq2022-08-12
| | | | Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other headers.
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* Merge pull request #19437 from dundargoc/refactor/char_u-to-charbfredl2022-07-31
|\ | | | | refactor: replace char_u with char
| * refactor: replace char_u with charDundar Goc2022-07-31
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | docs: fix typos (#19024)dundargoc2022-07-31
|/ | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
* fix(tmpdir): invalid tempname() if username has slashes #19323August Masquelier2022-07-19
| | | | | fix #19240 Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:8.1.1547: functionality of bt_nofile() is confusingzeertzjq2022-07-15
| | | | | | Problem: Functionality of bt_nofile() is confusing. Solution: Split into bt_nofile() and bt_nofilename(). https://github.com/vim/vim/commit/26910de8b0da6abab87bd5a397330f9cbe483309
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change config to better align with style guide (#18803)dundargoc2022-06-30
| | | refactor(uncrustify): change config to better align with neovim style
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* refactor: enable -Wconversion warning for fileio.cDundar Goc2022-06-29
| | | | Work on https://github.com/neovim/neovim/issues/567
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
* refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | related vim-8.2.{4402,4639}
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(ui): simplify stdin handlingbfredl2022-05-02
|
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
|
* refactor(uncrustify): disable formatting in problematic code sectionsDundar Goc2022-04-29
|
* fix: suppress "is a directory" messages with shortmess 'F' (#18296)Gregory Anders2022-04-28
| | | | When 'F' is in 'shortmess', don't show messages when editing a directory. This fixes a regression introduced by 0956283.
* fix: show autocmd output when F is in shortmess (#18251)Gregory Anders2022-04-25
| | | | | | | | | | | The default value of including F in 'shortmess' has the unfortunate side effect of hiding output from autocommands. This is a common source of confusion and often leads people to think their autocommands are not working when they are. There is a small snippet in the docs for 'shortmess' indicating that the F flag suppresses autocmd output, but it's not easy to find if you don't already know to look for it. This commit removes that behavior of the F flag to make it only suppress file info when opening a new file.
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* fix/PVS #17863dundargoc2022-04-24
| | | | | | | | | | | | | | | | | | * fix(PVS/V002): disable rule completely V002: "Some diagnostic messages may contain incorrect line number in this file." This particular check seems unreliable. It says on their website https://pvs-studio.com/en/docs/warnings/v002/ that this warning occurs when there are multiline pragmas, but there are none in extmark.c. * fix(PVS/V756): ignore "counter is not used inside a nested loop" warning The nested loop starts with "AutoCmd *ac = ap->cmds" so "ap" is definitely used. * fix(PVS/V560): disable "a part of conditional expression is always true" * fix(PVS/V614): potentially uninitialized variable 'blen' used
* vim-patch:8.2.4704: using "else" after return or break increases indent (#18032)zeertzjq2022-04-08
| | | | | Problem: Using "else" after return or break increases indent. Solution: Remove "else" and reduce indent. (Goc Dundar, closes vim/vim#10099) https://github.com/vim/vim/commit/f26c16144ddb27642c09f2cf5271afd163b36306
* vim-patch:8.2.4696: delete() with "rf" argument does not report a failure ↵zeertzjq2022-04-06
| | | | | | | (#18002) Problem: delete() with "rf" argument does not report a failure. Solution: Return -1 if the directory could not be removed. (closes vim/vim#10078) https://github.com/vim/vim/commit/478700336d1c72e133b8ff6841e968c1bb1658ed
* 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.