Commit Graph

7687 Commits

Author SHA1 Message Date
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
ZyX
31cdb227ba eval: Flush buffer in write_list
This way success/failure return from this function is more precise.
2017-02-23 01:49:05 +03:00
Jente Hidskes
1a81ec6d88 strings.c: remove unused assignment
As reported by clang-scan, `length_modifier` is never read in any code path
following this branch. It is safe to remove.
2017-02-20 20:06:38 +01:00
Sander Bosma
192fd161f9 hardcopy.c: fix dead assignment
`has_mbyte` is deprecated (globals.h), so `outputlen` is always assigned
within the if statement. Therefore, the previous initialization is
unnecessary.
2017-02-20 20:06:38 +01:00
Sander Bosma
ddd8f7d333 message.c: fix dead assignment by removing dead code
`enc_dbcs` and `enc_utf8` are deprecated (globals.h), so the second branch is
always taken.
2017-02-20 20:06:38 +01:00
Sander Bosma
8e194c53c7 misc1.c: remove dead initialization 2017-02-20 20:06:38 +01:00
Sander Bosma
83666f3ce2 screen.c: remove dead code
As stated in globals.h, mbyte flags are deprecated, and code using it can be
refractored to remove dead code. Since has_mbyte is defined to true, this
refractoring correct.
2017-02-20 20:06:38 +01:00
Jente Hidskes
04fb65fd76 screen.c: account for translated string length
`[RO]` is appended to the status line and `len` is increased with the length of
this string (4). However, the string is marked for translation and may
thus well be larger (or smaller) than 4. Therefore, we check the length at
runtime. The resulting len is never actually used, and thus could be removed.
However, by keeping this line, the body of this if-statement is kept consistent
with surrounding code, and future changes can not forget to add this line when
additional strings are added to p.
2017-02-20 19:56:58 +01: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
lonerover
362298e141 vim-patch:7.4.2061
Problem:    qf_init_ext() is too big.
Solution:   Move code to qf_parse_line() (Yegappan Lakshmanan)

e87e6dddc2
2017-02-16 16:26:12 +08: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
lonerover
a926f10d45 vim-patch:7.4.2047
Problem:    Compiler warning for initializing a struct.
Solution:   Initialize in another way. (Anton Lindqvist)

bfafb4c4a0
2017-02-15 12:18:44 +08:00
rover
9380574cf7 vim-patch:7.4.2046
Problem:    The qf_init_ext() function is too big.
Solution:   Refactor it. (Yegappan Lakshmanan)

e0d3797664
2017-02-15 12:14:59 +08: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