aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
Commit message (Collapse)AuthorAge
...
* viminfo: First version of ShaDa file dumpingZyX2015-10-08
| | | | | | | | | | | | | | | | | | | | What works: 1. ShaDa file dumping: header, registers, jump list, history, search patterns, substitute strings, variables. 2. ShaDa file reading: registers, global marks, variables. Most was not tested. TODO: 1. Merging. 2. Reading history, local marks, jump and buffer lists. 3. Documentation update. 4. Converting some data from &encoding. 5. Safer variant of dumping viminfo (dump to temporary file then rename). 6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for reference).
* nv_ident: sprintf => snprintfJustin M. Keyes2015-09-23
| | | | Also fix some other clint errors.
* 'keywordprg': support ex commandsJustin M. Keyes2015-09-23
| | | | | | - new feature: if the first character of 'keywordprg' is ":", the command is invoked as a Vim ex-command prefixed with [count]. - change default 'keywordprg' to :Man
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
* loop: Simplify loop.c and move some code to input.cThiago de Arruda2015-08-13
| | | | | | - Declare poll timer in Loop structure instead of a loop_poll_events local variable. - Move deferred event management to input.c
* clipboard: handle middle-click paste correctly.Björn Linse2015-07-20
| | | | | Also handle clipboard errors more like vim: paste from unnamed register if clipboard provider fails.
* Remove POSIX 'cpoptions': '#'Michael Reed2015-07-19
|
* Macro cleanup: FEAT_GUI_MACHettomei2015-07-17
|
* Macro cleanup: FEAT_GUI_GTKHettomei2015-07-17
|
* Macro cleanup: FEAT_GUI_MOTIFHettomei2015-07-17
|
* event loop: New abstraction layer with refactored time/signal APIThiago de Arruda2015-07-17
| | | | | | | | | | - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
* clipboard: don't overwrite before pasting in visual mode. #2945Björn Linse2015-07-04
| | | | | This occured when clipboard=unnamedplus and doing "+p in visual mode. Fixes #2942.
* Remove char_u: ex_docmd:do_cmdline_cmd()Michael Reed2015-05-13
|
* vim-patch:7.4.606 #2594Yamakaky2015-05-09
| | | | | | | Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-606
* vim-patch:7.4.576 #2595Ewan Hemingway2015-05-09
| | | | | | | | | | Problem: Redrawing problem with 'relativenumber' and 'linebreak'. Solution: Temporarily reset 'linebreak' and restore it in more places. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-576 Closes #1946
* 'cpoptions': Remove "H" flag #2556David Bürgin2015-05-04
|
* coverity/109843: Nesting indent mismatch: RI.Eliseo Martínez2015-04-28
| | | | Introduction of asserts broke bracketless if's.
* Fix visual selection after left click on tablineMarco Hinz2015-04-28
| | | | | | After left clicking on a tab in the tabline, the "in_tab_line" variable wasn't set to 'false' and every following mouse action assumed still being on the tabline which messed up visual selection etc.
* Enable -Wconversion: normal.c.Eliseo Martínez2015-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Refactor summary: - extern int opcount --> extern long opcount - bool find_decl(..., int len, ...) --> bool find_decl(..., size_t len, ...) * int find_ident_under_cursor(...) --> size_t find_ident_under_cursor(...) - int find_ident_at_pos(...) --> size_t find_ident_at_pos(...) - int modify_fname(..., int *usedlen, ..., int *fnamelen) --> int modify_fname(..., size_t *usedlen, ..., size_t *fnamelen) * char_u *eval_vars(..., int *usedlen, ...) --> char_u *eval_vars(..., size_t *usedlen, ...) - int find_cmdline_var(..., int *usedlen) --> ssize_t find_cmdline_var(..., size_t *usedlen) - static char_u *repl_cmdline(..., int srclen, ...) --> static char_u *repl_cmdline(..., size_t srclen, ...) - bool get_visual_text(..., int *lenp) --> bool get_visual_text(..., size_t *lenp) * char_u *find_file_name_in_path(..., int len, ...) --> char_u *find_file_name_in_path(..., size_t len, ...) - static char_u *eval_includeexpr(..., int len) --> static char_u *eval_includeexpr(..., size_t len) - char_u *find_file_in_path(..., int len, ...) --> char_u *find_file_in_path(..., size_t len, ...) * char_u *find_file_in_path_option(..., int len, ...) --> char_u *find_file_in_path_option(..., size_t len, ...) - char_u *find_directory_in_path(..., int len, ...) --> char_u *find_directory_in_path(..., size_t len, ...) * int spell_move_to(...) --> size_t spell_move_to(...) - int spell_check(...) --> size_t spell_check(...) - static int spell_bad_len --> static size_t spell_bad_len - void find_pattern_in_path(..., int len, ...) --> void find_pattern_in_path(..., size_t len, ...) Helped-by: Justin M. Keyes <justinkz@gmail.com>
* 'cpoptions': Remove "w" flag #2507David Bürgin2015-04-27
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* clipboard: simplify handling of of put in visual mode.Björn Linse2015-04-17
| | | | | When clipboard=unnamed and put over visual selection, reduces number of provider calls from 6 to 2. Also add test.
* ops.c: eliminate static variable `y_current`Björn Linse2015-04-17
| | | | | | | This variable isn't stateful, and should be passed around instead. Helped-By: Scott Prager <splinterofchaos@gmail.com> Helped-By: Michael Reed <m.reed@mykolab.com>
* 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.
* clipboard: adjust v:register when clipboard=unnamedBjörn Linse2015-04-11
| | | | | Helped-By: Nicolas Hillegeer <nicolas@hillegeer.com> Helped-By: Michael Reed <m.reed@mykolab.com>
* messages: Update common instances of Vim to Nvim #2031Michael Reed2015-04-08
|
* vim-patch:7.4.636 #2267David Bürgin2015-04-05
| | | | | | | | Problem: A search with end offset gets stuck at end of file. (Gary Johnson) Solution: When a search doesn't move the cursor repeat it with a higher count. (Christian Brabandt) https://github.com/vim/vim/releases/tag/v7-4-636
* buffer: Move b_p_ma(modifiable) checks into the MODIFIABLE macroThiago de Arruda2015-03-25
|
* ui: Replace cursor_{on,off} by busy_{stop,start}Thiago de Arruda2015-03-15
| | | | | | | | | | | | | | | | | | | | | | | | Switching cursor off is only necessary in two occasions: - When redrawing to avoid terminal flickering - When the editor is busy The first can now be handled by the TUI, so most calls to ui_cursor_off can be removed from the core. So, before this commit it was only necessary to switch the cursor off to notify the user that nvim was running some long operation. Now the cursor_{on,off} functions have been replaced by busy_{stop,start} which can be handled in a UI-specific way(turning the cursor off or showing a busy indicator, for example). To make things even more simpler, nvim is always busy except when waiting for user input or other asynchronous events: It automatically switches to a non-busy state when the event loop is about to be entered for more than 100 milliseconds. `ui_busy_start` can be called when its not desired to change the busy state in the event loop (As its now done by functions that perform blocking shell invocations).
* Remove redundant castsAnton Ovchinnikov2015-03-09
|
* Macro cleanup: USE_ON_FLY_SCROLLMichael Reed2015-03-05
|
* 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
* 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/13750: Negative array index read: FP.Eliseo Martínez2015-02-02
| | | | | | | | | | Problem : Negative array index read @ 909. Diagnostic : False positive. Rationale : Suggested error path assigns a negative value to idx at line 836 (`idx = find_command(ca.cmdchar);`). That's impossible, as `ca.cmdchar` is set to Ctrl_BSL just two lines above, so we know that value will be in the table. Resolution : Assert idx >= 0.
* "halfway a line" is a very confusing phraseJack Danger Canty2015-01-22
| | | | | | | | | If you Google for this phrase found in the Vim documentation you'll find almost exclusively hits from the Vim documentation. I think changing "halfway a line" to "halfway through a line" makes more sense. There seems to be an pervasive odd use of the word 'halfway' in the original docs which I'm updating everywhere.
* Merge pull request #1729 from fwalch/vim-7.4.490Justin M. Keyes2015-01-19
|\ | | | | vim-patch:7.4.490
| * vim-patch:7.4.490Florian Walch2015-01-04
| | | | | | | | | | | | | | | | Problem: Cannot specify the buffer to use for "do" and "dp", making them useless for three-way diff. Solution: Use the count as the buffer number. (James McCoy) https://code.google.com/p/vim/source/detail?r=v7-4-490
* | coverity/13763: Out-of-bounds read: FP.Eliseo Martínez2015-01-08
|/ | | | | | | | Problem : Out-of-bound read from a buffer. Diagnostic : False positive. Rationale : nv_max_linear should always be less than nv_cmd_idx size (NV_CMDS_SIZE). Resolution : Assert rationale.
* Use ARRAY_SIZE where Coccinelle wasn't able to do itFelipe Oliveira Carvalho2014-12-18
|
* 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; } ... ... ... } ```
* input: Recognize mouse events for abstract_uiThiago de Arruda2014-12-10
|
* docs: Remove Photon remnantsMichael Reed2014-12-09
| | | | | Also get rid of some platform references made irrelevant by the removal of their respective platform specific GUI code.
* clipboard: clean up unnamedclip logicBjörn Linse2014-12-08
|
* term: Move more mouse functions to mouse.cThiago de Arruda2014-12-02
|
* Merge pull request #1516 from fmoralesc/new-patchesJustin M. Keyes2014-11-27
|\ | | | | vim-patch:7.4.425,435,467,472,473,478
| * vim-patch:7.4.467: Avoid a problem with unwanted linebreaks in block modeFelipe Morales2014-11-27
| | | | | | | | | | | | | | | | vim-patch:7.4.467 Avoid a problem with unwanted linebreaks in block mode https://code.google.com/p/vim/source/detail?r=v7-4-467
| * vim-patch:7.4.425: Adjust virtcol when showbreak is setFelipe Morales2014-11-27
| | | | | | | | | | | | | | | | | | | | vim-patch:7.4.425 Problem: When 'showbreak' is used "gj" may move to the wrong position. (Nazri Ramliy) Solution: Adjust virtcol when 'showbreak' is set. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-425
* | Remove code defined under USE_IM_CONTROL #ifdefsThiago de Arruda2014-11-27
| | | | | | | | This is not being used and should not be part of the core anyway.
* | ui: Extract mouse.c/mouse.hThiago de Arruda2014-11-27
| |