aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
Commit message (Collapse)AuthorAge
...
* 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.
* os_scandir: fname_case -> path_fix_caseScott Prager2015-03-31
| | | | | | | | | | Use os_scandir(). fname_case() only gets used when `defined(USE_FNAME_CASE)` (on operating systems with case-insensitive file systems), but may be useful in other contexts, so move it to path.c. (See the TODO.) Remove the unused parameter, len.
* 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.
* buffer: Move b_p_ma(modifiable) checks into the MODIFIABLE macroThiago de Arruda2015-03-25
|
* Merge pull request #2118 from rev112/fix_redundant_castJohn Szakmeister2015-03-13
|\ | | | | Remove redundant casts
| * Remove redundant castsAnton Ovchinnikov2015-03-09
| |
* | Interface cleanup: Symlink handling & docsMichael Reed2015-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the ability to start nvim via the following aliases in favor of just using their command line arguments: ex vim -e exim vim -E view vim -R gvim vim -g gex vim -eg gview vim -Rg rvim vim -Z rview vim -RZ rgvim vim -gZ rgview vim -RgZ This also removes Vi mode (-v) for consistency. From ':help -v': -v Start Ex in Vi mode. Only makes a difference when the executable is called "ex" or "gvim". For gvim the GUI is not started if possible.
* | version: don't use NVIM_VERSION_* directly outside version.cBjörn Linse2015-03-08
| | | | | | | | This avoids recompiles after commiting.
* | config: split out versiondef.h from config.hBjörn Linse2015-03-08
|/ | | | This avoids recompiling every c file after comitting.
* 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
* shadow previously set signs #1893Felipe Morales2015-02-13
|
* 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.
* Cleanup: Rename getdigits() family functions.Eliseo Martínez2015-01-11
|
* Cleanup: Refactor getdigits().Eliseo Martínez2015-01-11
| | | | | | | | | | | | | | | | Problem : getdigits() currently returns a long, but at most places, return value is casted (unsafely) into an int. Making casts safe would introduce a lot of fuss in the form of assertions checking for limits. Note : We cannot just change return type to int, because, at some places, legitimate long values are used. For example, in diff.c, for line numbers. Solution : Introduce new functions: - get_digits() : Gets an intmax_t from a string. - get_int_digits() : Wrapper for ints. - get_long_digits() : Wrapper for longs. And replace getdigits() invocations by the appropiate wrapper invocations.
* 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
* vim-patch:7.4.455Marco Hinz2014-12-20
| | | | | | | Problem: Completion for :buf does not use 'wildignorecase'. (Akshay H) Solution: Pass the 'wildignorecase' flag around. https://code.google.com/p/vim/source/detail?r=v7-4-455
* Simple refatorings that didn't fit the pattern of the last commitFelipe Oliveira Carvalho2014-12-13
|
* 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; } ... ... ... } ```
* 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
|
* Fix sign column redrawVictor Fonseca2014-10-20
| | | | | | | Fixed a bug introduced in SHA:aa66f2487edde49b9a5ba10cd70d706d06a94e25, due to a misapplied patch. buf_del_sign should redraw the window if the sign deleted was the last one in the buffer. Also moved the curwin verification to the correct function.
* 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
|/
* vim-patch:7.4.369Shougo Matsushita2014-09-17
| | | | | | | Problem: Using freed memory when exiting while compiled with EXITFREE. Solution: Set curwin to NULL and check for that. (Dominique Pelle) https://code.google.com/p/vim/source/detail?r=v7-4-369
* Additional FOR_ALL_WINDOWS usageWayne Rowcliffe2014-09-08
|
* fileid: rename os_file_id_equalStefan Hoffmann2014-08-31
|
* fileid: rename os_get_file_idStefan Hoffmann2014-08-31
|
* 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
| |
* | vim-patch:7.4.201André Twupack2014-08-15
| | | | | | | | | | | | | | Problem: 'lispwords' is a global option. Solution: Make 'lispwords' global-local. (Sung Pae) https://code.google.com/p/vim/source/detail?r=06e5f65c34d8136c3a9d2219429b7eca35cb3a21
* | Return bool from find_win_for_buf #1023Wayne Rowcliffe2014-08-07
|/
* Minor buffer.c style cleanupsWayne Rowcliffe2014-07-26
|
* coverity/62610: Remove dead code from setfname()Wesley Wiser2014-07-20
|
* Use strict function prototypes #945Pavel Platto2014-07-14
| | | | | | | | | | | | | | | | | | | `-Wstrict-prototypes` warn if a function is declared or defined without specifying the argument types. This warning disallow function prototypes with empty parameter list. In C, a function declared with an empty parameter list accepts an arbitrary number of arguments when being called. This is for historic reasons; originally, C functions didn't have prototypes, as C evolved from B, a typeless language. When prototypes were added, the original typeless declarations were left in the language for backwards compatibility. Instead we should provide `void` in argument list to state that function doesn't have arguments. Also this warning disallow declaring type of the parameters after the parentheses because Neovim header generator produce no declarations for old-stlyle prototypes: it expects to find `{` after prototype.
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* move <inttypes.h> include out of vim.hBrandon Coleman2014-07-09
|
* move ascii.h include out of vim.hBrandon Coleman2014-07-09
|
* remove stdbool.h include from vim.h and globals.hBrandon Coleman2014-07-09
|
* Replace int with bool in some files. #654Klemen Košir2014-07-08
|
* FileID: refactor buffer.c to use `FileID`Stefan Hoffmann2014-06-27
|
* FileID: remove `INVALID_DEVICE_ID` macroStefan Hoffmann2014-06-27
|
* No OOM in home_replace_save()Felipe Oliveira Carvalho2014-06-16
|
* Replace vim_strncpy calls: buffer.cDouglas Schneider2014-06-13
|
* spelling fixes #827Will Stamper2014-06-12
|