Commit Graph

6789 Commits

Author SHA1 Message Date
Justin M. Keyes
44e6ee930f build: Target luacheck HEAD.
https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606

> If you really want to use bleeding-edge version you should get the
> rockspec from master branch, not a fixed commit ...
> The correct way to install from a specific commit is cloning that
> commit and running "luarocks make" from project directory. The reason
> is that running "install" or "build" on an scm rockspec fetches
> sources from master but uses build description from the rockspec
> itself, which may be outdated.
2016-11-17 00:55:39 +01:00
Justin M. Keyes
5e241b5f50 build: cmake: Use portable delimiters. (#5620)
Fixes build on Windows (msys2 mingw64).
Closes #5342
2016-11-16 22:26:51 +01:00
Anatolii Sakhnik
f1fed42ca7 l10n: Update Ukrainian translation (#5567)
* Fix translation of the term 'tag'

Prefer native word instead of transliteration

* Update uk.po automatically

Run make update-po-uk in src/nvim/po

* Update fuzzy translations in uk.po

* Translate missing msgstr

* Fix layout of the front page

* Apply cleanup.vim

Additionally, remove irrelevant and confusing comments

* Copy uk.po into uk.cp1251.po
2016-11-16 18:58:07 +01:00
James McCoy
108d54bbd4 Merge pull request #5600 from jamessan/vim-7.4.1640
vim-patch:7.4.1640,7.4.1647,7.4.1650,7.4.1664
2016-11-16 06:52:19 -05:00
James McCoy
c66ca17ca1
Merge pull request #5614 from Shougo/vim-7.4.2251
vim-patch:7.4.2251
2016-11-15 23:45:20 -05:00
James McCoy
34317846d6
lint 2016-11-15 23:16:09 -05:00
James McCoy
4e66bc99e4
Mark 7.4.1697 as applied
The patch was merged in 9e1c6596 but version.c didn't get updated
accordingly.
2016-11-15 23:16:09 -05:00
James McCoy
2e5736e2cd
vim-patch:7.4.1664
Problem:    Crash in :cgetexpr.
Solution:   Check for NULL pointer. (Dominique) Add a test.

89c64d557d
2016-11-15 23:16:09 -05:00
James McCoy
830bf8665b
vim-patch:7.4.1650
Problem:    Quickfix test fails.
Solution:   Accept any number of matches.

f68f1d7079
2016-11-15 23:16:09 -05:00
James McCoy
caa33aaaf8
vim-patch:7.4.1647
Problem:    Using freed memory after setqflist() and ":caddbuffer".  (Dominique)
Solution:   Set qf_ptr when adding the first item to the quickfix list.

8b20179c65
2016-11-15 23:16:08 -05:00
James McCoy
c0fd830be4
Bump all nvim-specific error codes above E5000
In order to not conflict with new error codes that Vim adds, all Neovim
error codes should be above 5000.  The three existing sub-5000 error
codes (E926, E951, and E952) are now E50003, E5004, and E5005
respectively.

E953 was removed in 6167ce6df2, so just
remove it from the help.
2016-11-15 23:16:08 -05:00
James McCoy
7231438f12
vim-patch:7.4.1640
Problem:    Crash when an autocommand changes a quickfix list. (Dominique)
Solution:   Check wether an entry is still valid. (Yegappan Lakshmanan,
            Hirohito Higashi)

ffec3c5349
2016-11-15 23:16:08 -05:00
James McCoy
aba853a156 Merge pull request #5615 from jamessan/vim-7.4.1892
vim-patch:7.4.1892,7.4.1894
2016-11-15 22:49:34 -05:00
James McCoy
49f73e5275
vim-patch:7.4.1894
Problem:    Cannot get the window ID for a mouse click.
Solution:   Add v:mouse_winid.

511972d810
2016-11-15 22:00:25 -05:00
James McCoy
defa86b08a
vim-patch:7.4.1892
Problem:    balloon eval only gets the window number, not the ID.
Solution:   Add v:beval_winid.

c9721bdc63
2016-11-15 21:48:08 -05:00
Shougo Matsushita
458b1fc0e7 vim-patch:7.4.2251
Problem:    In rare cases diffing 4 buffers is not enough.
Solution:   Raise the limit to 8. (closes vim/vim#1000)

015efc32c1
2016-11-16 08:55:17 +09:00
James McCoy
c91e9c1c7a Merge pull request #5611 from jamessan/vim-7.4.2174
vim-patch:7.4.2174
2016-11-15 14:57:57 -05:00
Shougo
c69cfd7d1c vim-patch:8.0.0035 (#5609)
Problem:    Order of matches for 'omnifunc' is messed up. (Danny Su)
Solution:   Do not set compl_curr_match when called from complete_check().
            (closes vim/vim#1168)

472e85970e
2016-11-15 17:59:55 +01:00
James McCoy
12ed735719 lint 2016-11-15 11:50:54 -05:00
James McCoy
9d9d93aee3 vim-patch:7.4.2174
Problem:    Adding duplicate flags to 'whichwrap' leaves commas behind.
Solution:   Also remove the commas. (Naruhiko Nishino)

c8ce615299
2016-11-15 11:48:37 -05:00
James McCoy
10c72cd365
vim-patch.sh: Remove "set -o pipefail"
grep 2.26 changed its behavior when redirecting its output to /dev/null
such that it exits as soon as one match is found.  This causes sed to
get a SIGPIPE which, due to "set -o pipefail", falsely implies that the
patch is not applied.

Removing "set -o pipefail" preserves the good exit status from grep.
2016-11-15 07:53:01 -05:00
Justin M. Keyes
d28d108648 CheckHealth: Fix version comparison.
Compare numbers instead of strings.
2016-11-15 13:15:40 +01:00
Justin M. Keyes
01ef6fc3d2 Merge #5607 from justinmk/icm
'inccommand': auto-disable if too slow; fix other behaviors
2016-11-15 09:12:47 +01:00
Justin M. Keyes
35231312d7 'inccommand': Add tests. 2016-11-15 05:01:25 +01:00
Justin M. Keyes
3f7a2d785d 'inccommand': Introduce CMDPREVIEW state.
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.
2016-11-15 04:22:24 +01:00
Justin M. Keyes
708617ebb6 inccommand=nosplit: Jump to first match.
Call update_topline() to adjust the current viewport.

Closes #5597
2016-11-15 04:22:24 +01:00
Justin M. Keyes
91507c271e 'inccommand': Detect "non-interactive", "too slow".
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
2016-11-15 04:22:24 +01:00
James McCoy
0c799a8f10 Merge pull request #5606 from jamessan/vim-7.4.1658
vim-patch:7.4.1658
2016-11-14 16:16:18 -05:00
James McCoy
0b686e9b61 lint 2016-11-14 14:16:40 -05:00
James McCoy
9d2985ecba vim-patch:7.4.1658
Problem:    A plugin does not know when VimEnter autocommands were already
            triggered.
Solution:   Add the v:vim_did_enter variable.

1473551a44
2016-11-14 14:16:40 -05:00
James McCoy
4539d867d4 Merge pull request #5603 from jamessan/remove-flaky-term-resize-test
test: window_spec: Remove flaky terminal resize test
2016-11-13 19:54:14 -05:00
James McCoy
5e1dc26f74
test: window_spec: Remove flaky terminal resize test 2016-11-13 18:47:03 -05:00
Justin M. Keyes
598f5af58b Merge #5582 from justinmk/icm
'inccommand': Support :smagic/:snomagic. Less jumping around.
2016-11-12 13:32:48 +01:00
Tommy Allen
84eed76b55 CheckHealth: Include v:throwpoint in error message (#5575)
* health.vim: Include v:throwpoint in error message

* health/provider.vim: Check for ruby executable

* health/provider.vim: Combine subprocess stdout and stderr

* test: Updated CheckHealth test
2016-11-12 11:59:15 +01:00
James McCoy
7e48c23a50 vim-patch:7.4.1634 (#5594)
Problem:    Vertical movement after CTRL-A ends up in the wrong column.
            (Urtica Dioica)
Solution:   Set curswant when appropriate. (Hirohito Higashi)

8e08125d3a
2016-11-12 11:32:23 +01:00
James McCoy
c5bc0ea04c vim-patch:7.4.1614 (#5593)
Problem:    Still quickfix test in old style.
Solution:   Turn test 10 into a new style test.

7eba3d2cbf
2016-11-12 11:30:18 +01:00
James McCoy
05d1211424 Merge pull request #5592 from jamessan/vim-7.4.1591
vim-patch:7.4.1591
2016-11-11 16:01:13 -05:00
James McCoy
7baa96b717 vim-patch:7.4.1591
Problem:    The quickfix title is truncated.
Solution:   Save the command before it is truncated. (Anton Lindqvist)

5584df65a0
2016-11-11 11:37:42 -05:00
Justin M. Keyes
ae9a3d3b99 'inccommand': Simplify cursor placement logic.
Remove the inner for-loop; just use the column of the first in-line
match.
2016-11-11 05:45:06 +01:00
Justin M. Keyes
795f2bb9b9 'inccommand': Restore cursor/view if cancelled.
Restore cursor position and window "view", if command is cancelled.
This is how 'incsearch' works.
2016-11-10 18:09:48 +01:00
Justin M. Keyes
2e1217da46 'inccommand': buftype=nofile, restore cursor/view
- 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
2016-11-10 15:48:00 +01:00
Justin M. Keyes
0213e99aaf Merge #5561 'inccommand'
Initial work by:
  Robin Elrharbi-Fleury (Robinhola)
  Audrey Rayé (Adrey06)
  Philémon Hullot (DesbyP)
  Aymeric Collange (aym7)
  Clément Guyomard (Clement0)

Major revisions by:
  KillTheMule
  Björn Linse <bjorn.linse@gmail.com>
  Justin M. Keyes <justinkz@gmail.com>
2016-11-09 03:19:22 +01:00
Justin M. Keyes
aa0e09d251 'inccommand': Preserve curbuf->b_u_newhead.
Add tests for undotree().

Helped-by: Björn Linse <bjorn.linse@gmail.com>

When "curhead" points to a valid head, the value of "newhead" is
meaningless (and really should be set to null). The undo state for
a buffer is _logically_ the enum:

  enum UndoState {
    CurrentHead(head),
    NewHead(head),
    EmptyTree
  }

nvim _represents_ this as: whenever `curbuf->b_u_curhead` is nonnull it
should be used as the current head, and `curbuf->b_u_newhead` is
ignored. If the there is a current head, then this will be redoed on the
next redo, and its parent will be undone on next undo. Only if
`b_u_curhead` is NULL, `b_u_newhead` will be used as the head to undo
(and it is not possible to redo). Also both can be NULL, to indicate an
empty undotree. (To be fair, this only strictly true when calling undo.c
from the outside, in some places _within_ a function in undo.c both
values might be meaningful)

Apparently `undotree()` breaks this non-abstraction, this _cosmetic_
issue can easily be fixed by `ex_substitute` also saving and restoring
`b_u_newhead`, but is doesn't reflect any error really how
`u_undo_and_forget` manipulates the _actual_ state of the undo tree.
2016-11-09 01:03:47 +01:00
Justin M. Keyes
21dfbfbb9a perf: do_sub(): avoid work, avoid screen updates
- Don't fill matched_lines if not showing a preview (!eap->is_live).
- Encapsulate: Move cursor placement logic to show_sub().
2016-11-08 21:22:24 +01:00
Justin M. Keyes
f3e8ca3bf5 'inccommand': preserve 'modified'
During the live preview, the buffer-local 'modified' flag
should not be changed.
2016-11-08 21:22:24 +01:00
Justin M. Keyes
ff6ec703d5 'inccommand': Do not trigger during scripts, feedkeys(). 2016-11-08 21:22:24 +01:00
KillTheMule
527ba2b12a 'inccommand': test: scripts/feedkeys() should not trigger preview 2016-11-08 21:22:24 +01:00
Justin M. Keyes
6a3f8d48d0 'inccommand': rename 'incsubstitute'
'inccommand' allows us to expand the feature to other commands, such as:
    :cdo
    :cfdo
    :global

Also rename "IncSubstitute" highlight group to "Substitute".
2016-11-08 21:22:13 +01:00
Justin M. Keyes
1e0e301062 'inccommand': format line numbers as "|123| "
This matches what Quickfix traditionally does.
2016-11-08 21:21:46 +01:00
Justin M. Keyes
3ccf69c1de 'inccommand': set buffer name to [Preview]
[inc_sub] is less obvious for users. Also, in the future we may want to
generalize the idea of a "preview buffer", or "incremental commands"
besides :substitute.
2016-11-08 21:21:46 +01:00