Commit Graph
706 Commits
Author SHA1 Message Date
James McCoy fe03ce23bf vim-patch:7.4.2273
Problem:    getwininfo() and getbufinfo() are inefficient.
Solution:   Do not make a copy of all window/buffer-local options.  Make it
            possible to get them with gettabwinvar() or getbufvar().

https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
2016-12-28 14:57:39 -05:00
James McCoy c4c894b2fa vim-patch:7.4.2226
Problem:    The field names used by getbufinfo(), gettabinfo() and
            getwininfo() are not consistent.
Solution:   Use bufnr, winnr and tabnr. (Yegappan Lakshmanan)

https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
2016-12-28 14:57:39 -05:00
James McCoy 4453aa0d29 vim-patch:7.4.2215
Problem:    It's not easy to find out if a window is a quickfix or location
            list window.
Solution:   Add "loclist" and "quickfix" entries to the dict returnec by
            getwininfo(). (Yegappan Lakshmanan)

https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
2016-12-28 14:57:38 -05:00
James McCoy 6205846cd9 vim-patch:0952131
Updated runtime files.

https://github.com/vim/vim/commit/0952131376a517fc12dc5ae908a97018b4ee23f0
2016-12-28 14:57:38 -05:00
James McCoy 0046641070 vim-patch:7.4.2204
Problem:    It is not easy to get information about buffers, windows and
            tabpages.
Solution:   Add getbufinfo(), getwininfo() and gettabinfo(). (Yegappan
            Lakshmanan)

https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
2016-12-28 14:57:38 -05:00
Chris Lucas 99a8cd3be0 vim-patch:7.4.2201
Problem:    The sign column disappears when the last sign is deleted.
Solution:   Add the 'signcolumn' option. (Christian Brabandt)

https://github.com/vim/vim/commit/95ec9d6a6ab3117d60ff638670a803d43974ba51
2016-12-28 14:57:38 -05:00
Anmol Sethi c72f4d4d05 man.vim: revert "completion now respects 'wildignorecase'" (#5839)
Instead, a note was added to `:h man.vim` on how 'fileignorecase'
controls the case sensitivity of completion.
2016-12-27 19:01:04 -05:00
James McCoy 2c59277ca8 vim-patch:7.4.2010
Problem:    There is a :cbottom command but no :lbottom command.
Solution:   Add :lbottom. (Yegappan Lakshmanan)

https://github.com/vim/vim/commit/537ef08408c50e0c4104d57f74993b3b0ed9560d
2016-12-27 14:10:28 -05:00
James McCoy f224f3fbf1 vim-patch:7.4.1997
Problem:    Cannot easily scroll the quickfix window.
Solution:   Add ":cbottom".

https://github.com/vim/vim/commit/dcb170018642ec144cd87d9d9fe076575b8d1263
2016-12-27 14:10:27 -05:00
Justin M. Keyes b29c5dd384 doc: job_control.txt
References #5529
2016-12-14 20:52:18 +01:00
Michael Ennen 5e4eb18eb0 Add some tests and cleanup. 2016-12-12 10:17:35 -05:00
Michael Ennen a21c687661 Fixes. 2016-12-12 10:17:35 -05:00
Michael Ennen 2c4e92abea vim-patch:7.4.1731 Mark as NA
Leave a note in vim_diff.txt about it.
2016-12-12 10:17:35 -05:00
Michael Ennen c52856af2c vim-patch:7.4.1842
Problem:    get() works for Partial but not for Funcref.
Solution:   Accept Funcref.  Also return the function itself. (Nikolai Pavlov)

https://github.com/vim/vim/commit/03e19a04ac2ca55643663b97b6ab94043233dcbd
2016-12-12 10:17:35 -05:00
Michael Ennen 02c58d8a07 vim-patch:7.4.1839
Problem:    Cannot get the items stored in a partial.
Solution:   Support using get() on a partial.

https://github.com/vim/vim/commit/2bbf8eff6fab16d86e7bcfc0da1962d31bec7891
2016-12-12 10:17:35 -05:00
Michael Ennen c82dc7a6fd vim-patch:7.4.1836
Problem:    When using a partial on a dictionary it always gets bound to that
            dictionary.
Solution:   Make a difference between binding a function to a dictionary
            explicitly or automatically.

https://github.com/vim/vim/commit/1d429610bf9e99a6252be8abbc910d6667e4d1da
2016-12-12 10:17:35 -05:00
Michael Ennen 521e45f2a8 vim-patch:7.4.1559
Problem:    Passing cookie to a callback is clumsy.
Solution:   Change function() to take arguments and return a partial.

https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
2016-12-12 10:17:34 -05:00
Justin M. Keyes 29e651515f Merge #5752 from justinmk/doc
doc: api_info(), typval_encode.h
2016-12-11 02:04:33 +01:00
Justin M. Keyes cb58999007 os/shell: do_os_system(): Always show last chunk.
This ameliorates use-cases like:
    :!cat foo.txt
    :make
where the user is interested in the last few lines of output.

Try these shell-based ex-commands before/after this commit:
    :grep -r '' *
    :make
    :!yes
    :!grep -r '' *
    :!git grep ''
    :!cat foo
    :!echo foo
    :!while true; do date; done
    :!for i in `seq 1 20000`; do echo XXXXXXXXXX $i; done

In all cases the last few lines of the command should always be shown,
regardless of where throttling was triggered.
2016-12-10 01:26:34 +01:00
Justin M. Keyes 97204e1cef os/shell: Throttle :! output, pulse "..." message.
Periodically skip :! spam. This is a "cheat" that works for all UIs and greatly
improves responsiveness when :! spams MB or GB of output:
    :!yes
    :!while true; do date; done
    :!git grep ''
    :grep -r '' *

After ~10KB of data is seen from a single :! invocation, output will be skipped
for ~1s and three dots "..." will pulse in the bottom-left. Thereafter the
behavior alternates at every:
    * 10KB received
    * ~1s throttled

This also avoids out-of-memory which could happen with large :! outputs.

Note: This commit does not change the behavior of execute(':!foo').
      execute(':!foo') returns the string ':!foo^M', it captures *only* Vim
      messages, *not* shell command output. Vim behaves the same way.
      Use system('foo') for capturing shell command output.

Closes #1234

Helped-by: oni-link <knil.ino@gmail.com>
2016-12-09 18:51:17 +01:00
Marco Hinz 20995c7960 Remove g:python{,3}_host_skip_check (#5738)
This option simplifies the configuration options:

1) `g:python{,3}_host_prog` is not set.

    Neovim tries its best to find a suitable interpreter. This means calling
    exepath(), potentially multiple times, and a system('python -c ...') with
    the first found interpreter, to get the Python version.

2) `g:python{,3}_host_prog` is set.

    Avoids everything of the above. No safety checks, no training wheels. Fast
    host startup time!
2016-12-09 15:08:18 +01:00
James McCoy 49d2952658 Merge pull request #5659 from brcolow/vim-7.4.1685
vim-patch:7.4.[1685,2163,2217,2269],8.0.00[33,40]
2016-12-08 09:18:51 -05:00
Justin M. Keyes ff35d4c987 doc: 'shelltemp'
Closes #5706
2016-12-07 13:37:44 +01:00
Michael Ennen 6fea2dfd26 vim-patch:7.4.1685
Problem:    There is no easy way to get all the information about a match.
Solution:   Add matchstrpos(). (Ozaki Kiichi)

https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
2016-12-06 15:52:48 -07:00
James McCoy d98ebd6ab9 build: Make clean targets more thorough 2016-12-02 20:38:55 -05:00
Justin M. Keyes 3607e0b8ff doc: Remove obsolete reference to rgb_file.
Closes #5695
2016-12-01 16:00:28 +01:00
James McCoy 77dceaaeb7 Merge pull request #5675 from brcolow/vim-7.4.1738
vim-patch:7.4.17[35,38,39]
2016-12-01 13:32:12 -05:00
Marco Hinz 147b03e7d0 Add v:exiting
Contains the exit value nvim will use.

Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or
VimLeave) can check if Neovim is about to quit and with what exit value.

Closes #4666.
2016-12-01 14:57:22 +01:00
Björn Linse 1f8a3da796 Merge pull request #5669 from chemzqm/add-cmdline-mode-rpc
Add cmdline mode to ui_mode_change
2016-12-01 08:05:44 +01:00
chemzqm 3cf4b14e96 add cmdline mode to modechange of RPC and tests
use set_cursor_shape_bar for cmdline mode

fix test of screen_basic_spec.lua & screen.lua

comment fix
2016-11-30 22:20:06 +08:00
Michael Ennen d2be11fbf2 vim-patch:7.4.1735
Problem:    It is not possible to only see part of the message history.  It is
            not possible to clear messages.
Solution:   Add a count to ":messages" and a clear argument. (Yasuhiro
            Matsumoto)

https://github.com/vim/vim/commit/451f849fd6282a4facd4f0f58af62837443fb5a6
2016-11-29 16:32:43 -07:00
Michael Ennen 5efcefee87 vim-patch:7.4.2071
Problem:    The return value of type() is difficult to use.
Solution:   Define v:t_ constants. (Ken Takata)

https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76
2016-11-29 15:02:24 -07:00
Björn Linse 1d4563771b jobs: ensure calling jobclose() on a pty job sends SIGHUP. Closes #5619 2016-11-17 15:13:45 +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 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)

https://github.com/vim/vim/commit/ffec3c53496d49668669deabc0724ec78e2274fd
2016-11-15 23:16:08 -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.

https://github.com/vim/vim/commit/511972d810ea490955161ff5097ec2f57919ceaf
2016-11-15 22:00:25 -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)

https://github.com/vim/vim/commit/015efc32c1add6269099364835ddf85ff257b3c6
2016-11-16 08:55:17 +09: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 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 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.

https://github.com/vim/vim/commit/1473551a4457d4920b235eeeb9f279e196ee7225
2016-11-14 14:16:40 -05: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 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 d0689eb0b2 'inccommand': disable 'cursorline', 'spell' in preview 2016-11-08 21:21:43 +01:00
Justin M. Keyes c04ffe866d 'inccommand': rework
- 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)
2016-11-08 21:20:08 +01:00
Björn Linse 4ab3fe8eaa encoding: update documentation 2016-11-05 14:49:24 +01:00
James McCoy d37c2e5dc2 doc: Remove features from vim_diff which have been merged upstream (#5554)
- TabNew/TabClosed: Introduced in 7.4.2075 and 7.4.2077
- hl-EndOfBuffer: Introduced in 7.4.2213
2016-10-31 17:26:32 +01:00
Justin M. Keyes e427cdf2d4 doc/api: Closes #1842 2016-10-31 16:16:37 +01:00