aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
Commit message (Collapse)AuthorAge
...
* Remove char_u: after_pathstep()Mark Bainter2015-04-17
| | | | See: #459
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* Remove all references to JobActivityMarco Hinz2015-04-11
| | | | | | | | | The JobActivity event got replaced by callback functions provided to jobstart() or termopen(). It got removed here: https://github.com/neovim/neovim/commit/6e7757ad51dfe3b2de857ff8a8688718ff6115ac
* messages: Update common instances of Vim to Nvim #2031Michael Reed2015-04-08
|
* eval: Refactor vimscript job control APIThiago de Arruda2015-03-29
| | | | | | | | | | - Remove JobActivity autocmd and v:job_data variable - Simplify `jobstart` to receive: - An argument vector - An optional dictionary which may contain any of the current `jobstart` options plus `on_stdout`, `on_stderr` and `on_exit` callbacks. - Refactor and add more job tests - Update documentation
* terminal: New module that implements a terminal emulatorThiago de Arruda2015-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit integrates libvterm with Neovim and implements a terminal emulator with nvim buffers as the display mechanism. Terminal buffers can be created using any of the following methods: - Opening a file with name following the "term://[${cwd}//[${pid}:]]${cmd}" URI pattern where: - cwd is the working directory of the process - pid is the process id. This is just for use in session files where a pid would have been assigned to the saved buffer title. - cmd is the command to run - Invoking the `:terminal` ex command - Invoking the `termopen` function which returns a job id for automating the terminal window. Some extra changes were also implemented to adapt with terminal buffers. Here's an overview: - The `main` function now sets a BufReadCmd autocmd to intercept the term:// URI and spawn the terminal buffer instead of reading the file. - terminal buffers behave as if the following local buffer options were set: - `nomodifiable` - `swapfile` - `undolevels=-1` - `bufhidden=hide` - All commands that delete buffers(`:bun`, `:bd` and `:bw`) behave the same for terminal buffers, but only work when bang is passed(eg: `:bwipeout!`) - A new "terminal" mode was added. A consequence is that a new set of mapping commands were implemented with the "t" prefix(tmap, tunmap, tnoremap...) - The `edit` function(which enters insert mode) will actually enter terminal mode if the current buffer is a terminal - The `put` operator was adapted to send data to the terminal instead of modifying the buffer directly. - A window being resized will also trigger a terminal resize if the window displays the terminal.
* coverity/13777: String not null terminated: RI.Eliseo Martínez2015-03-22
| | | | | | | | | | | | | | Problem : String not null terminated @ 1543. Diagnostic : Real issue. Rationale : We are reading a struct block0, which contains some string fields, from a file, without checking for string fields to be correctly terminated. That could cause a buffer overrun if file has somehow been garbled. Resolution : Add string fields check for nul termination. Mark issue as intentional (there seems to be no way of teaching coverity about read_eintr being ok that way). Helped-by: oni-link <knil.ino@gmail.com>
* Merge consecutive identical 'if' statementsAnton Ovchinnikov2015-03-16
|
* vim-patch:7.4.637 #2126Lech Lorens2015-03-13
| | | | | | | | Problem: Incorrectly read the number of buffer for which an autocommand should be registered. Solution: Reverse check for "<buffer=abuf>". (Lech Lorens) https://code.google.com/p/vim/source/detail?r=v7-4-637
* Remove redundant castsAnton Ovchinnikov2015-03-09
|
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code
* Enable -Wconversion: Passing-by: Remove dead code (MACOS_CONVERT).Eliseo Martínez2015-02-18
| | | | MacOS (pre Mac OS X) is not supported anymore.
* Add TabClosed eventFelipe Morales2015-02-16
| | | | TabClosed is triggered when a tab page closes.
* Add TabNewEnteredFelipe Morales2015-02-16
| | | | TabNewEntered is triggered after vim has entered a buffer in new tab.
* Add TabNew eventFelipe Morales2015-02-16
| | | | | TabNew triggers when entering a new tab page, but not when entering an already created one.
* 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
| |