Commit Graph

223 Commits

Author SHA1 Message Date
Jan Edmund Lazo
7e9afca990 win/package: move gui shim to its runtime folder (#8418)
Close #7517

gui shim is for nvim-qt only.
2018-05-20 08:27:52 +02:00
Justin M. Keyes
ef4feab0e7
version: rename "0.2.3" to "0.3.0" (#8268)
0.2.1 was a big release, it should have been renamed to 0.3.0.
0.2.3 also has significant changes, so rename it.
2018-04-13 22:15:52 +02:00
Justin M. Keyes
cb5cde6e2b
build/CMake: use CMake-2.8.7-compatible list-check (#8220)
Tested with:
    make CMAKE_EXTRA_FLAGS='-DLANGUAGES="en_GB;ja;sk"'

closes #8219
2018-04-02 12:40:31 +02:00
Marty E. Plummer
362346f563 build/CMake: LANGUAGES config option #8203
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
2018-03-31 10:59:45 +02:00
Justin M. Keyes
9a0147754c build: respect $DEPS_BUILD_DIR
Without this, the CI_TARGET=lint travis job cant't find the cached deps
(in $HOME/nvim-deps), nor can it update the cache.
2018-03-11 15:38:18 +01:00
b-r-o-c-k
01fc02beee build/msvc: Add missing WIN32 macro
MSVC predefines `_WIN32`, but not `WIN32`. Also, some unnecessary includes have been removed.
2018-03-04 17:44:23 -06:00
Justin M. Keyes
4b81f627c6 build/gcc: disable -Warray-bounds entirely #7923
We need to disable -Warray-bounds locally for kbtree.h, but we can't
because _Pragma("GCC diagnostic pop") is broken in GCC 5.x+.

So this commit disables -Warray-bounds entirely (for GCC only).

GCC bug:
"_Pragma diagnostic 'ignored' in macro with strict-overflow not
suppressing warning fully with -Werror"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66099

ref https://github.com/neovim/neovim/pull/7083#issuecomment-326323599
closes #7921
2018-02-19 22:14:34 +01:00
James McCoy
86ee92f2a2
cmake: Set TEST_LIBNVIM_PATH to empty string when not unit testing 2018-02-02 07:28:56 -05:00
James McCoy
41a91af5cf cmake: Use generator expression to determine libnvim-test path
Prior to CMake 2.8.12, generator expressions could only be used in
custom commands so the path to libnvim-test in test/config/paths.lua was
set by inspecting the target's LOCATION property.  Post 2.8.12, the
file(GENERATE) command exists to handle this, but it can't interpolate
normal CMake variables.

In order to bridge the gap while < 2.8.12 is supported, use
configure_file() to create paths.lua.gen with the
$<TARGET_FILE:nvim-test> generator expression and then generate the
final paths.lua file.

Closes #7077
2018-01-22 14:16:31 -05:00
ZyX
6a1557f2f4 eval/typval: Log list actions
New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more
efficient it is allocated as a linked list with chunks of length
2^(7+chunk_num); that uses basically the same idea as behind increasing kvec
length (make appending O(1) (amortized)), but reduces constant by not bothering
to move memory around what realloc() would surely do: it is not like we need
random access to log entries here to justify usage of a single continuous memory
block.
2018-01-14 01:33:18 +03:00
ZyX
fe3a58273e cmake: Fix api/version test failure 2017-11-19 22:24:26 +03:00
Justin M. Keyes
d6f9d1df04 version bump 2017-11-18 12:46:38 +01:00
Justin M. Keyes
6d2c30daf3 NVIM v0.2.2
FEATURES:
a6de144c3e 'viewoptions': add "curdir" flag #7447
b6a603fe51 node.js remote-plugin support #7458
f5d4da0144 :checkhealth : validate 'runtimepath' #7526

FIXES:
e6beb60da5 :terminal : fix crash on resize #7547
f19e5d6530 work around gnome-terminal memory leak #7573
07931ed1c8 'guicursor': use DECSCUSR for xterm-likes #7576
f185c739bc 'os_open: UV_EINVAL on NULL filename' #7561
e8af34dc63 win: provider: Detect(): return *.cmd path #7577
eacd788cf5 :checkhealth : fix check for npm and yarn #7569
a43a573ad5 health.vim: normalize slashes for script path #7525
69e3308771 cmake: install runtime/rgb.txt
d0b05e3c36 runtime: syntax error in `runtime/syntax/tex.vim` #7518
55d8967147 tutor: some fixes #7510

CHANGES:
9837a9c401 remove legacy alias to `v:count` #7407
c5f001a46a runtime: revert netrw update #7557
67e4529292 defaults: scrollback=10000 #7556
881f9e42d1 process_close(): uv_unref() detached processes #7539
2017-11-18 12:39:14 +01:00
Justin M. Keyes
c46d6f8da2 version bump 2017-11-08 01:25:06 +01:00
Justin M. Keyes
c67dd5acd0 NVIM v0.2.1
FEATURES:
0e873a30f3 Lua(Jit) built-in #4411
5b32bce73c Windows: `:terminal` #7007
7b0ceb3726 UI/API: externalize cmdline #7173
b67f58b284 UI/API: externalize wildmenu #7454
b23aa1cf09 UI: 'winhighlight' #6597
17531ed082 UI: command-line coloring (`:help input()-highlight`) #6364
244a1f97db API: execute lua directly from the remote api #6704
45626de63f API: `get_keymap()` #6236
db999821d4 API: `nvim_get_hl_by_name()`, `nvim_get_hl_by_id()` #7082
dc685387a3 menu_get() function #6322
9db42d4ce9 :cquit : take an error code argument #7336
9cc185dc6d job-control: serverstart(): support ipv6 #6680
1b7a9bf4d2 job-control: sockopen() #6594
6efe84af68 clipboard: fallback to tmux clipboard #6894
6016ac270f clipboard: customize clipboard with `g:clipboard` #6030
3a86dd54f3 ruby: override ruby host via `g:ruby_host_prog` #6841
16cce1ac17 debug: $NVIM_LOG_FILE #6827
0cba3da26e `:checkhealth` built-in, validates $VIMRUNTIME #7399

FIXES:
105d680aea TUI: more terminals, improve scroll/resize #6816
cb912a3eda :terminal : handle F1-F12, other keys #7241
619838f85d inccommand: improve performance #6949
04b3c32772 inccommand: Fix matches for zero-width #7487
60b1e8ad12 inccommand: multiline, other fixes #7315
f1f7f3b512 inccommand: Ignore leading modifiers in the command #6967
1551f71321 inccommand: fix 'gdefault' lockup #7262
6338199b76 API: bufhl: support creating new groups #7414
541dde36e3 API: allow K_EVENT during operator-pending
8c732f7274 terminal: adjust for 'number' #7440
5bec94652c UI: preserve wildmenu during jobs/events #7110
c349083155 UI: disable 'lazyredraw' during ui_refresh. #6259
51808a244e send FocusGained/FocusLost event instead of pseudokey #7221
133f8bc628 shada: preserve unnamed register on restart #4700
1b70a1da04 shada: avoid assertion on corrupt shada file #6958
9f534f338a mksession: Restore tab-local working directory #6859
de1084f3c4 fix buf_write() crash #7140
7f7698649f syntax: register 'Normal' highlight group #6973
6e7a8c3fe2 RPC: close channel if stream was closed #7081
85f3084e21 clipboard: disallow recursion; show hint only once #7203
8d1ccb606d clipboard: performance, avoid weird edge-cases #7193
01487d4385 'titleold' #7358
01e53a5cbe Windows: better path-handling, separator (slash) hygiene #7349
0f2873ce99 Windows: multibyte startup arguments #7060

CHANGES:
9ff0cc7085 :terminal : start in normal-mode #6808
032b088c84 lower priority of 'cursorcolumn', 'colorcolumn' #7364
2a3bcd1ff8 RPC: Don't delay notifications when request is pending #6544
023f67cad8 :terminal : Do not change 'number', 'relativenumber' #6796
1ef2d768e7 socket.c: Disable Nagle's algorithm on TCP sockets #6915
6720fe253e help: `K` tries Vim help instead of manpage #3104
7068370560 help, man.vim: change "outline" map to `gO` #7405
2017-11-07 23:54:31 +01:00
Justin M. Keyes
37420ef942 build: set MIN_LOG_LEVEL correctly (#7419)
closes #7283
regression by 42d892913d

- Don't need to explicitly put "-O2 -g" in RelWithDebInfo; CMake does
  that already. That was left-over from 42d892913d which removed the
  "Dev" custom build-type, but repurposed the logic for RelWithDebInfo.

- `if(DEFINED MIN_LOG_LEVEL)` doesn't work.
- `if(${MIN_LOG_LEVEL} MATCHES "^$")` doesn't work if -DMIN_LOG_LEVEL is
  omitted.
- `if(MIN_LOG_LEVEL)` also isn't what we want: it would be true if
  MIN_LOG_LEVEL=0.
2017-10-21 02:30:21 +02:00
James McCoy
6d471636ee
cmake: Check if the compiler understands -Wno-array-bounds
Closes #7297
2017-09-23 07:42:15 -04:00
James McCoy
b9cba41106
tui: Use unibi_var_from_num when available
As of unibilium 1.2.1, directly manipulating unibi_var_t is deprecated.

    ../src/nvim/tui/tui.c: In function 'update_attrs':
    ../src/nvim/tui/tui.c:321:7: warning: 'i' is deprecated: use unibi_var_from_num or unibi_num_from_var instead [-Wdeprecated-declarations]
           data->params[0].i = (fg >> 16) & 0xff;  // red
           ^~~~
    In file included from ../src/nvim/tui/tui.c:12:0:
    /usr/include/unibilium.h:632:9: note: declared here
         int i   UNIBI_DEPRECATED("use unibi_var_from_num or unibi_num_from_var instead");
             ^

All use should go through unibi_{num,str}_from_var and
unibi_var_from_{num,str}.  Wrap access of unibi_var_t behind a new
UNIBI_SET_NUM_VAR macro which uses the new functions when they're
available.
2017-09-16 23:23:01 -04:00
Ryan Prichard
7f22a27a10 win: integrate winpty (WIP)
Handling of process exit is still broken.  It detects the moment when the
child process exits, then quickly stops polling for process output.  It
should continue polling for output until the agent has scraped all of the
process' output.  This problem is easy to notice by running a command like
"dir && exit", but even typing "exit<ENTER>" can manifest the problem --
the "t" might not appear.

winpty's Cygwin adapter handles shutdown by waiting for the agent to close
the CONOUT pipe, which it does after it has scraped the child's last
output.  AFAIK, neovim doesn't do anything interesting when winpty closes
the CONOUT pipe.
2017-08-16 09:13:43 +02:00
Justin M. Keyes
a7538371fe build: linux does not always have execinfo.h (#7101)
Closes #7099
2017-07-30 23:02:41 +02:00
Justin M. Keyes
e6d54407ba Merge #7083 'build: disable array bounds checking in gcc < 4.8.5'
References #6931
2017-07-28 01:18:05 +02:00
John Szakmeister
3abf4c72b4 build: disable array bounds checking in gcc < 4.8.5
Thanks to James McCoy (jamessan) for finding the source of this issue.
2017-07-27 07:35:15 -04:00
Justin M. Keyes
42d892913d cmake: Remove custom "Dev" build-type. (#6932)
The main purpose of this build-type was to avoid unwanted ~/.nvimlog
files (which could get really big, and also affects performance) for
non-devs. But that is no longer necessary since the log system now
avoids non-critical logging by default (#6827).

This essentially reverts 87e5a41316
2017-06-29 09:29:40 +02:00
Justin M. Keyes
f34befe74c Merge #6789 from ZyX-I/lua-path
lua: Add paths from &runtimepath to package.path and package.cpath
2017-06-27 02:29:15 +02:00
Justin M. Keyes
fe1af9c2bc log: Always enable; remove DISABLE_LOG
- Establish ERROR log level as "critical". Such errors are rare and will
  be valuable when users encounter unusual circumstances.
- Set -DMIN_LOG_LEVEL=3 for release-type builds
2017-06-07 00:26:21 +02:00
Justin M. Keyes
1cf377f23a Merge #6777 from justinmk/bsd 2017-05-28 02:37:07 +02:00
Justin M. Keyes
a84926763f install: bsd: install manpages to /usr/local/man
https://svnweb.freebsd.org/ports/head/editors/neovim/Makefile?revision=428479&view=markup#l28

Closes #6771
2017-05-27 21:42:10 +02:00
ZyX
58f6ef50a8 ci: Also lint lua code in src/nvim/lua 2017-05-25 16:50:06 +03:00
Justin M. Keyes
7a1a3a1258 build: Default BUSTED_OUTPUT_TYPE to "nvim" (#6811) 2017-05-25 14:51:53 +02:00
Justin M. Keyes
6255c4e053 build: FreeBSD: Disable -Wc11-extensions only for clang
From FreeBSD ports patch:
https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-CMakeLists.txt?revision=425833&view=markup

References #4363
2017-05-21 13:44:02 +02:00
Florian Walch
7383274f66 cmake: Support building without LuaJIT. #6736
Compile `nvim` executable against Lua if PREFER_LUA=ON.

As the testing library `nvim-test` requires LuaJIT, it is
still compiled against LuaJIT. If LuaJIT is not available,
`nvim-test` is not built.
2017-05-13 16:59:06 +02:00
Björn Linse
244a1f97db Merge pull request #6704 from bfredl/luaexec
execute lua directly from the remote API
2017-05-13 15:06:41 +02:00
James McCoy
b43a3dbff8 Detect support for and use -Wimplicit-fallthrough 2017-05-12 14:41:51 -04:00
Björn Linse
12fb634fe6 API version bump 2017-05-12 10:02:36 +02:00
ZyX
09f849b600 Merge branch 'master' into luaviml'/lua 2017-05-08 15:43:45 +03:00
Rui Abreu Ferreira
685ca180f7 win: Terminal UI #6315
For CI builds unibilium is provided through msys2 packages, and
libtermkey is built from source in third-party from equalsraf/libtermkey.

In Windows we cannot read terminal input from the stdin file descriptor,
instead use libuv's uv_tty API. It should handle key input and encoding.

The UI suspend is not implemented for Windows, because the
SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP.

Closes #3902
Closes #6640
2017-05-03 12:48:24 +02:00
Justin M. Keyes
1b0d573a65 version bump 2017-05-01 22:17:32 +02:00
Justin M. Keyes
52727d98d7 NVIM v0.2.0
FEATURES:
    bc4a2e1576 help, man.vim: "outline" (TOC) feature #5169
    58422f17d8 'guicursor' works in the TUI (and sends info to UIs) #6423
    129f107c0c api: nvim_get_mode() #6247
    0b59f988f4 api/ui: externalize tabline #6583
    bc6d868d00 'listchars': `Whitespace` highlight group #6367
    6afa7d66cd writefile() obeys 'fsync' option #6427
    c60e409471 eval.c refactor (also improves some error messages) #5119
    9d200cd0a3 getcompletion("cmdline") #6376
    2ea7bfc627 terminal: Support extra arguments in 'shell'. #4504
    bf5110266c DirChanged autocmd #5928 #6262
    1743df82f9 'cpoptions': "_" flag to toggle `cw` behaviour #6235
    22337b1c01 CTRL-R omits trailing ^M when pasting to cmdline #6137
    0e44916fff :edit allows unescaped spaces in filename #6119
    abdbfd26bc eval: Add id() function and make printf("%p") useful #6095
    bdfa1479d2 findfile(), :find, gf work in :terminal. #6009
    2f38ed11c9 providers: Disable if `g:loaded_*` exists.
    b5560a69b1 setpos() can set lowercase marks in other buffers #5753
    7c513d646d Throttle :! output, pulse "..." message. #5396
    d2e8c76dc2 v:exiting #5651

    :terminal improvements #6185 #6142
      - cursor keeps position after leaving insert-mode.
      - 4ceec30cd0 Follows output only if cursor is at end of buffer.
      - e7bbd35c81 new option: 'scrollback'
      - fedb8443d5 quasi-support for undo and 'modifiable'
      - b45ddf731b disables 'list' by default
      - disables 'relativenumber' by default

    :help now contains full API documentation at `:help api`.

    man.vim saw numerous improvements.

    Windows support:
      - Windows is no longer "experimental", it is fully supported.
      - Windows package includes a GUI, curl.exe and other utilities.

    "Vim 8" features: partials, lambdas.

SECURITY FIXES:
    CVE-2017-5953 CVE-2017-6349 CVE-2017-6350 #6485

CHANGES:
    NVIM_TUI_ENABLE_CURSOR_SHAPE was removed. Use 'guicursor' instead.
        See https://github.com/neovim/neovim/wiki/Following-HEAD#20170402

    81525dc5c3 'mouse=a' is no longer the default. (This will probably
                 change again after it is improved.) #6022

    0c1f783164 defaults: 'showcmd', 'belloff', 'ruler' #6087
    eb0e94f71b api: {get,set}_option update local options as appropriate #6405
    bdcb2a38b3 "Reading from stdin..." message was removed. #6298

FIXES:
    12fc1defd6 ops: fix i<c-r> with multi-byte text #6524
    dd391bfca1 Windows: system() and friends #6497
    13352c00f1 Windows: os_get_hostname() #6413
    16babc6687 tui: Less-noisy mouse seqs #6411
    3a9dd13f9e (vim bug) folding edge-cases  #6207
    f6946c68ae job-control: set CLOEXEC on pty processes. #5986
    d1afd434f3 rplugin: Call s:LoadRemotePlugins() on startup.
    1215084676 backtick-expansion works with `shell=fish` #6224
    e32ec03d67 tui: Improved behavior after resize. #6202
    86c2adc074 edit.c: CTRL-SPC: Insert previously-inserted text. #6090
    c318d8e672 b:changedtick now follows VimL rules #6112
    34e24cb2f7 terminal: Initialize colors in reverse order #6160
    e8899178ec undo: Don't set b_u_curhead in ex_undojoin() #5869
    d25649fa01 undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)
    043d8ba422 'Visual-mode put from @. register' #5782
    42c922b32c open_buffer(): Do `BufEnter` for directories.
    50d0d89129 inccommand: Preview :sub commands only after delimiter #5932
    1420e10474 CheckHealth improvements #5519
    c8d5e9230e jobstart(): Return -1 if cmd is not executable. #5671
2017-05-01 22:13:23 +02:00
ZyX
ab4d13e2fa Merge branch 'master' into luaviml'/lua 2017-04-10 22:21:06 +03:00
ZyX
0f4b4c7529 headers: Remove useless HAVE_CONFIG_H macros
We do not have non-cmake build options, cmake always does configure_file.
2017-04-09 03:36:18 +03:00
ZyX
043d8ff9f2 Merge branch 'master' into luaviml'/lua 2017-04-08 01:54:58 +03:00
James McCoy
af2ee9c5d1
cmake: Detect whether msgpack-c has MSGPACK_OBJECT_FLOAT{32,64} types 2017-03-30 21:35:36 -04:00
ZyX
d60302d517 cmake: Link libnvim-test with luajit in place of lua, disable ASAN
Reasoning: luajit is not being compiled with sanitizers, lua is. Given that 
linking with sanitized libraries requires sanitizers enabled, it is needed to 
either compile libnvim-test with sanitizers or link it with lua compiled without 
sanitizers. Most easy way to do the latter is just use luajit which is compiled 
without sanitizers (as they do not work well with luajit).
2017-03-27 00:12:23 +03:00
ZyX
1646a28173 cmake: Allow switching from luajit to lua 2017-03-27 00:12:23 +03:00
ZyX
e7bbd8256b eval: Add luaeval function
No tests yet, no documentation update, no :lua* stuff, no vim module.

converter.c should also work with typval_T, not Object.

Known problem: luaeval("1", {}) results in

    PANIC: unprotected error in call to Lua API (attempt to index a nil value)

Ref #3823
2017-03-27 00:11:24 +03:00
Björn Linse
a5d03be7b8 api: bump api level to 2 2017-03-15 15:01:06 +01:00
Justin M. Keyes
039c7ab607 ci: MIN_LOG_LEVEL=2 (#6169)
DEBUG_LOG_LEVEL is very noisy and causes a lot of disk activity.
It is not needed on CI.
2017-02-24 11:03:56 +01:00
Justin M. Keyes
30826cb2d6 build: oldtest target: TEST_FILE, NVIM_PRG (#6098)
- Add support for TEST_FILE to the `oldtest` target, for consistency
  with the busted/lua tests.
  Caveat: with the busted/lua tests TEST_FILE takes a full path, whereas
  for `oldtest` it must be "test_foo.res".
- Add support for NVIM_PRG, again so that all test-related targets are
  consistent.
- Use consistent name for NVIM_PRG. But still need to support NVIM_PROG
  for QuickBuild CI.

Note: The `oldtest` target is driven by the top-level Makefile, because
it requires a TTY. CMake 3.2 added a USES_TERMINAL flag to
add_custom_target(). But we support CMake 2.8...

    add_custom_target(oldtest
      COMMAND make clean
      COMMAND make NVIM_PRG=$<TARGET_FILE:nvim> $ENV{MAKEOVERRIDES}
      DEPENDS nvim
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir"
      USES_TERMINAL true
    )
2017-02-12 01:02:54 +01:00
Justin M. Keyes
3803314f78 doc: QuickBuild 2017-01-31 08:58:43 +01:00
Justin M. Keyes
f78982620a build: Disable jemalloc for FreeBSD. (#6007)
jemalloc's README states:

> jemalloc [is] the FreeBSD libc allocator since 2005. ...  Modern jemalloc
> releases continue to be integrated back into FreeBSD

Since FreeBSD ships with jemalloc in some form, we don't need to require
jemalloc there. Less risk, low cost.
2017-01-26 13:07:30 +01:00