Commit Graph

6952 Commits

Author SHA1 Message Date
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
Marco Hinz
5082af415f Health: rework syntax (#5744)
- By re-enabling code blocks (every line that doesn't begin with a "-" and is
  indented by at least 4 spaces), we prevent the Markdown syntax to evaluate "_"
  as beginning for italic text.

  That's the case for `:CheckHealth deoplete` for instance. It would output:

    $ cat /tmp/log_{PID}

  Since the deoplete check gets run first, almost all of the following
  `:CheckHealth` output would be italic.

- Since we re-enable code blocks, we now have to tell our custom syntax that it
  can be part of markdownCodeBlock as well. Otherwise there would be no
  highlithing for our keywords ERROR, INFO, etc. after 4 spaces of indent.

- Since we do the above anyway, we make it work for mkdListItemLine as well.
  That's a highlight group from `plasticboy/vim-markdown` opposed to the shipped
  markdown syntax (which essentially is `tpope/vim-markdown`). Before this patch
  there was no highlighting at all in the `:CheckHealth` output.
2016-12-09 19:54:24 +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
Justin M. Keyes
043f85210a tui: "backpressure": Drop messages to avoid flooding.
Closes #1234

multiqueue:
- Implement multiqueue_size()
- Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion
  with MultiQueue.parent.
2016-12-09 18:51:17 +01:00
Shougo Matsushita
7da7ff7c5c vim-patch:7.4.1758, 7.4.1759, 7.4.1692 #5640
vim-patch:7.4.1758

Problem:    Triggering CursorHoldI when in CTRL-X mode causes problems.
Solution:   Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to
            feedkeys() (test with that didn't work though).

245c41070c

vim-patch:7.4.1759

Problem:    When using feedkeys() in a timer the inserted characters are not
            used right away.
Solution:   Break the wait loop when characters have been added to typebuf.
            use this for testing CursorHoldI.

40b1b5443c

vim-patch:7.4.1692
Problem:    feedkeys('i', 'x') gets stuck, waits for a character to be typed.
Solution:   Behave like ":normal". (Yasuhiro Matsumoto)
2016-12-09 17:46:14 +01:00
Justin M. Keyes
880ce887ed ci: Update appveyor artifact path. 2016-12-09 17:09:17 +01:00
Marco Hinz
ae9f1938ea Health: match syntax keyword case exactly (#5741)
This prevents the string "error" within error messages to be highlighted as
healthError.
2016-12-09 16:47:29 +01:00
James McCoy
4a2d2248e8 Merge pull request #5736 from jamessan/vim-7.4.1754
vim-patch:7.4.1754
2016-12-09 09:42:23 -05: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
ddfac951ea Merge pull request #5705 from brcolow/vim-7.4.1835
vim-patch:7.4.[1835,1956]
2016-12-08 10:43:17 -05:00
James McCoy
7775fb7dff lint 2016-12-08 10:36:24 -05:00
James McCoy
d1473880bc vim-patch:7.4.1754
Problem:    When 'filetype' was set and reloading a buffer which does not
            cause it to be set, the syntax isn't loaded. (KillTheMule)
Solution:   Remember whether the FileType event was fired and fire it if not.
            (Anton Lindqvist, closes vim/vim#747)

c3691332f7
2016-12-08 10:27:32 -05: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
adf29cef72 syntax.c: Update color names. (#5733)
Closes #5178
2016-12-08 01:01:12 +01:00
Justin M. Keyes
ff99cbfc02 Merge #5488 from justinmk/test-fix-mouse-drag
test: Disable unreliable test on travis+ASAN_UBSAN
2016-12-07 23:55:18 +01:00
Justin M. Keyes
8da23cb919 Merge #5729 from jamessan/vim-7.4.1751
vim-patch:7.4.1751,8d8aa0a
2016-12-07 18:47:10 +01:00
Justin M. Keyes
933c873cae test: Handle SIGHUP in tty-test fixture.
Closes #5727
2016-12-07 17:22:37 +01:00
Justin M. Keyes
a1b0f594ea test: Disable unreliable tests on travis+ASAN_UBSAN 2016-12-07 17:22:23 +01:00
James McCoy
f7a49532b1 lint 2016-12-07 11:04:33 -05:00
Justin M. Keyes
1a4f13ba8f test: helpers.retry() 2016-12-07 17:03:52 +01:00
James McCoy
035eb27575 vim-patch:8d8aa0a
Add missing test file.

8d8aa0a367
2016-12-07 10:44:35 -05:00
James McCoy
4f3c9ad4d7 vim-patch:7.4.1751
Problem:    Crash when 'tagstack' is off. (Dominique Pelle)
Solution:   Fix it. (Hirohito Higashi)

def5abe0a2
2016-12-07 10:44:31 -05:00
Björn Linse
e6b7dade4f Merge pull request #5712 from bfredl/utf8charset
clean up charset.c for assumed &encoding=utf-8
2016-12-07 15:42:06 +01:00
Justin M. Keyes
ff35d4c987 doc: 'shelltemp'
Closes #5706
2016-12-07 13:37:44 +01:00
Björn Linse
2eeabf9a43 mbyte: clean up charset.c for assumed encoding=utf-8 2016-12-07 08:59:08 +01:00
Michael Ennen
63c46c1106 vim-patch:8.0.0040
Problem:    Whole line highlighting with matchaddpos() does not work.
Solution:   Check for zero length. (Hirohito Higashi)

8507747600
2016-12-07 00:37:29 -07:00
Michael Ennen
0e99d29169 vim-patch:8.0.0033
Problem:    Cannot use overlapping positions with matchaddpos().
Solution:   Check end of match. (Ozaki Kiichi) Add a test (Hirohito Higashi)

a6c27ee6db
2016-12-06 22:57:30 -07:00
Michael Ennen
652f15aaa5 Add vim defaults to runtest.vim. 2016-12-06 22:42:14 -07:00
Michael Ennen
c5d2e442a3 vim-patch:7.4.2269
Problem:    Using 'hlsearch' highlighting instead of matchpos if there is no
            search match.
Solution:   Pass NULL as last item to next_search_hl() when searching for
            'hlsearch' match. (Shane Harper, closes vim/vim#1013)

e17bdffff7
2016-12-06 17:15:49 -07:00
Michael Ennen
0064e9738a vim-patch:7.4.2217
Problem:    When using matchaddpos() a character after the end of the line can
            be highlighted.
Solution:   Only highlight existing characters. (Hirohito Higashi)

4f416e4124
2016-12-06 17:12:08 -07:00
Michael Ennen
629e788b36 vim-patch:7.4.2163
Problem:    match() and related functions tested with old style test.
Solution:   Convert to new style test. (Hirohito Higashi)

d76a0c15f8
2016-12-06 17:02:13 -07: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)

7fed5c18f8
2016-12-06 15:52:48 -07:00
James McCoy
6115029496 Merge pull request #5721 from jamessan/vim-7.4.1708
vim-patch:7.4.1708
2016-12-06 15:47:59 -05:00
James McCoy
e085f7c5f1 vim-patch:7.4.1708
Problem:    New regexp engine does not work properly with EBCDIC.
Solution:   Define equivalence class characters. (Owen Leibman)

2a6fa564a3

Although nvim doesn't support EBCDIC systems, this keeps us inline with
upstream code so its easier to merge future patches in this area and
improves the readability of the code.
2016-12-06 11:16:33 -05:00
Marco Hinz
7666b4950e Health: show :help + tags (#5719) 2016-12-05 13:01:47 +01:00
James McCoy
8089292472 Merge pull request #5715 from equal-l2/change-lua-url
Update Lua's download URL
2016-12-03 23:59:38 -05:00
James McCoy
0165de0228 Merge pull request #5707 from jamessan/moar-cleaning
build: Make clean targets more thorough
2016-12-03 23:33:13 -05:00
James McCoy
cc33aebd8e Merge pull request #5716 from jamessan/fix-man-plugin
ftplugin/man: Finish early if &filetype is not man
2016-12-03 23:32:07 -05:00
James McCoy
9337e98b16
ftplugin/man: Finish early if &filetype is not man
Many people have `runtime ftplugin/man.vim` in their init file, as was
required in Vim to have the `:Man` command generally available.
7a4d069b removed the &filetype check, which caused these setups to
always create a blank `man://` buffer.
2016-12-03 21:27:43 -05:00
equal-l2
3143d7cce3 Change Lua's download URL 2016-12-04 09:42:32 +09:00
Justin M. Keyes
b025474258 vim-patch:8.0.0110 (#5700)
Closes #5616

Problem:    Drop command doesn't use existing window.
Solution:   Check the window width properly. (Hirohito Higashi)

5a030a540f
2016-12-03 22:38:13 +01:00
Justin M. Keyes
e29a4ceede Merge #5704 from jamessan/vim-7.4.1748
vim-patch:7.4.1748
vim-patch:f9660b5
2016-12-03 18:09:42 +01:00
James McCoy
d98ebd6ab9
build: Make clean targets more thorough 2016-12-02 20:38:55 -05:00
James McCoy
d9dffeb486
lint 2016-12-02 20:30:08 -05:00
James McCoy
a4f646dde8
vim-patch:f9660b5
Add missing test file.

f9660b59b2
2016-12-02 20:30:06 -05:00
James McCoy
fa9cd8b878
vim-patch:7.4.1748
Problem:    "gD" does not find match in first column of first line. (Gary
            Johnson)
Solution:   Accept match at the cursor.

1538fc34fa
2016-12-02 20:30:03 -05:00
Michael Ennen
34efe443ac vim-patch:7.4.1956
Problem:    When using CTRL-W f and pressing "q" at the ATTENTION dialog the
            newly opened window is not closed.
Solution:   Close the window and go back to the original one. (Norio Takagi,
            Hirohito Higashi)

5d2ca04029
2016-12-02 17:28:54 -07:00
Michael Ennen
9af8cd768d vim-patch:7.4.1835
Problem:    When splitting and closing a window the status height changes.
Solution:   Compute the frame height correctly. (Hirohito Higashi)

991dea3ab1
2016-12-02 16:04:47 -07: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