Commit Graph

14489 Commits

Author SHA1 Message Date
Daniel Hahler
8a03acb8da vim-patch:8.1.1947: when executing one test the report doesn't show it #10893
Problem:    When executing one test the report doesn't show it.
Solution:   Adjust the regexp. (Daniel Hahler, closes vim/vim#4879)
60b1bcfe92
2019-08-30 22:48:46 +02:00
Daniel Hahler
16c289f217 vim-patch:8.1.1941: getftype() test fails on Mac #10894
Problem:    getftype() test fails on Mac.
Solution:   Skip /dev/fd/.
ad5db44c01
2019-08-30 22:47:28 +02:00
Daniel Hahler
6024fb5267
vim-patch:cb00f0393 (#10892)
Add missing test file.
cb00f03933
2019-08-30 18:47:42 +02:00
Jaskaran Singh
ab560739ac vim-patch:8.0.0930: terminal buffers are stored in the viminfo file (#10889)
Problem:    Terminal buffers are stored in the viminfo file while they can't
            be useful.
Solution:   Skip terminal buffers for file marks and buffer list
e62780543f
2019-08-30 18:46:54 +02:00
Daniel Hahler
e03a4f965e
scripts/vim-patch.sh: massage args for git-log [ci skip] (#10888)
Replace "src/nvim/" => "src/".
Replace ".*/.vim-src/" => "".

This allows to use tab completion based on existing files in Neovim's
source, or via .vim-src.

Previously you would have to typically remove the "nvim/" part manually
yourself.
2019-08-30 16:46:29 +02:00
Daniel Hahler
dd025a18c1
vim-patch:8.1.0950: using :python sets 'pyxversion' even when not executed (#10891)
Problem:    Using :python sets 'pyxversion' even when not executed.
Solution:   Check the "skip" flag. (Shane Harper, closes vim/vim#3995)
14816ad6e5
2019-08-30 16:43:21 +02:00
Daniel Hahler
1ab442db90
vim-patch:8.1.0212: preferred cursor column not set in interfaces (#10890)
Problem:    Preferred cursor column not set in interfaces.
Solution:   Set w_set_curswant when setting the cursor. (David Hotham,
            closes vim/vim#3060)
53901442f3
2019-08-30 16:42:19 +02:00
Justin M. Keyes
06e693cdc9
Merge #10884 'API: nvim_paste: add crlf parameter' 2019-08-30 09:15:43 +02:00
Justin M. Keyes
f5fd699c52 test: vim.paste() cancel 2019-08-30 08:33:14 +02:00
Justin M. Keyes
b6192a9920 API: nvim_paste: add crlf parameter 2019-08-30 08:33:14 +02:00
Daniel Hahler
4b8a16153e
tests: check_logs: improve error message (#10887)
Before:

    [  ERROR   ] test/functional/helpers.lua @ 812: after_each
    test/helpers.lua:156: assertion failed!
    stack traceback:
            test/helpers.lua:156: in function 'check_logs'
            test/functional/helpers.lua:816: in function <test/functional/helpers.lua:812>
2019-08-30 08:26:55 +02:00
Daniel Hahler
7d53887352
Merge pull request #10855 from blueyed/out_data_decide_throttle
Revisit out_data_decide_throttle
2019-08-30 07:46:24 +02:00
Justin M. Keyes
56e570f8af
Merge #10886 from janlazo/vim-8.1.1938
vim-patch:8.1.{233,1938}
2019-08-30 07:42:57 +02:00
Daniel Hahler
bf85023005 shell-test: remove REP_NODELAY, less delay with REP
REP_NODELAY was added because REP delayed too much.  This changes REP to
only add a delay on every 100th line instead.

This helps to cover the additional pulse steps with
out_data_decide_throttle, which would have required to change
REP_NODELAY anyway.
2019-08-30 07:12:46 +02:00
Daniel Hahler
b3ab7ba1d6 Revisit out_data_decide_throttle
Pulse every 0.1s only.

This makes `!yes` look much better (less busy).
2019-08-30 07:12:46 +02:00
Daniel Hahler
7732976918
tests: fix Test_tagfiles: use Vim's 'tags' (#10883)
When run via `test_alot.vim` `Test_tagfiles` gets run after `set tags&`,
and might therefore pick up "tags" from Neovim's source directory.

This patch makes it use Vim's default always (which is different from
Neovim's).
2019-08-30 07:10:21 +02:00
Jan Edmund Lazo
7ad1d00eaa vim-patch:8.1.1937: errors when using javascriptreact #10885
Problem:    Errors when using javascriptreact.
Solution:   Use ":runtime" instead of ":source". (closes vim/vim#4875)
4fb15c6476
2019-08-30 06:57:44 +02:00
Jan Edmund Lazo
97c1775646
vim-patch:8.1.0233: "safe" argument of call_vim_function() is always FALSE
Problem:    "safe" argument of call_vim_function() is always FALSE.
Solution:   Remove the argument.
ded27a1feb
2019-08-30 00:24:46 -04:00
Jan Edmund Lazo
f575b71449
vim-patch:8.1.1938: may crash when out of memory
Problem:    May crash when out of memory.
Solution:   Initialize v_type to VAR_UNKNOWN. (Dominique Pelle, closes vim/vim#4871)
c507a2d164
2019-08-29 20:48:01 -04:00
Justin M. Keyes
9f81acc076
paste: break lines at CR, CRLF #10877
Some terminals helpfully translate \n to \r.

fix #10872
ref #10223
2019-08-29 23:45:02 +02:00
Daniel Hahler
00d46f6328
Fix test/busted/outputHandlers/TAP.lua (#10881)
Extending the original TAP handler was not working as expected.
This adds a new function for displaying the log.

Ref: https://github.com/neovim/neovim/pull/10876
2019-08-29 22:11:51 +02:00
Jan Edmund Lazo
0ec80d5f64 vim-patch:8.1.0193: terminal debugger buttons don't always work (#10874)
Problem:    Terminal debugger buttons don't always work. (Dominique Pelle)
Solution:   Set 'cpo' to its default value.
ca4cc018ad
2019-08-29 02:19:38 +02:00
Daniel Hahler
71a9653194
third-party: remove msvc-compat/unistd.h (#10465)
This was upstreamed into unibilium.
2019-08-29 01:05:47 +02:00
Daniel Hahler
6cc76194b2
tests: use runtime from build for doc/tags with :help (#10479)
This is better practice in general, and allows to remove the "helptags
ALL" hacks.

Ref: https://github.com/neovim/neovim/issues/8824
Ref: https://github.com/neovim/neovim/commit/f1b67c3453c

* Makefile: fix dependencies with regard to helptags

- use the file as the main target to avoid unnecessary triggering
- use "make oldtest" on Travis to ensure it gets built
2019-08-28 22:47:54 +02:00
Jan Edmund Lazo
1d59575450 vim-patch:8.0.0303: shift_delete_registers() #10868
Problem:    Bracketed paste does not work in Visual mode.
Solution:   Delete the text before pasting
a1891848d9
2019-08-28 11:37:18 +02:00
Justin M. Keyes
82d52b229d
Merge #4448 'paste: redesign'
fix #3447
fix #3566
fix #7066
fix #7212
fix #7273
fix #7455
fix #10415

NA vim-patches:
vim-patch:8.1.1198
vim-patch:8.1.0224
vim-patch:8.0.1299
vim-patch:8.0.0569
vim-patch:8.0.0303
vim-patch:8.0.0296
vim-patch:8.0.0244
vim-patch:8.0.0238
vim-patch:8.0.0232
vim-patch:8.0.0231
vim-patch:8.0.0230
vim-patch:8.0.0210
2019-08-28 01:56:02 +02:00
Doron Behar
3c9c64d9dd doc: man.vim #10817
ref #10808
2019-08-28 01:38:58 +02:00
Justin M. Keyes
3157baed83 API: TRY_WRAP() for "abort-causing non-exception errors"
- Introduce TRY_WRAP() until we have an *architectural* solution.
  - TODO: bfredl idea: prepare error-handling at "top level" (nv_event).
- nvim_paste(): Revert luaeval() hack (see parent commit).
  - With TRY_WRAP() in nvim_put(), 'nomodifiable' error now correctly
    "bubbles up".
2019-08-28 00:55:13 +02:00
Marco Hinz
09cbd6769b vim-patch:8.1.1932: ml_get errors after append() #10866
Problem:  Ml_get errors after using append(). (Alex Genco)
Solution: Do not update the cursor twice.

d20070274c

fix #10847
2019-08-27 23:50:55 +02:00
Justin M. Keyes
46aa254bf3 paste: handle 'nomodifiable'
- nvim_paste(): Marshal through luaeval() instead of nvim_execute_lua()
  because the latter seems to hide some errors.
- Handle 'nomodifiable' in `nvim_put()` explicitly.
- Require explicit `false` from `vim.paste()` in order to "cancel",
  otherwise assume true ("continue").
2019-08-27 23:37:15 +02:00
Ihor Antonov
17f768ee9e clang/"null pointer dereference" #10864 2019-08-27 22:28:42 +02:00
Justin M. Keyes
87389c6a57 paste: make vim.paste() "public" 2019-08-27 22:14:52 +02:00
Justin M. Keyes
ed60015266 paste: handle vim.paste() failure
- Show error only once per "paste stream".
- Drain remaining chunks until phase=3.
- Lay groundwork for "cancel".
- Constrain semantics of "cancel" to mean "client must stop"; it is
  unrelated to presence of error(s).
2019-08-27 22:13:45 +02:00
Justin M. Keyes
4344ac1111 paste: tickle cursor
HACK: The cursor does not get repositioned after the paste completes.
Scheduling a dummy event seems to fix it.

Test case:
0. Revert this commit.
1. Paste some text in Normal-mode.
2. Notice the cursor is still in the cmdline area.
2019-08-27 22:13:45 +02:00
Justin M. Keyes
5b41070c63 paste: implement redo (AKA dot-repeat)
- Normal-mode redo idiom(?): prepend "i" and append ESC.
- Insert-mode only needs AppendToRedobuffLit().
- Cmdline-mode: only paste the first line.
2019-08-27 22:13:45 +02:00
Justin M. Keyes
bfc5a18f4b paste: insert text "before" cursor in Insert-mode 2019-08-27 22:13:45 +02:00
Justin M. Keyes
eacc70fb3e API: nvim_paste 2019-08-27 22:13:45 +02:00
Justin M. Keyes
c95f5d166f paste: workaround typeahead race
Workaround this failure:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 192: TUI paste: exactly 64 bytes
    test/functional/helpers.lua:403:
    retry() attempts: 478
    test/functional/terminal/tui_spec.lua:201: Expected objects to be the same.
    Passed in:
    (table: 0x47cd77e8) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz endz' }
    Expected:
    (table: 0x47cd7830) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' }

This happens because `curwin->w_cursor.col` is sometimes decremented at
the end of `do_put`... because the editor is in Normal-mode instead of
the expected Insert-mode.

Caused by "typeahead race" (#10826): there may be queued input in the
main thread not yet processed, thus the editor mode (`State` global)
will be "wrong" during paste. Example: input "i" followed immediately by
a paste sequence:

    i<start-paste>...<stop-paste>
    ^
     "i" does not get processed in time, so the editor is in
     Normal-mode instead of Insert-mode while handling the paste.

Attempted workarounds:
- vim.api.nvim_feedkeys('','x',false) in vim._paste()
- exec_normal() in tinput_wait_enqueue()
- LOOP_PROCESS_EVENTS(&main_loop,…,0) in tinput_wait_enqueue()

ref #10826
2019-08-27 21:19:10 +02:00
Justin M. Keyes
5ae6849517 paste: phases, dots
- Send `phase` parameter to the paste handler.
- Redraw at intervals and when paste terminates.
- Show "..." throbber during paste to indicate activity.
2019-08-27 21:19:10 +02:00
Justin M. Keyes
93e5f0235b API: nvim_put: "follow" parameter 2019-08-27 21:19:10 +02:00
Justin M. Keyes
613296936b API: nvim_put: always PUT_CURSEND
Fixes strange behavior where sometimes the buffer contents of a series
of paste chunks (vim._paste) would be out-of-order.

Now the tui_spec.lua screen-tests are much more reliable. But they still
sometimes fail because of off-by-one cursor (caused by "typeahead race"
resulting in wrong mode; fixed later in this patch-series).
2019-08-27 21:19:10 +02:00
Justin M. Keyes
1fdae25b2b test/tui_spec: connect to child session 2019-08-27 21:19:10 +02:00
Justin M. Keyes
517bf99ddb API: nvim_put: Avoid "N more lines" message 2019-08-27 21:19:10 +02:00
Justin M. Keyes
0221a9220a paste: edge-case: handle EOL at end-of-buffer
This is "readfile()-style", see also ":help channel-lines".
2019-08-27 21:19:10 +02:00
Justin M. Keyes
d303790ee7 paste: test 2019-08-27 21:19:10 +02:00
Justin M. Keyes
5a2894d677 paste: use nvim_put() 2019-08-27 21:19:10 +02:00
Justin M. Keyes
e1177be363 API: nvim_put #6819 2019-08-27 21:19:10 +02:00
Björn Linse
9e25a36467 API: nvim_put #6819: try to fix Insert, Visual 2019-08-27 21:19:10 +02:00
Björn Linse
4cc56905cb API: nvim_put #6819 2019-08-27 21:19:10 +02:00
Justin M. Keyes
f99caa755c paste: use chansend() in Terminal-mode 2019-08-27 21:19:10 +02:00