Commit Graph

12594 Commits

Author SHA1 Message Date
Justin M. Keyes
ece19b459c
Merge #9626 from janlazo/vim-8.1.0926 2019-02-18 10:40:33 +01:00
Justin M. Keyes
9cf600e702
Merge #9625 from janlazo/vim-8.1.0945 2019-02-18 10:37:56 +01:00
Jan Edmund Lazo
d595ca021d vim-patch:8.1.0276: no test for 'incsearch' highlighting with :s
Problem:    No test for 'incsearch' highlighting with :s.
Solution:   Add a screendump test.
164251ff80
2019-02-17 21:59:49 -05:00
Jan Edmund Lazo
a4a024245b vim-patch:8.1.0387: no test for 'ambiwidth' detection
Problem:    No test for 'ambiwidth' detection.
Solution:   Add a test.
24839edc54
2019-02-17 21:47:12 -05:00
Jan Edmund Lazo
0735893caf vim-patch:8.1.0668: no test for overstrike mode in the command line
Problem:    No test for overstrike mode in the command line.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3742)
c0676bab92
2019-02-17 20:10:36 -05:00
Jan Edmund Lazo
486234ab3d vim-patch:8.1.0937: invalid memory access in search pattern
Problem:    Invalid memory access in search pattern. (Kuang-che Wu)
Solution:   Check for incomplete collation element. (Dominique Pelle,
            closes vim/vim#3985)
f1b57ab2ab
2019-02-17 19:37:44 -05:00
Jan Edmund Lazo
279ecaff00 vim-patch:8.1.0934: invalid memory access in search pattern
Problem:    Invalid memory access in search pattern. (Kuang-che Wu)
Solution:   Check for incomplete equivalence class. (closes vim/vim#3970)
985079c514
2019-02-17 19:35:41 -05:00
Jan Edmund Lazo
67c99ec620 vim-patch:8.1.0926: no test for :wnext, :wNext and :wprevious
Problem:    No test for :wnext, :wNext and :wprevious.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3963)
e93e5a504f
2019-02-17 19:31:57 -05:00
Jan Edmund Lazo
d8b4fb7838 lint 2019-02-17 19:14:40 -05:00
Jan Edmund Lazo
55821948cf vim-patch:8.1.0945: internal error when using pattern with NL in the range
Problem:    Internal error when using pattern with NL in the range.
Solution:   Use an actual newline for the range. (closes vim/vim#3989)  Also fix
            error message.  (Dominique Pelle)
a5483448cb
2019-02-17 19:11:16 -05:00
Daniel Hahler
6b827bb664 build: checkprefix: skip if empty #9624
This regressed in 3b473bb14f:
```
% make 'CMAKE_BUILD_TYPE=RelWithDebInfo' 'CMAKE_EXTRA_FLAGS=-DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master -DENABLE_JEMALLOC=OFF' 'DEPS_CMAKE_FLAGS=-DUSE_BUNDLED=OFF'

error: CMAKE_INSTALL_PREFIX '/vim-build/neovim/neovim/master' does not match cached value ''
       Run this command, then try again:
         cmake build -DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master
make: *** [Makefile:169: checkprefix] Error 1
```

It was checking before for non-empty also [1].

1: https://github.com/neovim/neovim/pull/9621/files#diff-b67911656ef5d18c4ae36cb6741b7965L22
2019-02-17 21:41:42 +01:00
Justin M. Keyes
33ce70c883
vim-patch:8.1.0932: remove Farsi support (#9622)
Problem:    Farsi support is outdated and unused.
Solution:   Delete the Farsi support.
14184a3133
2019-02-17 10:54:00 +01:00
Justin M. Keyes
dc9dd8d664
Merge #9593 'API: nvim_create_buf: "scratch" param' 2019-02-17 08:32:25 +01:00
Justin M. Keyes
5225c1ec30
terminal: Fix potential invalid local 'scrollback' (#9605)
TermOpen autocmd may set local 'scrollback' to -1, this needs to be
adjusted as in on_scrollback_option_changed().

fixes #9588 (OOM, out of memory)
2019-02-17 08:07:30 +01:00
Justin M. Keyes
aee29e51a6 API: nvim_create_buf: add scratch parameter
Creating a scratch buffer is a chore/ritual, and would be more
useful/common if formally exposed.
2019-02-17 06:58:03 +01:00
Justin M. Keyes
3b473bb14f
build/Makefile: validate prefix for specific targets (#9621)
`clean` and `distclean` should not check CMAKE_INSTALL_PREFIX.
ref #9615

Helped-by: bruce-hill
2019-02-17 05:28:32 +01:00
Marco Hinz
023e832d40 vim-patch:8.1.0803: session restore: handle single quotes #9620
Problem:    Session file has problem with single quote in file name. (Jon
            Crowe)
Solution:   Use a double quoted string.  Add a test.

ad36a3588d

Fixes https://github.com/neovim/neovim/issues/9618
2019-02-17 05:00:14 +01:00
Justin M. Keyes
9bfd304459
Merge #9617 2019-02-16 03:35:04 +01:00
Justin M. Keyes
05c6c6ae08 build/Makefile: check CMAKE_INSTALL_PREFIX
closes #9615
2019-02-16 00:49:53 +01:00
Justin M. Keyes
4397bf5785 build/CMakeLists.txt: group related logic
- Group CMAKE_BUILD_TYPE-related logic together.
- Print the MIN_LOG_LEVEL message (in the build-log) next to the
  CMAKE_BUILD_TYPE message.
2019-02-16 00:38:20 +01:00
Justin M. Keyes
4031e93c45
Merge #9614 2019-02-16 00:37:35 +01:00
Justin M. Keyes
3d3a54f455 clang/"null pointer dereference": win_rotate 2019-02-14 05:54:42 +01:00
Justin M. Keyes
b7f518cbfa PVS/V1028: cast operands, not the result 2019-02-14 05:49:35 +01:00
Jan Edmund Lazo
969cc55993 vim-patch:8.1.0852: findfile() and finddir() are not properly tested (#9609)
Problem:    findfile() and finddir() are not properly tested.
Solution:   Extend the test and add more. (Dominique Pelle, closes vim/vim#3880)
ed71ed37bc
2019-02-13 08:30:30 +01:00
Justin M. Keyes
73dffc5053
Merge #9589 from justinmk/cterm-pumblend
UI: 'pumblend' for cterm (256-color TUI)
2019-02-12 20:22:28 +01:00
Justin M. Keyes
e50d0b6fc1 UI: change implementation of hl_rgb2cterm_color()
Replace the implementation cargo-culted from Vim's source with something
simpler which "seems to look better" with 'pumblend'.
2019-02-12 10:11:30 +01:00
Justin M. Keyes
c5173230f0 UI: 'pumblend' for cterm (256-color TUI)
hl_rgb2cterm_color, hl_cterm2rgb_color were adapted from Vim 8.1
(color2index, cterm_color2rgb).
ref: c5cd88554f
2019-02-12 09:26:06 +01:00
Justin M. Keyes
9b4383261a
Merge #9601 from justinmk/tui-italic 2019-02-12 08:51:10 +01:00
Justin M. Keyes
1083c626b9 TUI: assume italics support in all xterm-likes
https://github.com/neovim/neovim/issues/9598#issuecomment-462421302
> On systems other than macOS, terminfo always has them set. It's part
> of the ANSI standard SGR codes
2019-02-12 08:09:21 +01:00
Björn Linse
5e44a5945a
Merge pull request #9603 from bfredl/reversepum
highlight: handle blending with gui=reverse and guisp attribute
2019-02-11 21:22:02 +01:00
Björn Linse
af51ae944e highlight: handle blending with gui=reverse and guisp attributes 2019-02-11 19:38:02 +01:00
Justin M. Keyes
1b746c0ea9 TUI: sniff nsterm (Terminal.app) from $TERM_PROGRAM 2019-02-11 11:02:48 +01:00
Justin M. Keyes
ee21fe3d2a TUI: force italics in tmux
tmux users are encouraged to use "tmux-256color" instead of the old
"screen-256color". Put this in your .tmux.conf :

    if-shell 'infocmp tmux-256color' 'set -g default-terminal "tmux-256color"' 'set -g default-terminal "screen-256color"'

If default-terminal is "tmux-256color" AND tmux finds its terminfo, THEN
it will enable italics (regardless of whether the terminfo contains
sitm/ritm).

OTHERWISE tmux "emulates screen", which means it emits italics as
"reverse". That's unfortunate, but it's an acceptable compromise that
allows Nvim to support italics in tmux by default in compatible (and
increasingly-common) configurations.

Test case:

    tmux
    nvim -u NORC +'hi Comment cterm=italic' CMakeLists.txt

ref #9598
2019-02-11 10:52:30 +01:00
Justin M. Keyes
2beb731ed4 TUI: italics in Terminal.app (nsterm)
This is the conservative approach, requiring TERM=nsterm as recommended
at `:help $TERM`.  It won't work with Terminal.app's default of
TERM=xterm-256color, nor in tmux.

Test case:

    TERM=nsterm nvim -u NORC +'hi Comment cterm=italic' CMakeLists.txt

closes #9598
2019-02-11 10:51:52 +01:00
Björn Linse
b3ce0019a7
Merge pull request #7466 from bfredl/ext_messages
ui: implement ext_messages to externalize all messages in msg area
2019-02-10 14:55:12 +01:00
Björn Linse
51fc54325c ui: implement ext_messages
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
2019-02-10 13:36:46 +01:00
Björn Linse
3ff1228f78
Merge pull request #9272 from bfredl/createbuf
api: add nvim_create_buf to create a new empty buffer.
2019-02-09 15:01:06 +01:00
Marco Hinz
c9d01ff7db
doc: 'fillchars' is local to window
This was forgotten in 352811fe5 since the commit was originally meant to only
change 'listchars'.
2019-02-09 12:21:24 +01:00
Björn Linse
891ed14f13 api: add nvim_create_buf to create a new empty buffer.
Loading existing files into a buffer is non-trivial and requires a window.
Creating an unnamed emtpy buffer is trivial and safe though, thus worth a
special case.

Change nvim_buf_set_option to use aucmd_prepbuf. This is necessary
to allow some options to be set on a not yet displayed buffer, such
as 'buftype' option.

vim-patch:7.4.1858: Add BLN_NEW to enforce buflist_new creating new buffer
2019-02-09 11:48:45 +01:00
Björn Linse
f6faeea41c
Merge pull request #9586 from bfredl/screencleanup
screen: cleanup allocation and scrolling
2019-02-07 21:41:45 +01:00
Björn Linse
be8058cfe4 screen: cleanup allocation, clearing and validation
grid_xx functions shouldn't randomly be called when the screen is not valid.
Nvim deterministically initializes a default screen early in main(), so the
default grid can be assumed to be allocated.
2019-02-07 17:56:02 +01:00
Björn Linse
6e9ea5adce screen: simplify scrolling code
Since the separation between internal screen and TUI, internal scroll
cannot FAIL. Delete the conditions for this.
2019-02-07 17:56:02 +01:00
Björn Linse
fa2580f953
Merge pull request #9571 from bfredl/pum_transparent
UI: implement 'pumblend' option for semi-transparent popupmenu
2019-02-07 17:52:58 +01:00
Björn Linse
37f8df8824 UI: implement 'pumblend' option for semi-transparent popupmenu
Why?

- Because we can.
- Because the TUI is just another GUI™
- Because it looks kinda nice, and provides useful context like 1 out of 100
  times

Complies with "don't pay for what you don't use".

Some crashes for resizing were unfolded, add tests for those.
2019-02-07 16:43:51 +01:00
Justin M. Keyes
ed0e96cd28 man.vim: set 'linebreak'
closes #9583
2019-02-06 22:18:34 +01:00
Björn Linse
c9b7f0c249
Merge pull request #9581 from bfredl/alwaysrgb
UI: always use contrete colors for default_colors_set
2019-02-05 20:59:07 +01:00
Björn Linse
baf93d9606 UI: always use contrete colors for default_colors_set
But add an escape hatch needed for external TUI, so it still can use
terminal emulator defaults.
2019-02-05 19:41:38 +01:00
Justin M. Keyes
36378c33c6
Merge #9560 from justinmk/Wmissing-prototypes 2019-02-04 19:40:14 +01:00
Justin M. Keyes
45f25f7e0b build: PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES
On Travis CI, -Wmissing-prototypes gives strange error:

    In file included from ../src/nvim/eval.c:5965:
    /home/travis/build/neovim/neovim/build/src/nvim/auto/funcs.generated.h.gperf:215:1: error: conflicting types for 'find_internal_func_gperf'
    find_internal_func_gperf (register const char *str, register unsigned int len)
    ^
    ../src/nvim/eval.c:5962:20: note: previous declaration is here
    const VimLFuncDef *find_internal_func_gperf(register const char *str,
                   ^
2019-02-04 13:16:59 +01:00
Justin M. Keyes
f2c6164b04 build: -Wmissing-prototypes
ref #343

Though I don't see a strong benefit, it isn't too much of a burden, and
maybe avoids confusion in some cases.
2019-02-04 04:00:20 +01:00