Commit Graph

11996 Commits

Author SHA1 Message Date
Jan Edmund Lazo
c1c5c4f8e4 vim-patch:8.1.0440: remove() with a range not sufficiently tested (#9076)
Problem:    remove() with a range not sufficiently tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3497)
2bfddfc508
2018-10-04 18:40:59 +02:00
Justin M. Keyes
79b358facd
Merge #9078 from janlazo/vim-8.0.1832 2018-10-04 11:43:56 +02:00
James McCoy
94e585944d
Merge pull request #9081 from jamessan/embed-crash
Fix crash if --embed is used more than once
2018-10-03 10:04:54 -04:00
James McCoy
eb7b2c7912
Fix crash if --embed is used more than once 2018-10-03 07:29:08 -04:00
Jan Edmund Lazo
c0d835764f vim-patch:8.1.0047: no completion for :unlet $VAR
Problem:    No completion for :unlet $VAR.
Solution:   Add completion. (Jason Franklin)
1983401088
2018-10-02 22:47:47 -04:00
Jan Edmund Lazo
07fbdf4acc vim-patch:8.0.1832: cannot use :unlet for an environment variable
Problem:    Cannot use :unlet for an environment variable.
Solution:   Make it work.  Use unsetenv() if available.
            (Yasuhiro Matsumoto, closes vim/vim#2855)
137374fd65
2018-10-02 20:44:48 -04:00
Daniel Hahler
65206714bc TUI: fix support for undercurl/underline color #9080 2018-10-03 00:35:25 +02:00
Björn Linse
14ae394532
Merge pull request #9052 from blueyed/undercurl
tui: add support for undercurl and colored underline
2018-10-02 15:10:47 +02:00
Björn Linse
171c80e227
Merge pull request #9064 from bfredl/uidoc
UI: rename ext_newgrid to ext_linegrid and add --embed UI startup recommendations
2018-10-02 10:55:47 +02:00
Björn Linse
bab3b0ad45 ui: reserve the right to split a screen redraw into multiple batches. 2018-10-02 10:52:37 +02:00
Björn Linse
43823acae2 ui: rename ext_newgrid to ext_linegrid 2018-10-01 21:24:15 +02:00
Björn Linse
b98af01260 ui: update docs for safe startup procedure 2018-10-01 21:24:15 +02:00
Daniel Hahler
c4006a621e tui: add support for undercurl and underline color
Fixes https://github.com/neovim/neovim/issues/7479.
2018-10-01 16:22:26 +02:00
Justin M. Keyes
8ac44984c4 Revert "TUI: terminfo_start: use unibi_from_term directly"
If $TERM is not defined then unibi_from_term() would crash.

Reverts 3bdc34d065.
ref #9072
2018-10-01 00:42:19 +02:00
James McCoy
e2647366c9
Merge pull request #9073 from blueyed/vim-patch-ff
vim-patch.sh: use --ff with git-pull
2018-09-30 18:36:19 -04:00
Daniel Hahler
c2f337ce97 vim-patch.sh: use --ff with git-pull
I have `merge.ff = no` in my Git config to not use fast-forward merges
by default, but when updating the Vim sources it should not cause a
merge commit.

[ci skip]
2018-09-30 21:05:26 +02:00
Daniel Hahler
3bdc34d065 TUI: terminfo_start: use unibi_from_term directly (#9072)
Avoids redundant call to `getenv("TERM")`.

Ref: e3b16d6219/uniutil.c (L203-L211)
2018-09-30 20:39:45 +02:00
Justin M. Keyes
3999aa755e man.vim: set $MANWIDTH=999
On some systems, mandoc disallows $MANWIDTH greater than 1000.
E.g. FreeBSD:
b7d613ae8a/contrib/mandoc/manpath.c (L312)

closes #9065
2018-09-30 18:35:19 +02:00
ssteinbach
6c496db4b7 undo: Fix infinite loop if undo_read_byte returns EOF #2880
Problem:  Corrupt(?) persistent undofile leads to an infinite loop.
Solution: Break out of loop if undo_read_byte returns EOF (cf.
          u_read_undo() which does this too).

backtrace from lldb (@ a743297be2):

    Process 70700 stopped
    * thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
        frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
    libsystem_pthread.dylib`__mtx_droplock + 209:
    -> 0x7fff8c8facd7:  movq   %rcx, -0x50(%rbp)
       0x7fff8c8facdb:  movq   %r8, -0x58(%rbp)
       0x7fff8c8facdf:  movq   %rdx, -0x68(%rbp)
       0x7fff8c8face3:  movq   %r14, -0x60(%rbp)
    (lldb) bt
    * thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      * frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
        frame 1: 0x00007fff8c8fab4e libsystem_pthread.dylib`pthread_mutex_unlock + 63
        frame 2: 0x00007fff915da2a4 libsystem_c.dylib`getc + 63
        frame 3: 0x000000010e6194b9 nvim`undo_read_byte(bi=0x00007fff5181a838) + 25 at undo.c:1553
        frame 4: 0x000000010e619685 nvim`unserialize_uhp(bi=0x00007fff5181a838, file_name=0x000000000f2e8060) + 421 at undo.c:840
        frame 5: 0x000000010e618abb nvim`u_read_undo(name=0x0000000000000000, hash=0x00007fff5181af80, orig_name=0x000000000f370dd0) + 1579 at undo.c:1363
        frame 6: 0x000000010e4a8db9 nvim`readfile(fname=0x000000000f370dd0, sfname=0x000000000f370dd0, from=0, lines_to_skip=0, lines_to_read=2147483647, eap=0x00007fff5181b6a0, flags=1) + 21017 at fileio.c:
    1961
        frame 7: 0x000000010e3ecc8b nvim`open_buffer(read_stdin=0, eap=0x00007fff5181b6a0, flags=0) + 603 at buffer.c:153
    ...

closes #2879
closes #2880
2018-09-30 17:54:24 +02:00
Matěj Cepl
84fcba9b01 editorconfig: Fix charset name #9070
According to
https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
the possible values of the charset property are "latin1", "utf-8",
"utf-16be", "utf-16le", or "utf-8-bom" (case insensitive), not "utf_8"

It breaks https://github.com/sgur/vim-editorconfig/ for example.
2018-09-30 17:02:19 +02:00
Daniel Hahler
4c57169745 dialog_changed: Remove mistaken assert #9069
It fails with `nvim -u NONE -c 'set modified' -c 'confirm q'`.

Introduced in 3dffc842f (vim-patch:8.0.0983), but the Vim patch [1] does not
have this assertion.

NULL gets handled in `dialog_msg` [2].

1: 3f9a1ff141
2: c6d36b97ba/src/nvim/ex_docmd.c (L9704-L9705)
2018-09-30 15:47:02 +02:00
Justin M. Keyes
c6d36b97ba
Merge #9067 from janlazo/vim-8.0.1485 2018-09-30 14:48:29 +02:00
Jan Edmund Lazo
9dcd5bd9c5 vim-patch:8.1.0067: syntax highlighting not working when re-entering a buffer
Problem:    Syntax highlighting not working when re-entering a buffer.
Solution:   Do force executing autocommands when not called recursively.
a5616b0136
2018-09-30 02:58:34 -04:00
Jan Edmund Lazo
6a680548ec vim-patch:8.1.0066: nasty autocommand causes using freed memory
Problem:    Nasty autocommand causes using freed memory. (Dominique Pelle)
Solution:   Do not force executing autocommands if the value of 'syntax' or
            'filetype' did not change.
c3ffc9b8d3
2018-09-30 02:51:04 -04:00
Jan Edmund Lazo
33ef959814 vim-patch:8.1.0068: nasty autocommands can still cause using freed memory
Problem:    Nasty autocommands can still cause using freed memory.
Solution:   Disallow using setloclist() and setqflist() recursively.
2f82ca7d79
2018-09-30 02:06:43 -04:00
Jan Edmund Lazo
cf7e351c24 lint 2018-09-29 22:11:50 -04:00
Jan Edmund Lazo
458a6f58b6 globals: arg_had_last is bool 2018-09-29 16:53:55 -04:00
Jan Edmund Lazo
63b1a7d0cf vim-patch:8.0.1485: weird autocmd may cause arglist to be changed recursively
Problem:    Weird autocmd may cause arglist to be changed recursively.
Solution:   Prevent recursively changing the argument list. (Christian
            Brabandt, closes vim/vim#2472)
9e33efd152
2018-09-29 16:45:51 -04:00
Justin M. Keyes
6e146d4132
test: check_cores(): Fix tmp dir exclusion (#9061)
tmpdir_get() may be an absolute path, but we invoke glob() with
a relative `initial_path`.

That can lead to this error:

    [  ERROR   ] test/functional/helpers.lua @ 752: after_each
    test/helpers.lua:95: cannot open ./Xtest-tmpdir/nvim8jKCjR: No such file or directory
    stack traceback:
            test/helpers.lua:95: in function 'glob'
            test/helpers.lua:273: in function 'check_cores'
            test/functional/helpers.lua:757: in function <test/functional/helpers.lua:752>
2018-09-28 08:58:22 +02:00
Jan Edmund Lazo
b09f173d93 vim-patch:8.1.0416: sort doesn't report deleted lines (#9062)
Problem:    Sort doesn't report deleted lines.
Solution:   Call msgmore(). (Christian Brabandt, closes vim/vim#3454)
b0e982bf05
2018-09-28 08:56:54 +02:00
Björn Linse
64a8a8fd22
Merge pull request #9056 from bfredl/tui_repr
TUI code simplification and dead code elimination
2018-09-27 12:59:31 +02:00
Justin M. Keyes
33887206b9
Merge #9060 from janlazo/vim-8.1.0120 2018-09-27 10:47:37 +02:00
Justin M. Keyes
ba17bcfefc
vim-patch:8.1.0435: cursorline highlight not removed in some situation (#9059)
Problem:    Cursorline highlight not removed in some situation. (Vitaly
            Yashin)
Solution:   Reset last_cursorline when resetting 'cursorline'. (Christian
            Brabandt, closes vim/vim#3481)
8c63e0ec31
2018-09-27 10:33:39 +02:00
Justin M. Keyes
a1976c7390 man.vim: Start at the top #9023
fixes #9057
2018-09-27 10:08:31 +02:00
Jan Edmund Lazo
96a34daab7 lint 2018-09-27 03:17:36 -04:00
Björn Linse
edb26f2c65 tui: eliminate scrolling region data structure
The scrolling region is always local to a single grid_scroll event, use
local variables and parameters instead.

The invocation of reset_scroll_region in grid_resize is cargo-culted to use
margin reset under exactly the same circumstances, not sure if it is necessary
though.
2018-09-27 08:50:48 +02:00
Jan Edmund Lazo
25e6d37705 vim-patch:8.1.0120: buffer 'modified' set even when :sort has no changes
Problem:    Buffer 'modified' set even when :sort has no changes.
Solution:   Only set 'modified' when lines are moved. (Jason Franklin)
dc9e955fb0
2018-09-26 21:32:45 -04:00
Björn Linse
1b8939d233 tui: eliminate grid->attrs, use indexed cell->attr
remove dead ugrid_put
2018-09-26 19:30:21 +02:00
Justin M. Keyes
fc18fad74f
Merge #9053 from janlazo/vim-8.1.0433 2018-09-26 08:13:21 +02:00
Jan Edmund Lazo
c6350e4150 vim-patch:8.1.0436: can get the text of inputsecret() with getcmdline()
Problem:    Can get the text of inputsecret() with getcmdline(). (Tommy Allen)
Solution:   Don't return the text.
ee91c33570
2018-09-25 23:13:29 -04:00
Jan Edmund Lazo
28ac4a99f2 vim-patch:8.1.0433: mapping can obtain text from inputsecret()
Problem:    Mapping can obtain text from inputsecret(). (Tommy Allen)
Solution:   Disallow CTRL-R = and CTRL-\ e when using inputsecret().
31cbadf74b
2018-09-25 23:09:51 -04:00
Josh Triplett
8240b8b596 terminal: Redraw statusline on title change #8973
The statusline may incorporate b:term_title, so redraw it when that
title changes.

Introduce a new function status_redraw_buf to redraw windows associated
with the current buffer.
2018-09-25 08:47:48 +02:00
Justin M. Keyes
7862c3ae3e
Merge #9047 from jamessan/log-crash 2018-09-25 08:07:51 +02:00
Christian Duerr
7bff9a5de8 TUI: Alacritty supports DECSCUSR (#9048)
Alacritty may set TERM to"alacritty" or "alacritty-direct" if it finds its terminfo.
2018-09-25 07:54:25 +02:00
James McCoy
d59bf058ab
log: Assert that we haven't started freeing memory before logging
This is to catch situations like the previous commit, which somehow
avoided detection by any of the CI builds.
2018-09-24 22:56:24 -04:00
James McCoy
1bd916df35
os_unix: Log exit code before freeing all memory
When building with -DEXITFREE, the ILOG call would result in a crash
trying to access VV_PROGPATH, which had already been released:

    (gdb) bt
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007f8f761082f1 in __GI_abort () at abort.c:79
    #2  0x00007f8f760ffa8a in __assert_fail_base (fmt=0x7f8f76253ec8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
        assertion=assertion@entry=0x1c74280 <.str.8> " ,\t\n", file=file@entry=0x1c73fe2 "256]'", line=line@entry=610,
        function=function@entry=0x1c742e0 <.str.9+32> "") at assert.c:92
    #3  0x00007f8f760ffb02 in __GI___assert_fail (assertion=0x1c74280 <.str.8> " ,\t\n", file=0x1c73fe2 "256]'", line=610,
        function=0x1c742e0 <.str.9+32> "") at assert.c:101
    #4  0x00000000012d87c1 in vim_getenv (name=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE") at ../src/nvim/os/env.c:608
    #5  0x00000000012d6538 in expand_env_esc (srcp=0x1c2f4e0 <.str.10+32> "",
        dst=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE", dstlen=4095, esc=false, one=false, prefix=0x0)
        at ../src/nvim/os/env.c:351
    #6  0x00000000012d85af in expand_env_esc (srcp=0x625000000100 "\004", dst=0x7ffeed88cf40 "", dstlen=32766, esc=237, one=136,
        prefix=0x60200401c8b4 <error: Cannot access memory at address 0x60200401c8b4>) at ../src/nvim/os/env.c:472
    #7  0x0000000000eb4274 in do_log_to_file (log_file=0x0, log_level=0, context=0x0, func_name=0x0, line_num=0, eol=false, fmt=0x0)
        at ../src/nvim/log.c:254
    #8  0x0000000000eb305b in open_log_file () at ../src/nvim/log.c:164
    #9  0x0000000000eb2cc6 in logmsg (log_level=<error reading variable: Cannot access memory at address 0x268>,
        context=<error reading variable: Cannot access memory at address 0x260>,
        func_name=<error reading variable: Cannot access memory at address 0x258>,
        line_num=<error reading variable: Cannot access memory at address 0x254>,
        eol=<error reading variable: Cannot access memory at address 0x253>,
        fmt=<error reading variable: Cannot access memory at address 0x248>) at ../src/nvim/log.c:109
    #10 0x00000000013022c7 in mch_free_acl (aclent=0x4f59100) at ../src/nvim/os_unix.c:132
    #11 0x0000000000efddac in getout (exitval=0) at ../src/nvim/main.c:681
    #12 0x0000000000c1bb3e in ex_quit (eap=0x7ffeed88cd00) at ../src/nvim/ex_docmd.c:6067
    #13 0x0000000000bab781 in do_one_cmd (cmdlinep=0x7ffeed88f180, flags=10, cstack=0x7ffeed88f1a0, fgetline=0x0, cookie=0x0)
        at ../src/nvim/ex_docmd.c:2228
    #14 0x0000000000b8de6d in do_cmdline (cmdline=0x7ffeed891ae2 "quit", fgetline=0x0, cookie=0x0, flags=10)
        at ../src/nvim/ex_docmd.c:592
    #15 0x0000000000b94036 in do_cmdline_cmd (cmd=0x7ffeed891ae2 "quit") at ../src/nvim/ex_docmd.c:268
    #16 0x0000000000efb900 in exe_commands (parmp=0x7ffeed890900) at ../src/nvim/main.c:1699
    #17 0x0000000000ee96b2 in main (argc=11, argv=0x7ffeed890fa8) at ../src/nvim/main.c:524
2018-09-24 22:56:19 -04:00
Justin M. Keyes
59b2e6d35d
deps: revert to jemalloc 4.5.0 (#9035)
- Since the jemalloc upgrade to 5.1.0, I'm seeing weird behavior such as
  infinite loops inside jemalloc routines.
- VimR maintainer reported major performance regression correlated with
  jemalloc 5.1.0.

ref https://github.com/neovim/neovim/pull/7808

reverts 765515010f
2018-09-25 00:06:52 +02:00
Justin M. Keyes
200c8b9cca
build: Unify USE_BUNDLED, USE_BUNDLED_DEPS (#9046)
It's confusing that the Makefile uses a different name than CMake.
2018-09-24 23:18:48 +02:00
MichaHoffmann
8cb04c2230 fixed lint errors 2018-09-24 22:05:01 +02:00
MichaHoffmann
50c22325df src/nvim/eval.c: printf error 2018-09-24 21:31:57 +02:00