aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
Commit message (Collapse)AuthorAge
...
* | ex_getln: Do not do arabic shaping unless neededZyX2017-06-27
| | | | | | | | | | Should speed up execution without arabic characters a bit, slowing down with arabic characters. More necessary, this allows coloring prompt without caring about arabic shaping at the first iteration.
* | ex_getln: Clean up draw_cmdline a bitZyX2017-06-27
|/
* Merge remote-tracking branch 'origin/master' into vim-7.4.1975James McCoy2017-06-06
|\
| * vim-patch:8.0.0360James McCoy2017-06-06
| | | | | | | | | | | | | | Problem: Sometimes VimL is used, which is confusing. Solution: Consistently use "Vim script". (Hirohito Higashi) https://github.com/vim/vim/commit/b544f3c81f1e6a50322855681ac266ffaa8e313c
* | vim-patch:7.4.1976James McCoy2017-06-04
|/ | | | | | | Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata) https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
* lint: fix indentation of FUNC_ATTR linesBjörn Linse2017-06-03
|
* Merge pull request #6514 from jamessan/gcc-7-fixesJames McCoy2017-05-13
|\ | | | | Fix GCC 7 issues
| * *: Comment intentional fallthroughsJames McCoy2017-05-12
| | | | | | | | | | Falling through a switch case should be commented so it's clear that behavior is intentional.
* | ex_getln: Fix :lang code execution when skippingZyX2017-05-13
|/ | | | Fixes #6727
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|\
| * Use vim_strchr(s, c) when c may be NUL (#6656)James McCoy2017-05-03
| | | | | | | | | | | | | | | | | | | | | | As part of the refactoring in #5119, some vim_strchr() were changed to strchr(). However, vim_strchr() behaves differently than strchr() when c is NUL, returning NULL instead of a pointer to the NUL. Revert the strchr() calls where it isn't known whether c is NUL, since this causes a semantic change the surrounding code doesn't expect. In the case of #6650, this led to a heap overrun. Closes #6650
| * Merge #6539 'More cursor shape modes'Justin M. Keyes2017-04-21
| |\
| | * ui: support more cursor shape modesBjörn Linse2017-04-21
| | | | | | | | | | | | throttle unneccessary cursor shape events
| * | *: Add comment to all C filesZyX2017-04-19
| |/
| * refactor: pos_T macros to functions (#6496)Felipe Oliveira Carvalho2017-04-11
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-10
|\|
| * mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-08
|\|
| * *: Use const char * in set_one_cmd_contextZyX2017-03-29
| | | | | | Also renames functions added in master and renamed here.
| * *: Fix some Windows-specific warningsZyX2017-03-29
| | | | | | | | Also fixed an error in path_fnamecmp().
| * eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
| |
| * eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | | | | | Function was renamed and changed to return `const char *`.
| * *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | | | | | Also fixes buffer reusage in setmatches() and complete().
| * eval: Split eval.c into smaller filesZyX2017-03-29
| |
| * vim-patch:7.4.2357 (#6354)raichoo2017-03-26
| | | | | | | | | | | | Problem: Attempt to read history entry while not initialized. Solution: Skip when the index is negative. https://github.com/vim/vim/commit/46643713dc6bb04b4e84986b1763ef309e960161
* | ex_getln: Refactor script_get()ZyX2017-03-27
|/ | | | | | | | | | | | | | 1. Use `char *` for strings. 2. Add `const` qualifiers. 3. Add attributes and documentation. 4. Handle skipping *inside*. 5. Handle non-heredoc argument also inside: deferring this to the caller is pointless because all callers need the same thing. Though new ex_lua caller may live without allocations in this case, allocating nevertheless produces cleaner code. 6. Note that all callers call script_get with `eap` and `eap->arg`. Thus second argument is useless in practice: it is one and the same always and can be reached through the first argument.
* refactor: Remove allow_keys global (#6346)Matthew Malcomson2017-03-25
| | | | | | * The allow_keys global is unused in nvim, remove it * clint
* vim-patch:8.0.0172Justin M. Keyes2017-03-22
| | | | | | | | Problem: The command selected in the command line window is not executed. (Andrey Starodubtsev) Solution: Save and restore the command line at a lower level. (closes vim/vim#1370) https://github.com/vim/vim/commit/1d669c233c97486555a34f7d3f069068d9ebdb63
* vim-patch:8.0.0159Justin M. Keyes2017-03-22
| | | | | | | | | | | References #5406 Problem: Using a NULL pointer when using feedkeys() to trigger drawing a tabline. Solution: Skip drawing a tabline if TabPageIdxs is NULL. (Dominique Pelle) Also fix recursing into getcmdline() from the cmd window. https://github.com/vim/vim/commit/c695cec4698b41d7b9555efdd47dda9b1945d3ae
* *: Fix linter errorsZyX2017-02-15
|
* *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* vim-patch:7.4.2024Marco Hinz2017-02-04
| | | | | | | | | | Problem: More buf_valid() calls can be optimized. Solution: Use bufref_valid() instead. NOTE: Some changes related to channels and the Python and Netbeans interfaces were obviously left out. https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b
* inccommand: Suppress error reporting when previewing commandsJames McCoy2017-01-11
| | | | Closes #5912
* vim-patch:0 completion-related patches #5745 #5829Shougo Matsushita2016-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.0.0058 Problem: Positioning of the popup menu is not good. Solution: Position it better. (Hirohito Higashi) https://github.com/vim/vim/commit/91e44a3305ef6bf2d43496c351dcff0a45c6bfb8 vim-patch:8.0.0099 Problem: Popup menu always appears above the cursor when it is in the lower half of the screen. (Matt Gardner) Solution: Compute the available space better. (Hirohito Higashi, closes vim/vim#1241) https://github.com/vim/vim/commit/73095288da839f7c738a49baa109773e76106806 vim-patch:8.0.0127 Problem: Cancelling completion still inserts text when formatting is done for 'textwidth'. (lacygoill) Solution: Don't format when CTRL-E was typed. (Hirohito Higashi, closes vim/vim#1312) https://github.com/vim/vim/commit/73fd4988866c3adc15b5d093efdf5e8cf70d093d vim-patch:7.4.2188 Problem: Completion does not work properly with some plugins. Solution: Revert the part related to typing CTRL-E. (closes vim/vim#972) https://github.com/vim/vim/commit/c9fb77c69244870a97384152f20845665c19fe39 vim-patch:7.4.2146 Problem: Not enough testing for popup menu. CTRL-E does not always work properly. Solution: Add more tests. When using CTRL-E check if the popup menu is visible. (Christian Brabandt) https://github.com/vim/vim/commit/472472898ab71ac80a86fedc37f8eb91461788dd vim-patch:7.4.2147 Problem: test_alot fails. Solution: Close window. https://github.com/vim/vim/commit/abb71fbd399772d467aaa7b34b958b0f975c7e65 vim-patch:7.4.2149 Problem: If a test leaves a window open a following test may fail. Solution: Always close extra windows after running a test. https://github.com/vim/vim/commit/7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5 vim-patch:7.4.2321 Problem: When a test is commented out we forget about it. Solution: Let a test throw an exception with "Skipped" and list skipped test functions. (Christian Brabandt) https://github.com/vim/vim/commit/dac1947bb366ef43cd6da95acc730554e76d8b84 vim-patch:7.4.2331 Problem: Using CTRL-X CTRL-V to complete a command line from Insert mode does not work after entering an expression on the command line. Solution: Don't use "ccline" when not actually using a command line. (test by Hirohito Higashi) https://github.com/vim/vim/commit/33a80eeb859a78ba93432da6fa585786cfd77249 vim-patch:8.0.0008 Problem: Popup complete test is disabled. Solution: Enable the test and change the assert. (Hirohito Higashi) https://github.com/vim/vim/commit/9e02cfa226b2577ec867b544a1a450a428a19880 vim-patch:8.0.0047 Problem: Crash when using the preview window from an unnamed buffer. (lifepillar) Solution: Do not clear the wrong buffer. (closes vim/vim#1200) https://github.com/vim/vim/commit/50e5376926dc2ec4a26a7a16f8f0f3213c4afdf0 vim-patch:8.0.0053 Problem: No test for what 8.0.0047 fixes. Solution: Add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/60ef3e81f4a54d9f7ee617d57021f0811ec8ada5
* 'inccommand': Introduce CMDPREVIEW state.Justin M. Keyes2016-11-15
| | | | | | | Command "live preview" is fundamentally a non-recursive concept ("preview of a preview" is not useful). Maintaining this as a global is less awkward and closer to what we actually want to express, vs adorning exarg_T, CommandLineState, etc.
* 'inccommand': Detect "non-interactive", "too slow".Justin M. Keyes2016-11-15
| | | | | | | | | | | | | | | | | | | | | command_line_changed: - Check (current_SID == 0) instead of KeyTyped - We want to update during mappings (KeyTyped is false then). - Check vpeekc_any() - Avoids unnecessary work. - Avoids triggering live preview during macros. - Caveat: This makes the redraw "stutter" if user spams (holds a key) in the replace pattern. But that scenario is not important. - Update screen if the command is changed to a non-live command. (`s->live` goes from true => false) => clears the preview command_line_execute: - Let CTRL-C cancel live preview do_sub: - Enforce a time limit ('redrawtime'). - Unset 'inccommand' if time limit is reached. Closes #5602 Closes #5585
* 'inccommand': Restore cursor/view if cancelled.Justin M. Keyes2016-11-10
| | | | | Restore cursor position and window "view", if command is cancelled. This is how 'incsearch' works.
* 'inccommand': buftype=nofile, restore cursor/viewJustin M. Keyes2016-11-10
| | | | | | | - Use a standard scratch buffer instead of a new 'buftype', functions like curbufIsChanged() already have special handling for scratch bufs. - Cleanup some stuff from the previous merge. - Add support for :smagic, :snomagic. Closes #5578
* 'inccommand': preserve 'modified'Justin M. Keyes2016-11-08
| | | | | During the live preview, the buffer-local 'modified' flag should not be changed.
* 'inccommand': Do not trigger during scripts, feedkeys().Justin M. Keyes2016-11-08
|
* 'inccommand': rename 'incsubstitute'Justin M. Keyes2016-11-08
| | | | | | | | | 'inccommand' allows us to expand the feature to other commands, such as: :cdo :cfdo :global Also rename "IncSubstitute" highlight group to "Substitute".
* 'inccommand': reworkJustin M. Keyes2016-11-08
| | | | | | | | | | | | | | | | | - Eliminate/isolate static/global variables - Remove special-case parameter from buflist_new() - Remove special-case ECMD_RESERVED_BUFNR - To determine when u_undo_and_forget() should be done, check b_changedtick instead of a heuristic. - use mb_string2cells() instead of strlen() to measure the :sub patterns - call ml_close() before buf_clear_file(). Avoids leaks caught by ASan. Original patch by: Robin Elrharbi-Fleury (Robinhola) Audrey Rayé (Adrey06) Philémon Hullot (DesbyP) Aymeric Collange (aym7) Clément Guyomard (Clement0)
* Incsubsitution featureKillTheMule2016-10-30
| | | | | | | | | | | | | | | | | Originally implemented by * Clement0 * DesbyP * aym7 * Adrey06 * Robinhola in #4811. Major reworkings and bug fixes by * bfredl Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
* Fix lint errors.Grzegorz Milka2016-10-23
|
* vim-patch:7.4.2312Grzegorz Milka2016-10-23
| | | | | | | | Problem: Crash when autocommand moves to another tab. (Dominique Pelle) Solution: When navigating to another window halfway the :edit command go back to the right window. https://github.com/vim/vim/commit/5a49789a9b1f6447aeafbbbdd5b235dd10c471d5
* hist_char2type: Return '/' for NUL.James McCoy2016-10-18
| | | | | | | During -S execution, ccline.cmdfirstc is NULL, so calling histadd() with a hist-name of '' would fail. Mimic Vim's behavior and fallback to '/' in this scenario, since '' is a documented hist-name as of vim/vim@3e496b0e.
* event/multiqueue.c: Rename "queue" to "multiqueue".Justin M. Keyes2016-10-02
| | | | | | | | | | | | | | `lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
* vim-patch:7.4.1820Jurica Bradaric2016-09-25
| | | | | | | Problem: Removing language from help tags too often. Solution: Only remove @en when not needed. (Hirohito Higashi) https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
* vim-patch:7.4.1818Jurica Bradaric2016-09-25
| | | | | | | Problem: Help completion adds @en to all matches except the first one. Solution: Remove "break", go over all items. https://github.com/vim/vim/commit/89c79b99328b66f77f1d12dc8c6701dfe2c57f15
* vim-patch:7.4.1671Jurica Bradaric2016-09-25
| | | | | | | | Problem: When help exists in multiple languages, adding @ab while "ab" is the default help language is unnecessary. Solution: Leave out "@ab" when not needed. (Ken Takata) https://github.com/vim/vim/commit/61264d99692803eec76a171916ab9720c75536b0