aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
Commit message (Collapse)AuthorAge
...
* vim-patch:? Fix memory leak in readviminfoJoel Teichroeb2014-12-13
| | | | | Patch provided by Christian Brabandt Improved by oni-link
* Merge pull request #1635 from danthedeckie/masterJustin M. Keyes2014-12-12
|\ | | | | replace copy_spaces and copy_chars functions with equivalent memset.
| * strings.c: replace copy_spaces, copy_chars with equivalent memset.Daniel Fairhead2014-12-12
| |
* | Refactor str_to_reg().Scott Prager2014-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | - Update the doxygen comments. - Use more descriptive types. - Localize variables. - Find the '\n' with memchr instead of a for loop. - Remove `if (size)` checks before memmove since memmove(dst,src,0) is a noop. - Use memcpy instead since the pointers don't alias. - Use xmemdupz instead of vim_strnsave. - xrealloc instead of xmalloc/memcpy. - Use memcnt/xmemscan/memchrsub.
* | vim-patch:7.4.243Scott Prager2014-12-11
| | | | | | | | | | | | | | Problem: Cannot use setreg() to add text that includes a NUL. Solution: Make setreg() accept a list. https://code.google.com/p/vim/source/detail?r=v7-4-243
* | Return void * from get_reg_contents.Scott Prager2014-12-11
| |
* | vim-patch:7.4.242Scott Prager2014-12-11
|/ | | | | | | | Problem: getreg() does not distinguish between a NL used for a line break and a NL used for a NUL character. Solution: Add another argument to return a list. (ZyX) https://code.google.com/p/vim/source/detail?r=v7-4-242
* clipboard: fix `let @+ = ...` and add testBjörn Linse2014-12-08
|
* clipboard: better error messages when provider not availableBjörn Linse2014-12-08
|
* options: change "unnamedclip" back to "clipboard=unnamed/unnamedplus"Björn Linse2014-12-08
| | | | | This allows to configure which of '*' and '+' should be used for the unnamed clipboard, and is consistent with vim.
* clipboard: clean up unnamedclip logicBjörn Linse2014-12-08
|
* clipboard: handle linewise/charwise selections correctlyBjörn Linse2014-12-08
|
* clipboard: support separate '+' and '*' clipboardsBjörn Linse2014-12-08
|
* 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.
* Remove os/provider.{c,h} and all of its referencesThiago de Arruda2014-11-18
|
* eval/ex_cmds2/ops: Implement providers with eval_call_providerThiago de Arruda2014-11-18
| | | | | Replace references to provider_call/provider_has with the new functions eval_call_provider/eval_has_provider.
* Use bool for flags in oparg_T.Scott Prager2014-11-11
| | | | | | | | | | | | | | | | | | | | | | | Several opart_T members like use_reg_one, end_adjusted, empty, is_VIsual, and block_mode, only ever store TRUE or FALSE, so make this constraint explicit by changing them to bools, and TRUE to true and FALSE to false in the context of their uses. The member, inclusive, has several other uses such as in arithmetic equations and one inequality, but every single assignment (obtained with 'grep -r "inclusive \\="') sets it to either TRUE or FALSE. This also implies that the inequality, "oap->end.coladd < oap->inclusive", can only be true when coladd==0 and inclusive==true, so test for that instead. For consistency, change the first argument of findpar (which ends up being inclusive) to bool. Include stdbool.h for consistency with issue #918. This commit shrinks the size of oparg_T from 128 bytes to 112 (-13%) on my machine.
* Fix warnings: ops.c: cursor_pos_info(): Various (2): MI.Eliseo Martínez2014-11-06
| | | | | | | | | | | | | | | | | Problems: Result of operation is garbage or undefined @ 5087. http://neovim.org/doc/reports/clang/report-2e3118.html#EndPath Result of operation is garbage or undefined @ 5149. Diagnostic: Multithreading issues. Rationale : All reported problems can only occur if accesed globals change state while executing function, which could only happen in a multithreaded environment. Resolution: Use local variables (copy globals on entry). Note that this change alters function semantics, as now function only depends on global values at entry time. This shouldn't be a problem, though, as new semantics should be in fact better.
* Fix warnings: ops.c: do_join(): Nonnull violation: FP.Eliseo Martínez2014-11-06
| | | | | | | | | Problem: Argument with 'nonnull' attribute passed null @ 3540. http://neovim.org/doc/reports/clang/report-fc14e0.html#EndPath. Diagnostic: False potitive. Rationale : `count` should be >= 2 by function precondition. Resolution: Assert precondition.
* vim-patch:7.4.408Scott Prager2014-10-10
| | | | | | | Problem: Visual block insert breaks a multi-byte character. Solution: Calculate the position properly. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-408
* 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
| |
* | memory: xstrchrnul and xmemscan.Scott Prager2014-09-30
|/
* api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}Thiago de Arruda2014-09-12
| | | | | | - Move helpers that are specific to API types to api/private/helpers.{c,h} - Include headers with generated declarations - Delete unused macros
* Convert FOR_ALL_WINDOWS to use a locally declared pointerWayne Rowcliffe2014-09-08
|
* msgpack-rpc: Always use arrays when sending events or callsThiago de Arruda2014-08-29
| | | | | | This is required by the msgpack-RPC specification. Also, the send_call/send_event functions were refactored to accept a variable number of arguments
* Port vim's patch 7.4.338 ('breakindent')Felipe Morales2014-08-20
|
* vim-patch:7.4.331 #1017André Twupack2014-08-13
| | | | | | | Problem: Relative numbering not updated after a linewise yank. Issue 235. Solution: Redraw after the yank. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=6d984caa0409fd284722c44cb09a0a2b5360bd4f
* Remove EBCDIC: Clean up commentsPavel Platto2014-08-02
|
* provider: Add support for clipboard registers.Thiago de Arruda2014-07-17
| | | | | | | | | | | | | This reimplements the '+'/'*' clipboard registers(both are aliases to the same register, no dedicated storage for the X11 selection) on top of the provider infrastructure. This adds two new 'unnamedclip' option, has the same effect of setting 'clipboard' to 'unnamed/unnamedplus' in vim The 'clipboard' option was not reused because all values(except 'unnamedplus') seem to be useless for Neovim, and the code to parse the option was relatively big. The option remains for vim compatibility but it's silently ignored.
* 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
|
* No OOM in vim_strsave_escape_csi()Felipe Oliveira Carvalho2014-06-16
|
* No OOM in vim_strsave_escaped[_ext]()Felipe Oliveira Carvalho2014-06-16
|
* Replace vim_strncpy calls: ops.cDouglas Schneider2014-06-13
|
* spelling fixes #827Will Stamper2014-06-12
|
* coverity/62615: fix leak in write_reg_contents_exNicolas Hillegeer2014-06-12
| | | | | | | | | | | Coverity detected a memory leak caused by not free'ing the value returned by get_expr_line_src (basically vim_strsave(expr_line)). Replaced the copying with direct manipulation of expr_line, since that also happens in other parts of the codebase. NOTE: I'm aware that this has different behaviour than vim_strnsave, namely vim_strnsave always allocates `len` bytes, even if the string is shorter. I don't see how that behaviour is helpful here though.
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
* Remove ml_ prefix from cursor.h functionsPavel Platto2014-05-28
| | | | | s/ml_get_curline/get_cursor_line_ptr s/ml_get_cursor/get_cursor_pos_ptr
* Extract cursor.h from misc{1,2}.h and memline.hHinidu2014-05-28
|
* vim-patch:7.4.267oni-link2014-05-27
| | | | | | | Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat) Solution: Add the setmark argument to do_join(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=75f222d67cea335efbe0274de6340dba174c1e7e
* Replace alloc() with xmalloc() and remove immediate OOM checksFelipe Oliveira Carvalho2014-05-19
|
* Remove NULL/non-NULL tests after calls to vim_str(n)save()Felipe Oliveira Carvalho2014-05-19
|
* Introduce nvim namespace: Fix unmasked strings.h issue.Eliseo Martínez2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: Now that nvim/strings.h is correctly namespaced, an issue that had been masked until now arises: When compiling, we get a lot of errors because of everywhere the functions in nvim/strings.h are used, there's no include to import them. But, how could this compile and work previously, then? It turns out that: - In every such case, we are also including vim.h, which in turn includes os_unix_defs.h. - os_unix_defs.h includes <string.h> and also <strings.h> in some systems (e.g. OSX). - Build had been modified previously to (even when importing system headers), prefer equally-named local ones. That was in fact done as a previous attempt to solve the same issue we are trying to solve another way now. So, we were including our "strings.h" as a side-effect of including <strings.h> through "vim.h" --> "os_unix_defs.h". Solution: Correctly include "nvim/strings.h" in every file needing it.
* Introduce nvim namespace: Fix project-local includes.Eliseo Martínez2014-05-15
| | | | Prepend 'nvim/' in all project-local (non-system) includes.
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.