Commit Graph

13053 Commits

Author SHA1 Message Date
Jit Yao Yap
4e49e44259 Update to restore layout only for non-floating windows 2019-03-23 22:14:03 +01:00
Jit Yao Yap
2a618e0ad0 Update test 2019-03-23 22:14:03 +01:00
Jit Yao Yap
31fa064c68 floating-window.c: fix crash when using inccommand 2019-03-23 22:14:03 +01:00
Björn Linse
b3b8910c48
Merge pull request #9763 from bfredl/prevfloat
window: don't crash when closing two floats in a row
2019-03-23 22:13:57 +01:00
Björn Linse
ae49e8da58 window: don't crash when closing two floats in a row
prevwin can be set to the current window. Then we can't jump to it
after closing a float.
2019-03-23 20:12:37 +01:00
Jan Edmund Lazo
a73e0e8e77 vim-patch:8.1.1045: E315 ml_get error when using Python and hidden buffer
Problem:    E315 ml_get error when using Python and hidden buffer.
Solution:   Make sure the cursor position is valid. (Ben Jackson,
            closes vim/vim#4153, closes vim/vim#4154)
63dbfd33c1
2019-03-23 14:56:34 -04:00
Jan Edmund Lazo
ca71c82196 vim-patch:8.1.0538: evaluating a modeline might invoke using a shell command
Problem:    Evaluating a modeline might invoke using a shell command. (Paul
            Huber)
Solution:   Set the sandbox flag when setting options from a modeline.
5958f95a40
2019-03-23 08:09:27 -04:00
Jan Edmund Lazo
6b3775bbe2 vim-patch:8.1.0189: function defined in sandbox not tested
Problem:    Function defined in sandbox not tested.
Solution:   Add a text.
d90a144eda
2019-03-23 01:26:13 -04:00
Jan Edmund Lazo
b5582d1b32 vim-patch:8.1.0177: defining function in sandbox is inconsistent
Problem:    Defining function in sandbox is inconsistent, cannot use :function
            but can define a lambda.
Solution:   Allow defining a function in the sandbox, but also use the sandbox
            when executing it. (closes vim/vim#3182)
93343725b5
2019-03-23 01:25:33 -04:00
Marco Hinz
3e78319ac6
help: ignore snapshotted window if invalid (#9774)
Nvim doesn't expect a window-changing command on an created-window event.

    autocmd WinNew * wincmd p
    help help

- A snapshot for window 1000 is created.
- The window is split and the cursor changes to the new window 1001.
- The autocmd kicks in and switches back to 1000.
- The help buffer is opened.
- On closing the help window 1000, it tries to go back to the snapshotted window
  which is... 1000.
- wp1000->w_buffer == NULL
- w_buffer is used by check_cursor()
- 🧨 -> 💥

Fixes https://github.com/neovim/neovim/issues/9773
2019-03-23 00:23:39 +01:00
Marco Hinz
3edf7fc64f
api: ignore floating windows for laststatus=1 (#9771)
ONE_WINDOW considers all windows whereas one_window() ignores floating windows.

Fixes https://github.com/neovim/neovim/issues/9768
2019-03-22 17:17:33 +01:00
Justin M. Keyes
fa6ed5f759
Merge #9769 from janlazo/vim-8.1.1025 2019-03-21 19:35:30 +01:00
Jan Edmund Lazo
ea538f8799 vim-patch:8.1.1026: unused condition
Problem:    Unused condition. (Coverity)
Solution:   Remove the condition.  Also remove unused #define.
d00e024d9f
2019-03-21 07:55:48 -04:00
Jan Edmund Lazo
5c97bfb1e2 vim-patch:8.1.1025: checking NULL pointer after addition
Problem:    Checking NULL pointer after addition. (Coverity)
Solution:   First check for NULL, then add the column.
64c8ed366d
2019-03-21 07:44:52 -04:00
Chris LaRose
c5631338b1 :mksession : restore tab-local working directories #9754 2019-03-21 11:53:38 +01:00
Aman
8698830cbd doc #9751
closes #9750
2019-03-20 12:44:06 +01:00
Marco Hinz
f282324e1b
test: add more debuggings tips [ci skip] (#9761)
Mention the common press-enter issue and how to visualize the screen.
2019-03-19 17:44:35 +01:00
Jan Edmund Lazo
24d7513dc4 vim-patch:8.1.0384: sign ordering #9758
Problem:    Sign ordering depends on +netbeans feature.
Solution:   Also order signs without +netbeans. (Christian Brabandt,
            closes vim/vim#3224)
8aeb504fc6
2019-03-19 12:42:17 +01:00
Justin M. Keyes
6f7b81bd6d
vim-patch:8.1.{0849,1001}: 'cursorline' highlight #9757
- Lua test correctly fails when 8.1.0849 is reverted.
- 8.1.1001 bug does not manifest in Neovim.

vim-patch:8.1.0849: cursorline highlight is not always updated
Problem:    Cursorline highlight is not always updated.
Solution:   Set w_last_cursorline when redrawing.  Fix resetting cursor flags
            when using the popup menu.
c07ff5c60a

vim-patch:8.1.1001: Visual area not correct when using 'cursorline'
Problem:    Visual area not correct when using 'cursorline'.
Solution:   Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
            closes vim/vim#4086)
8156ed3755
2019-03-19 12:24:41 +01:00
Justin M. Keyes
ad3b312cf5 build: do not pass empty CMAKE_INSTALL_PREFIX
ref #9748
ref #9743
2019-03-19 02:51:33 +01:00
Justin M. Keyes
5beb3b8ee5 test: example_spec.lua 2019-03-19 01:37:48 +01:00
Justin M. Keyes
a077f53914
Merge #9749 from janlazo/vim-8.1.1017 2019-03-19 00:03:23 +01:00
Jan Edmund Lazo
14bfa0c578 vim-patch:8.1.0775: matching too many files as zsh
Problem:    Matching too many files as zsh. (Danek Duvall)
Solution:   Be more specific with zsh filetype patterns.
2bf60b3001
2019-03-17 20:49:27 -04:00
Jan Edmund Lazo
fb95bb38b5 vim-patch:8.1.0771: some shell filetype patterns end in a star
Problem:    Some shell filetype patterns end in a star.
Solution:   Make sure that patterns not ending in a star are preferred.
147e7d0cab
2019-03-17 20:38:55 -04:00
Jan Edmund Lazo
8394bf676b vim-patch:8.1.1017: off-by-one error in filetype detection
Problem:    Off-by-one error in filetype detection.
Solution:   Also check the last line of the file.
493fbe4abe
2019-03-17 20:35:03 -04:00
Justin M. Keyes
29d6993ccd
build: pass CMAKE_INSTALL_PREFIX explicitly #9748
On some (but not all) systems this works implicitly.

fixes #9743
2019-03-17 23:35:56 +01:00
Justin M. Keyes
f3e7815e61
Merge #9747 from janlazo/vim-8.1.0858 2019-03-17 22:12:39 +01:00
Jan Edmund Lazo
d86c816f8c vim-patch:8.1.0048: vim_str2nr() on numbers close to max #9744
Problem:    vim_str2nr() does not handle numbers close to the maximum.
Solution:   Check for overflow more precisely. (Ken Takata, closes vim/vim#2746)
07ccf7ce7f
2019-03-17 22:08:01 +01:00
Jan Edmund Lazo
94d933aa7e oldtests: use LoadAdjust() on timer test 2019-03-17 15:13:19 -04:00
Björn Linse
027a2157d3
Merge pull request #9746 from bfredl/wildkeys
cmdline: revert <down> and <up> mappings for wildoptions=pum
2019-03-17 19:24:36 +01:00
Jan Edmund Lazo
536be31a19 vim-patch:8.1.0858: 'indentkeys' and 'cinkeys' defaults are different
Problem:    'indentkeys' and 'cinkeys' defaults are different.
Solution:   Make them the same, update docs. (close vim/vim#3882)
ce655743ba
2019-03-17 12:27:34 -04:00
Björn Linse
16d607929d cmdline: revert <down> and <up> mappings for wildoptions=pum
These confict with navigation mappings.  Better leave them to the user to
reverse them for now for users that want it.
2019-03-17 16:17:23 +01:00
Marco Hinz
9ef8d0d6b0
Merge pull request #9726 from mhinz/nvim_win_get_config
Closes #9723
2019-03-17 02:34:50 +01:00
Justin M. Keyes
7c38994ff2
aucmd_prepbuf: also restore prevwin #9741
bisected to f5d5da3917

Other test steps:

    nvim -u NORC
    :terminal tree /    " Produces lots of output
    :edit somefile.txt
    :vsplit
    :vsplit
    <c-w>l
    <c-w>l
    <c-w>h
    <c-w>p
2019-03-17 02:09:06 +01:00
Jan Edmund Lazo
32998731bf vim-patch:8.1.1011: indent from autoindent not removed #9742
Problem:    Indent from autoindent not removed from blank line. (Daniel Hahler)
Solution:   Do not reset did_ai when text follows. (closes vim/vim#4119)
2ba4238818
2019-03-17 00:46:15 +01:00
Tim Morgan
d8316f2a1b clipboard: Always copy as plain text in Wayland #9737
`wl-copy` by default tries to determine the mime type of a copied bit of
text. From the [readme](https://github.com/bugaevc/wl-clipboard):

> wl-copy automatically infers the type of the copied content by running
> xdg-mime(1) on it.

So copying a Ruby script from Nvim may store it in the Wayland clipboard
as mime-type `application/x-ruby`.

This is a small reproduction without Nvim:

    $ cat test.rb
    #!/usr/bin/env ruby
    puts 'hello world'
    $ cat test.rb | wl-copy
    $ wl-paste --list-types
    application/x-ruby

This commit fixes that by telling wl-copy that all text copied from
Nvim has the mime type `text/plain`.

    $ cat test.rb | wl-copy --type text/plain
    $ wl-paste --list-types
    text/plain;charset=utf-8
2019-03-16 22:55:24 +01:00
Marco Hinz
b557654f36 api: add tests for new code paths 2019-03-16 21:44:15 +01:00
Björn Linse
5c836d2ef8
Merge pull request #9607 from bfredl/wildpum
UI: deprecate redundant ext_wildmenu events and allow TUI popupmenu for cmdline
2019-03-16 20:41:10 +01:00
Justin M. Keyes
11a481f711 Merge #9686 'win/Lua: monkey-patch os.getenv()'
fixes #9681
2019-03-16 20:28:52 +01:00
Björn Linse
be8ebba325 Allow using internal popupmenu or ext_popupmenu for wildmenu
Deprecate ext_wildmenu. ext_popupmenu already contains more state (anchor
position), and will allow further expansion (info about items).
2019-03-16 19:53:21 +01:00
Justin M. Keyes
8d00393d0c
Merge #9736 from janlazo/vim-8.1.0019 2019-03-16 18:30:56 +01:00
Jan Edmund Lazo
3bad76008e oldtests: wait 200ms on mac for timer test 2019-03-16 10:40:50 -04:00
Marco Hinz
073ab7cda8
api: refactor FloatRelative usage 2019-03-16 15:34:16 +01:00
Marco Hinz
86992a7bb1
api: numerous small fixes 2019-03-16 15:02:56 +01:00
Marco Hinz
27c4b6b9bd
api: update doc 2019-03-16 12:35:59 +01:00
Marco Hinz
96edbe7b1d
api: add width/height to FloatConfig 2019-03-16 12:35:58 +01:00
Marco Hinz
3c88bbecb8
api: nvim_win_config() -> nvim_win_set_config() 2019-03-16 12:35:58 +01:00
Marco Hinz
98391cd6ab
api: refactor FloatAnchor usage 2019-03-16 12:35:57 +01:00
Marco Hinz
cfed9a4123
api: add nvim_win_get_config() 2019-03-16 12:35:52 +01:00
Björn Linse
175398f216
Merge pull request #9616 from chemzqm/completechange
add MenuPopupChanged autocmd
2019-03-16 10:36:54 +01:00