Commit Graph

10385 Commits

Author SHA1 Message Date
b-r-o-c-k
7612ba5ad9 build/msvc: Change MSBuild verbosity to normal 2018-03-05 11:00:01 -06:00
b-r-o-c-k
fb3667cd16 build/msvc: Remove confusing comment 2018-03-04 17:44:23 -06:00
b-r-o-c-k
cfb713b5c6 build/msvc: Add Appveyor CI for MSVC 2018-03-04 17:44:23 -06:00
b-r-o-c-k
353ca83f73 build/msvc: Workaround for compiler optimization bug 2018-03-04 17:44:23 -06:00
b-r-o-c-k
d7ee323326 build/msvc: Fix errors caused by compiler intrinsics 2018-03-04 17:44:23 -06:00
b-r-o-c-k
773f23e00d build/msvc: Make shell-test work
MSVC doesn't have unistd.h or usleep() so it was replaced with the
Sleep() WinAPI function.
2018-03-04 17:44:23 -06: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
b-r-o-c-k
8e30598115 build/msvc: Remove pkgconfig dependency on Windows 2018-03-04 17:44:23 -06:00
b-r-o-c-k
de3a833ec7
Merge branch 'master' into msvc-compat 2018-03-01 22:56:59 -06:00
b-r-o-c-k
adfad73d8e build/msvc: Make libtermkey depend on Unibilium 2018-03-01 22:50:02 -06:00
b-r-o-c-k
b3d0241416 build/msvc: Add patch for LuaRocks
LuaRocks bundles an outdated wget.exe for downloading packages on Windows. It is too old to support GitHub's TLS, so this patch will replace it with curl.
2018-03-01 22:50:02 -06:00
b-r-o-c-k
305673e923 build/msvc: Add patch for libvterm
The patch removes VLAs because MSVC does not support them.
2018-03-01 22:50:02 -06:00
b-r-o-c-k
fa6f892055 build/msvc: Add CMakeLists.txt and header for Unibilium
A header was added for compatibility with MSVC and CMakeLists.txt was
added for building with CMake.
2018-03-01 22:48:15 -06:00
Marco Hinz
3d2f4154b1
third-party: build all deps with debugging symbols (#8042)
When building with CMAKE_BUILD_TYPE=Debug, the dependencies are built like this:

| Dep        | Defaults  | Debug                                       |
|------------|-----------|---------------------------------------------|
| unibilium  | `-O2`     | `make CFLAGS=-O0 DEBUG=1`                   |
| msgpack    | `-g -O3`  | `cmake . -DCMAKE_C_FLAGS_DEBUG="-O0 -ggdb"` |
| libuv      | `-g -O2`  | `./configure CFLAGS="-O0 -ggdb"`            |
| luv        | `-g -O2`  | `cmake . -DCMAKE_C_FLAGS_DEBUG="-O0 -ggdb"` |
| libvterm   | not set   | `make CFLAGS=-O0 DEBUG=1`                   |
| libtermkey | not set   | `make CFLAGS=-O0 DEBUG=1`                   |
| jemalloc   | `-g3 -O3` | `./configure CFLAGS="-O0 -ggdb"`            |
| gperf      | `-g -O2`  | `./configure CXXFLAGS="-O0 -ggdb"`          |
| luajit     | `-g -O2`  | haven't checked yet                         |

This means that only unibilium, libtermkey, and libvterm don't build with
debugging symbols by default.

Build them with debugging symbols and optimisations that don't hinder
debugging: -Og -g
2018-03-01 10:23:21 +01:00
b-r-o-c-k
f2b6145d74 build/msvc: Use patched libvterm for MSVC 2018-02-28 19:38:30 -06:00
b-r-o-c-k
cb245a71ca build/msvc: Add MSVC compiler flag when building LuaRocks 2018-02-28 19:38:30 -06:00
b-r-o-c-k
3a6ee8819e build/msvc: Remove unnecessary copy command for msgpack DLL 2018-02-28 19:38:30 -06:00
b-r-o-c-k
0169872fd3 build/msvc: Fix linking for luajit and luv 2018-02-28 19:38:30 -06:00
b-r-o-c-k
9aec64c34e build/msvc: Allow building Unibilium on Windows 2018-02-28 19:38:30 -06:00
b-r-o-c-k
8f39e96d21 build/msvc: Remove unnecessary header include 2018-02-28 19:38:30 -06:00
b-r-o-c-k
60a341a05f build/msvc: Fix standard IO file number definitions
With MSVC, STDOUT_FILENO and STDERR_FILENO are defined as function calls instead of constants, meaning they can't be assigned to enum values. The enum was only used in one file, so it has been removed. A definition for STDIN_FILENO has been added that is consistent with the other two definitions.
2018-02-28 19:37:58 -06:00
b-r-o-c-k
2c414fbbb1 build/msvc: Fix missing restrict keyword
MSVC has the __restrict keyword and a marco is defined for it in `win_defs.h`.
2018-02-28 19:37:58 -06:00
b-r-o-c-k
f04b53aa24 build/msvc: Move include into unix_defs.h 2018-02-28 19:37:58 -06:00
b-r-o-c-k
d99f8feea3 build/msvc: Fix name of import library 2018-02-28 19:37:58 -06:00
b-r-o-c-k
d520e2590a build/msvc: Add mode_t typedef to win_defs.h 2018-02-28 19:37:58 -06:00
b-r-o-c-k
69da692b0a build/msvc: Fix preprocessor parsing
Preprocessor directives on the first line of the file were not being parsed.
2018-02-28 19:37:58 -06:00
Marco Hinz
ba87a2cde7
cscope: ignore EINTR while reading the prompt (#8079)
The following code..

    au VimEnter,DirChanged * if filereadable('.git/cscope.out') |
        \ exe 'cs add .git/cscope.out' | endif

..would lead to this issue:

    Error detected while processing VimEnter Auto commands for "*":
    cs_read_prompt EOF: Interrupted system call
    Error detected while processing VimEnter Auto commands for "*":
    E262: error reading cscope connection 0

A signal, in this case SIGCHLD, during a system call leads to errno being set
to EINTR. Ignore it.

This is merely a workaround for the time being. We don't block SIGCHLD signals,
since they're needed by libuv. The proper fix would be to rewrite if_cscope.c to
use libuv for handling processes.
2018-02-28 23:37:05 +01:00
James McCoy
611351677d
Merge pull request #8069 from jamessan/use-luacheck-release
third-party: Use luacheck releases (0.21.2 for now) instead of master
2018-02-26 21:38:06 -05:00
James McCoy
ff8c848128
third-party: Explicitly version pin all luarocks modules 2018-02-26 08:09:00 -05:00
James McCoy
9938196298
third-party: Install all luarocks by name instead of URL 2018-02-25 19:02:39 -05:00
Daniel Hahler
f588113191 shada: fix typo (#8066) 2018-02-25 20:14:32 +01:00
James McCoy
c19ff66bfd
third-party: Use luacheck releases (0.21.2 for now) instead of master
Tracking master subjects us to breakages (as happened when
luacheck-scm-1.rockspec got renamed to luacheck-dev-1.rockspec) and
makes older releases unbuildable when that happens.
2018-02-25 13:11:27 -05:00
James McCoy
158f8b7ce3 unittest: Ignore all _Float-prefixed types (#8067)
Previously, we ignored only _Float128. But glibc 2.27 added _Float32
and _Float32x.  Rather than play whack-a-mole, ignore everything.
2018-02-25 10:23:12 +01:00
Björn Linse
f72630b784
Merge pull request #8055 from bfredl/strictwritedelay
make 'writedelay' show all redraws when negative
2018-02-24 09:40:20 +01:00
Björn Linse
e18177692a screen.c: make negative 'writedelay' show all redraws
Currently writedelay shows the sequence of characters that are sent to
the UI/TUI module. Here nvim has already applied an optimization: when
attempting to put a char in a screen cell, if the same char already was
there with the same attributes, UI output is disabled. When debugging
redrawing it it sometimes more useful to inspect the redraw stream one
step earlier, what region of the screen nvim actually is recomputing
from buffer contents (win_line) and from evaluating statusline
expressions.

Take the popupmenu as an example. When closing the popupmenu (in the
TUI), currently 'writedelay' looks like vim only is redrawing the region
which the pum covered. This is not what happens internally: vim redraws
the entire screen, even if only outputs the changed region.

This commit allows negative values of 'writedelay', which causes a delay
for all redrawn characters, even if the character already was displayed
by the UI before.
2018-02-24 09:10:00 +01:00
Justin M. Keyes
f3f1970597
Merge #8035 from justinmk/teto-fillchars-pr 2018-02-23 01:14:30 +01:00
Matthieu Coudron
384a39479a 'fillchars': fix defaults logic; handle ambiwidth=double #7986
Update tests.
2018-02-23 00:48:35 +01:00
Justin M. Keyes
0c930c2969 defaults: 'fillchars'
Most fonts should have these by now. Both are a significant visual
improvement.

- Vertical connecting bar `│` is used by tmux, pstree, Windows 7 cmd.exe
  and nvim-qt.exe.
- Middle dot `·` works on Windows 7 cmd.exe, nvim-qt.exe.

For reference: tmux uses these chars to draw lines: │ ├ ─
2018-02-23 00:48:35 +01:00
Björn Linse
15670ca1ad
Merge pull request #8050 from bfredl/stopbridge
ui_bridge: make sure TUI receives no more messages after "stop" message
2018-02-22 15:51:28 +01:00
Björn Linse
8b05da1577 ui_bridge: make sure TUI receives no more UI events after "stop" event 2018-02-22 10:26:45 +01:00
Justin M. Keyes
8c8cf46c71
Merge #8044 'build: improve Lua module checks' 2018-02-22 09:38:10 +01:00
Daniel Hahler
4696a5a10e health.vim: minor cleanup (#8046) 2018-02-22 02:42:08 +01:00
Daniel Hahler
830b5819a0 health/provider: check Python also with loaded_var (#8047)
`g:loaded_python3_provider` gets set when the autoload file is sourced,
but this might error out, e.g. with deoplete:

    [deoplete] Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
    [deoplete] function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14
    [deoplete] deoplete requires Python3 support("+python3").
    [deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim.  See also :checkhealth.

It refers to `:checkhealth` from there explicitly, which would then
(without this patch) say that Python 3 is disabled.

This patch changes the reported info to include that it might have been
disabled due to some error, and keeps on going.
2018-02-22 02:38:00 +01:00
Daniel Hahler
1eb4aff57a checkhealth: python: do not report pythonx_errs twice (#8045)
They get reported unconditionally as errors below.
2018-02-22 02:37:23 +01:00
Daniel Hahler
c8074e3792 runtime/autoload/health/*.vim: fix vint warning (#8048) 2018-02-22 02:30:39 +01:00
Daniel Hahler
ef0a07c073 cmake/LuaHelpers.cmake: check_lua_module: use 'lua -l'
It only shortens the traceback a bit for when a module is not found
though, only removing the "(command line):1: in main chunk" (with
lua5.2).
2018-02-22 01:22:26 +01:00
Daniel Hahler
8851903434 cmake/LuaHelpers.cmake: check_lua_module: display errors
This helps to figure out what the problem is, e.g. in my case I have
lua51-mpack installed to be used with luajit, but it is broken (missing
libmpack).

With this patch you get:

    -- Checking Lua interpreter /usr/bin/luajit
    /usr/bin/luajit: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so':
            libmpack.so.0: cannot open shared object file: No such file or directory
    stack traceback:
            [C]: at 0x55fcf0166fb0
            [C]: in function 'require'
            (command line):1: in main chunk
            [C]: at 0x55fcf01188a0
    -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua5.1
    /usr/bin/lua5.1: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so':
            libmpack.so.0: cannot open shared object file: No such file or directory
    stack traceback:
            [C]: ?
            [C]: in function 'require'
            (command line):1: in main chunk
            [C]: ?
    -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua5.2
    /usr/bin/lua5.2: (command line):1: module 'mpack' not found:
            no field package.preload['mpack']
            no file '/usr/share/lua/5.2/mpack.lua'
            no file '/usr/share/lua/5.2/mpack/init.lua'
            no file '/usr/lib/lua/5.2/mpack.lua'
            no file '/usr/lib/lua/5.2/mpack/init.lua'
            no file './mpack.lua'
            no file '/usr/lib/lua/5.2/mpack.so'
            no file '/usr/lib/lua/5.2/loadall.so'
            no file './mpack.so'
    stack traceback:
            [C]: in function 'require'
            (command line):1: in main chunk
            [C]: in ?
    -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua
    /usr/bin/lua: (command line):1: module 'mpack' not found:
            no field package.preload['mpack']
            no file '/usr/share/lua/5.3/mpack.lua'
            no file '/usr/share/lua/5.3/mpack/init.lua'
            no file '/usr/lib/lua/5.3/mpack.lua'
            no file '/usr/lib/lua/5.3/mpack/init.lua'
            no file './mpack.lua'
            no file './mpack/init.lua'
            no file '/usr/lib/lua/5.3/mpack.so'
            no file '/usr/lib/lua/5.3/loadall.so'
            no file './mpack.so'
    stack traceback:
            [C]: in function 'require'
            (command line):1: in main chunk
            [C]: in ?
    -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim
    CMake Error at CMakeLists.txt:459 (message):
      A suitable Lua interpreter was not found.

While this makes it more verbose for the expected error case ("module
'mpack' not found"), the behavior before this patch hides too much.
This is the old output:

    -- Checking Lua interpreter /usr/bin/luajit
    -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua5.1
    -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua5.2
    -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim
    -- Checking Lua interpreter /usr/bin/lua
    -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim
    CMake Error at CMakeLists.txt:459 (message):
      A suitable Lua interpreter was not found.

This is for when the whole configuration runs (i.e. after `make
distclean`), afterwards only one Lua interpreter gets checked only.
2018-02-22 01:22:19 +01:00
UTkarsh Maheshwari
4a8f081971 vim-patch:8.0.0225: put in Visual block mode terminates early (#8040)
Problem:    When a block is visually selected and put is used on the end of
            the selection only one line is changed.
Solution:   Check for the end properly. (Christian Brabandt, neovim issue
            5781)
9957a10d0f
2018-02-21 21:56:47 +01:00
Björn Linse
471d6d4db5
Merge pull request #8039 from bfredl/deadscreen
remove dead code in screen.c for terminals without scroll regions
2018-02-21 20:33:33 +01:00
Björn Linse
464ac8fe2a screen: win_del_lines/win_ins_lines cleanup 2018-02-21 19:20:23 +01:00