Commit Graph

7478 Commits

Author SHA1 Message Date
ZyX
3277eff31a buffer: Forbid unletting b:changedtick 2017-02-23 19:46:45 +03:00
ZyX
e2fbbb292f eval: Refactor item_lock
If I am not mistaking, this commit should not change any functionality.
2017-02-23 19:46:45 +03:00
ZyX
f2c9fd312c eval: Make sure that b:changedtick may not be unlocked via :unlo b:var
It still may be unlocked by `:unlock b:.var`.
2017-02-23 19:46:44 +03:00
ZyX
908e53d98d functests: Add tests
Contains a number of FIXMEs.
2017-02-23 19:46:44 +03:00
ZyX
4f10d42f82 buffer: Bind b:changedtick to b:['changedtick'], remove special cases 2017-02-23 19:46:44 +03:00
ZyX
0eab7ac4b9 api/buffer: Add nvim_buf_get_changedtick method 2017-02-23 19:46:44 +03:00
James McCoy
9752a333c3 Merge pull request #5771 from brcolow/lambda
Lambda Support
2017-02-23 07:30:20 -05:00
Shougo
4e21311f9c vim-patch:8.0.0341 (#6151)
Problem:    When using complete() and typing a character undo is saved after
            the character was inserted. (Shougo)
Solution:   Save for undo before inserting the character.

d56a79d339
2017-02-23 12:37:46 +01:00
Koichi Shiraishi
34e24cb2f7 terminal: Initialize colors in reverse order (#6160)
Closes #3601

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2017-02-23 11:44:09 +01:00
James McCoy
d4dd447ded
win: test: Fix closure jobs test on Windows 2017-02-23 01:24:55 -05:00
James McCoy
bc76ce2c4f
Merge remote-tracking branch 'origin/master' into lambda 2017-02-22 19:23:20 -05:00
James McCoy
ddab4661f7 strings.h: Include <stdarg.h> for vim_vsnprintf's use of va_list
This fully resolves #6141.
2017-02-20 11:54:58 -05:00
James McCoy
a667972568
string.c: Include <stdarg.h> for va_list type and va_* macros
Closes #6141
2017-02-19 18:40:33 -05:00
Justin M. Keyes
3a2ae17062 globals.h: Avoid expression in array definition.
See aa56b24ee6 (commitcomment-20949000)
2017-02-19 02:55:27 +01:00
Justin M. Keyes
22337b1c01 Merge #6137 from justinmk/cmdline-ctrl-r
cmdline: CTRL-R: Omit trailing ^M character
2017-02-19 14:20:52 +01:00
Justin M. Keyes
baab49ee89 cmdline: CTRL-R: Omit trailing <CR>.
The "technically correct" interpretation is to execute the first line
that is seen (and this is what happens on middle-click paste in Vim).
^M is only intended to "defuse" the newline, so the user can review it.

The parent commit changed the behavior to insert <Space> between lines,
but that's a higher-risk change: it is arguably possible that some user
*wants* the literal ^M chars when e.g. assigning to a register:
    :let @a='<C-R>b'

To avoid that risk, keep the old behavior and only omit the last ^M.
This makes `yy:<C-R>0` nicer at no cost.
2017-02-18 23:24:35 +01:00
Justin M. Keyes
308ccb6f5e cmdline: CTRL-R: <Space> instead of CR between lines.
^M isn't any more "correct" than space: the "technically correct"
interpretation is to execute the first line that is seen (and this is
what happens on middle-click paste in Vim). ^M is only intended to
defuse the newline, so that the user can review the command. We can do
that with a space instead, and then the command can be executed without
having to fix it up first.
2017-02-18 14:49:05 +01:00
Kurt Bonatz
b0bbe82a60 eval.c: has("unnamedplus"). (#6136)
Return 1 for UNIX  with a functioning clipboard provider.

Closes #6103
2017-02-18 14:04:46 +01:00
Justin M. Keyes
158ea52854 options: Remove 'esckeys' (#6138)
This was never supported and it does not make sense for Nvim.
2017-02-18 14:01:20 +01:00
Justin M. Keyes
b49a74a1af doc: README.md 2017-02-17 17:44:10 +01:00
Justin M. Keyes
59254e4ae7 doc: README.md 2017-02-17 17:41:30 +01:00
Justin M. Keyes
c1bc784ad8 Merge #6110 'refactor: Move vim_*printf to strings.c'. 2017-02-17 16:25:19 +01:00
timeyyy
f017ae6115 doc/provider: python virtualenvs #6135
Closes #1887

Helped-by: Tommy Allen <tommy@esdf.io>
2017-02-17 03:44:05 +01:00
Justin M. Keyes
706b01ba79 Merge #6114 'Partial string handling refactoring'. 2017-02-17 02:08:21 +01:00
Justin M. Keyes
4a107a11a1 Merge #6105 from justinmk/win32-bindeps
Windows: ship with common tools
2017-02-16 16:53:34 +01:00
Justin M. Keyes
0095ad5693 win/CI: Cache dependencies. 2017-02-16 16:23:18 +01:00
Justin M. Keyes
ab9298ec15 win/package: Copy externals without analyzing.
These are just blobs that we jammed into the package. find_program() and
WindowsDllCopy.cmake do not make sense here, they search include paths
and try to determine DLL dependencies (GetPrerequisites).
2017-02-16 16:23:18 +01:00
Justin M. Keyes
3378ffac8a win/package: nvim-qt GUI
Closes #6126
2017-02-16 16:23:18 +01:00
Justin M. Keyes
2fbc42aa8a win/package: provide common tools
References #1507
Closes #1811

curl.exe curl_7_52_1_openssl_nghttp2_x86.7z from https://winampplugins.co.uk/curl/
    curl 7.52.1 (x86_64-pc-win32) libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.8 nghttp2/1.19.0
    Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS IPv6 Largefile NTLM SSL libz HTTP2 HTTPS-proxy

tidy.exe http://tidybatchfiles.info
    HTML Tidy for Windows
    tidy version 5.3.14 date 2017.01.09 compiled for Windows win32 x86.

7za.exe http://www.7-zip.org
    7-Zip 16.04 (2016-10-04)

cat.exe http://unxutils.sourceforge.net

from gVim:
    diff.exe GNU diffutils version 2.7
    xxd.exe V1.10 27oct98 by Juergen Weigert (Win32)
    ye olde hacked-up tee.exe
2017-02-16 16:23:18 +01:00
Rui Abreu Ferreira
7caaa106e3 win/build: Download winpty
Winpty has x86/x64 binary builds, download them when building
Neovim.
2017-02-16 16:23:18 +01:00
Rui Abreu Ferreira
bddea0caff win/build: Fix libuv recipe for Windows/NMake X86_64
The 64bit check for the libuv recipe worked for the VS generator
but not for NMake.
2017-02-16 16:23:18 +01:00
Rui Abreu Ferreira
91205d219a win/build: detect architecture 2017-02-16 16:23:17 +01:00
svaante
a05690ae2d tui.c: Handle missing "key_dc" terminfo entry (#6128)
Closes #6025
2017-02-16 11:59:01 +01:00
Kurt Bonatz
0e44916fff ex_docmd.c: Allow unescaped spaces in :edit filename (#6119)
This makes :edit consistent on all platforms. 
Also affects :argedit, et al. Wild (tab) completion doesn't work, though.

Closes #6010
2017-02-15 11:12:31 +01:00
Michael Ennen
10c9ecc211 vim-patch:8.0.0297
Problem:    Double free on exit when using a closure. (James McCoy)
Solution:   Split free_al_functions in two parts. (closes #1428)

03ff9bcbc9
2017-02-14 17:38:19 -07:00
Michael Ennen
ef8701610b Allow lambdas to be used with jobs, timers and dictwatchers. 2017-02-14 17:38:19 -07:00
Michael Ennen
bae8a19c63 vim-patch:7.4.2235
Problem:    submatch() does not check for a valid argument.
Solution:   Give an error if the argument is out of range. (Dominique Pelle)

989f592f7f
2017-02-14 17:38:19 -07:00
Michael Ennen
effe760b13 vim-patch:7.4.2233
Problem:    Crash when using funcref() with invalid name. (Dominique Pelle)
Solution:   Check for NULL translated name.

843b884461
2017-02-14 17:38:19 -07:00
Michael Ennen
8cae66b5e0 vim-patch:7.4.2197
Problem:    All functions are freed on exit, which may hide leaks.
Solution:   Only free named functions, not reference counted ones.

c257487035
2017-02-14 17:38:18 -07:00
Michael Ennen
e2f76d190d vim-patch:7.4.2143
Problem:    A funccal is garbage collected while it can still be used.
Solution:   Set copyID in all referenced functions.  Do not list lambda
            functions with ":function".

bc7ce675b2
2017-02-14 17:38:18 -07:00
Michael Ennen
00ac82eae2 vim-patch:7.4.2142
Problem:    Leaking memory when redefining a function.
Solution:   Don't increment the function reference count when it's found by
            name. Don't remove the wrong function from the hashtab.  More
            reference counting fixes.

8dd3a43d75
2017-02-14 17:38:18 -07:00
Michael Ennen
42727ecf08 vim-patch:7.4.2141
Problem:    Coverity reports bogus NULL check.
Solution:   When checking for a variable in the funccal scope don't pass the
            varname.

ba96e9af38
2017-02-14 17:38:18 -07:00
Michael Ennen
e71e9020eb vim-patch:7.4.2139
Problem:    :delfunction causes illegal memory access.
Solution:   Correct logic when deciding to free a function.

0588d4f9d2
2017-02-14 17:38:18 -07:00
Michael Ennen
53fad45115 vim-patch:7.4.2137
Problem:    Using function() with a name will find another function when it is
            redefined.
Solution:   Add funcref().  Refer to lambda using a partial.  Fix several
            reference counting issues.

437bafe4c8
2017-02-14 17:38:18 -07:00
Michael Ennen
1f715ac1c1 vim-patch:7.4.2136
Problem:    Closure function fails.
Solution:   Don't reset uf_scoped when it points to another funccal.

5801644819
2017-02-14 17:38:18 -07:00
Michael Ennen
1e3c0efa0f vim-patch:7.4.2134
Problem:    No error for using function() badly.
Solution:   Check for passing wrong function name. (Ken Takata)

b54c3ff317
2017-02-14 17:38:17 -07:00
Michael Ennen
d7c798cd86 vim-patch:7.4.2121
Problem:    No easy way to check if lambda and closure are supported.
Solution:   Add the +lambda feature.

9532fe7fbe
2017-02-14 17:38:17 -07:00
Michael Ennen
f59321e319 vim-patch:7.4.2120
Problem:    User defined functions can't be a closure.
Solution:   Add the "closure" argument. Allow using :unlet on a bound
            variable. (Yasuhiro Matsumoto, Ken Takata)

10ce39a0d5
2017-02-14 17:38:17 -07:00
Michael Ennen
9f6f7fe26d vim-patch:7.4.2119
Problem:    Closures are not supported.
Solution:   Capture variables in lambdas from the outer scope. (Yasuhiro
            Matsumoto, Ken Takata)

1e96d9bf98
2017-02-14 17:38:17 -07:00
Michael Ennen
6563d85990 vim-patch:7.4.2104
Problem:    Code duplication when unreferencing a function.
Solution:   De-duplicate.

97baee80f0
2017-02-14 17:38:17 -07:00