aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
...
* ui: Remove/adapt some old code for a big UI refactorThiago de Arruda2015-02-16
| | | | | | | | | | | | | - Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
* coverity/102149: Out-of-bounds access: FP.Eliseo Martínez2015-02-11
| | | | | | | | | | Problem : Out-of-bounds access @ 5815. Diagnostic : False positive. Rationale : Error occurs when event_name2nr() returns NUM_EVENTS, which means an event with that name was not found. That cannot happen, as previous check using find_end_event() @ 5744 ensures event name exists. Resolution : Assert event_name2nr() result is less thatn NUM_EVENTS.
* Remove vimdiffMichael Reed2015-02-03
| | | | | | | While we're here: - Remove references to the '+diff' feature, which has since been made non-optional. - Update a few Vim instances with Nvim.
* Remove nonnullret deadcode: home_replace_save.Eliseo Martínez2015-01-27
|
* Remove nonnullret deadcode: enc_canonize.Eliseo Martínez2015-01-27
|
* Remove nonnullret deadcode: Mark new nonnullret functions.Eliseo Martínez2015-01-27
|
* Macro cleanup: HAS_SWAP_EXISTS_ACTIONMichael Reed2015-01-14
| | | | | | | Neovim always ships with all features[0], so this serves no purpose. Besides, this always evaluated to true. [0]: https://github.com/neovim/neovim/wiki/Differences-from-vim
* Macro cleanup: PROTOMichael Reed2015-01-14
| | | | | | Regarding dict_lookup() in eval.c: both definitions are the same, the only difference being the spacing between the indirection operator and the indentation level.
* vim-patch:7.4.493Florian Walch2014-12-23
| | | | | | | | | Problem: A TextChanged autocommand is triggered when saving a file. (William Gardner) Solution: Update last_changedtick after calling unchanged(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-493
* vim-patch:7.4.456Marco Hinz2014-12-20
| | | | | | | | Problem: 'backupcopy' is global, cannot write only some files in a different way. Solution: Make 'backupcopy' global-local. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-456
* coverity/75594: Explicit null dereferenced: RI.Eliseo Martínez2014-12-16
| | | | | | | | Problem : Exlicit null dereferenced (FORWARD NULL) @ 2859. Diagnostic : Real issue. Rationale : Code within `if (!p_bk)` seems to assume `backup` not null at that point, which may not be true. Resolution : Don't enter conditional on null `backup`.
* Reduce indentation level by early returning or continuing loopFelipe Oliveira Carvalho2014-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace code like this ```c func() { if (cond) { ... ... ... } return ret; } ``` ```c for (...) { if (cond) { ... ... ... } } ``` with ```c func() { if (!cond) { return ret; } ... ... ... } ``` ```c for (...) { if (!cond) { continue; } ... ... ... } ```
* term: Remove most calls to settmodeThiago de Arruda2014-12-02
| | | | | | Nvim now relies much less on setting terminal mode to cooked mode, remove most calls to settmode, except for those that happen on startup or when suspending. Eventually even those will be handled by the UI layer.
* ui: Remove redundant ui.h includesThiago de Arruda2014-11-27
| | | | Also move read_error_exit to os/input.c
* ui: Remove ui_delay, ui_breakcheck and ui_set_shellsizeThiago de Arruda2014-11-27
| | | | | These functions only used to call another os_* function, so remove them and replace all occurences in the project.
* Convert some values from buffer_defs.h to boolsWayne Rowcliffe2014-11-12
|
* vim-patch:7.4.414Scott Prager2014-11-11
| | | | | | | | Problem: Cannot define a command only when it's used. Solution: Add the CmdUndefined autocommand event. (partly by Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-414
* Fix fileio.c's diagram.Scott Prager2014-11-11
|
* Fix warnings: fileio.c: aucmd_prepbuf(): Np dereference: FP.Eliseo Martínez2014-11-11
| | | | | | | | | | Problem : Dereference of null pointer @ 6219. Diagnostic : False positive. Rationale : Problem occurs if `aucmd_win` is NULL after `win_alloc_aucmd_win()`, which cannot happen since it uses new memory functions. So, this is a leftover since OOM refactorization. Resolution : Remove dead code.
* Fix warnings: fileio.c: readfile(): Dead assignment: HI.Eliseo Martínez2014-11-11
| | | | | | | | | | | Problem : Dead assignment @ 1754. Diagnostic : Harmless issue. Rationale : It's true `iconv_fd` is not going to be used again (we are in the failure handler). But what is being done (assigning sentinel value to mark as "empty" after destroying) is in fact good practice, which could turn significant if more code is added later on. So, we don't want to remove this. Resolution : Leave it there, but exclude from analysis.
* iconv: re-enableNicolas Hillegeer2014-11-06
| | | | | This seems to have been disabled in the transition from vim to neovim, re-enable it.
* vim-patch:7.4.436 #1246Naveen Kumar Molleti2014-10-16
| | | | | | | | | Problem: ml_get error for autocommand that moves the cursor of the current window. Solution: Check the cursor position after switching back to the current buffer. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-436
* Merge pull request #1208 from war1025/dev/remove_for_all_windowsJustin M. Keyes2014-10-03
|\ | | | | Remove FOR_ALL_WINDOWS and replace with FOR_ALL_WINDOWS_IN_TAB(curtab)
| * Replace FOR_ALL_WINDOWS with FOR_ALL_WINDOWS_IN_TAB(curtab)Wayne Rowcliffe2014-09-24
| |
* | Merge pull request #1209 from atwupack/vp-7.4.320Justin M. Keyes2014-09-26
|\ \ | |/ |/| vim-patch:7.4.320
| * vim-patch:7.4.320André Twupack2014-09-21
| | | | | | | | | | | | | | | | Problem: Possible crash when an BufLeave autocommand deletes the buffer. Solution: Check for the window pointer being valid. Postpone freeing the window until autocommands are done. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-320
* | FOR_ALL_WINDOWS_IN_TAB and local variables in FOR_ALL_TAB_WINDOWSWayne Rowcliffe2014-09-22
|/
* Additional FOR_ALL_WINDOWS usageWayne Rowcliffe2014-09-08
|
* fileinfo: change returntype of os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | off_t -> uint64_t
* fileinfo: rename os_file_info_id_equalStefan Hoffmann2014-08-31
|
* fileinfo: rename os_get_file_info{,_link,_fd}Stefan Hoffmann2014-08-31
|
* fileinfo: implement os_fileinfo_hardlinksStefan Hoffmann2014-08-31
|
* fileinfo: implement os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | this replaces os_get_file_size and file_info.stat.st_size
* Merge pull request #1024 from war1025/dev/for_all_buffersJustin M. Keyes2014-08-19
|\ | | | | Add FOR_ALL_BUFFERS helper
| * FOR_ALL_BUFFERS use locally declared buffer pointerWayne Rowcliffe2014-08-17
| |
| * Add FOR_ALL_BUFFERS helperWayne Rowcliffe2014-08-02
| |
* | os_fchown: remove cast of parameter -1 to uid_tPavel Platto2014-08-16
| |
* | os_fchown: impl and remove HAVE_FCHOWNPavel Platto2014-08-13
| |
* | Remove FEAT_OSFILETYPEPavel Platto2014-08-02
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Feature description from Vim documentation: NOTE: this code is currently disabled, as the RISC OS implementation was removed. In the future this will use the 'filetype' option. On operating systems which support storing a file type with the file, you can specify that an autocommand should only be executed if the file is of a certain type. The actual type checking depends on which platform you are running Vim on; see your system's documentation for details. To use osfiletype checking in an autocommand you should put a list of types to match in angle brackets in place of a pattern, like this: > :au BufRead *.html,<&faf;HTML> runtime! syntax/html.vim This will match: - Any file whose name ends in ".html" - Any file whose type is "&faf" or "HTML", where the meaning of these types depends on which version of Vim you are using. Unknown types are considered NOT to match.
* Fix #963.Pavel Platto2014-07-17
| | | | | | Problem: Bug was introduced because `os_open` returns `-errno` in case of an error instead of just `-1` which was returned by `mch_open`. Solution: Check return value with `< 0` instead of `== -1`.
* vim: move vim_acl_T to types.hNicolas Hillegeer2014-07-16
| | | | | Also include "types.h" in os_unix.h because it declares functions that return vim_acl_T.
* Extract `tempfile` module from fileioPavel Platto2014-07-14
| | | | | | | Though this module is relatively small it has very clear boundaries. The last argument for extracting `tempfile` was the errors which I got when I was writing unittests for it: `cimport './src/nvim/fileio.h'` does not work for some reason.
* Add vim_gettempdir(), remove global vim_tempdirPavel Platto2014-07-14
| | | | | vim_gettempdir() and vim_maketempdir() was extracted from vim_tempname().
* Refactor vim_tempnamePavel Platto2014-07-14
| | | | | | | | | - temp_count is uint32_t now instead of long because it supposed to be at most 999999999 (comment on line 5227) temporary files. The most probably it was a long for compatibility with systems where int is 16-bit. - Use "nvim" as prefix for temp folder name instead of "v" - Remove unused parameter from vim_tempname
* Remove #ifdefs TEMPDIRNAMES and add TEMPDIRNAMES for WindowsPavel Platto2014-07-14
| | | | | | | | Vim does not define TEMPDIRNAMES for all systems, but it is defined for all systems supported by Neovim. Temporary directory names for Windows was obtained from GetTempPath() function documentation at MSDN. Additionally small renamings were performed.
* Remove USE_TMPNAMPavel Platto2014-07-14
| | | | tmpnam() is deprecated.
* Remove HAVE_MKDTEMPPavel Platto2014-07-14
| | | | | For now we provide simple `mkdtemp` for Windows, in the future we will use libuv for that.
* Temporary os_mkdtemp implementation. Use it instead of mkdtemp.Pavel Platto2014-07-14
|
* os_open: impl mch_open with libuv. ref #133Justin M. Keyes2014-07-14
| | | | | | | | | - use return value instead of open_req.result - libuv uv_fs_open() returns `-errno` instead of always -1 - libuv always sets open_req.result to the return value, _except_ for OOM where it only sets the return value. So always use the return value. - replace calls to mch_open macro. - update call sites expecting -1 error
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|