Commit Graph

9293 Commits

Author SHA1 Message Date
Jan Edmund Lazo
2ed7cda8cd
spell: assert nonull pointers 2019-09-10 22:19:49 -04:00
Jan Edmund Lazo
b8a338ee6a
cursor_shape: check if modep is nonnull 2019-09-10 22:19:49 -04:00
Jan Edmund Lazo
f81619aafe
regexp: assert nonnull pointer for regnext() 2019-09-10 21:54:05 -04:00
Jan Edmund Lazo
4a6ab3494a
quickfix: fix pvs/v547 warning 2019-09-10 21:54:04 -04:00
Björn Linse
e11dd1110f terminal: fix rgb rendering of palette colors
simplify handling of default colors

nvim is always true color internally, remove ui_rgb_attached() check.

Fix "runtime termguicolors" test. The test actually reflected broken behavior
in (parent) nvim: nvim_ui_set_option("rgb", true) was not respected by existing
:terminal instances, so all 16-palette colors became dark blue.
2019-09-10 20:12:01 +02:00
Daniel Hahler
0bb466f0fc lint / test grouping 2019-09-10 20:09:38 +02:00
Paul "LeoNerd" Evans
d57250ae64 Changes for new VTermColor struct 2019-09-10 20:09:38 +02:00
Jan Edmund Lazo
477113d1ae vim-patch:8.0.1309: cannot use 'balloonexpr' in a terminal #10983
(Port some refactoring, but ignore "balloon" changes.)

Problem:    Cannot use 'balloonexpr' in a terminal.
Solution:   Add 'balloonevalterm' and add code to handle mouse movements in a
            terminal. Initial implementation for Unix with GUI.
51b0f3701e
2019-09-09 21:23:44 -07:00
Jan Edmund Lazo
a84366439f
vim-patch:8.0.0941: existing color schemes don't like StatusLineTerm
Problem:    Existing color schemes don't work well with StatusLineTerm.
Solution:   Don't use "reverse", use fg and bg colors.  Also add
            StatusLineTermNC.
05fbfdcda4
2019-09-09 20:33:18 -04:00
Jan Edmund Lazo
66e7a6c9fd
vim-patch:8.0.0937: user highlight groups not adjusted for terminal
Problem:    User highlight groups are not adjusted for StatusLineTerm.
Solution:   Combine attributes like for StatusLineNC.
bce4f62d30
2019-09-09 20:28:01 -04:00
Justin M. Keyes
0809533b88
Merge #10546 'doc' 2019-09-09 14:42:20 -07:00
Justin M. Keyes
853683e72a
provider: has("python3_dynamic") et al. #10980
Vim added more flags for testing yet more dimensions of its Python
situation.  Handle those in eval_has_provider().

vim-patch:8.0.1436: not enough information about what Python version may work
Problem:    Not enough information about what Python version may work.
Solution:   Add "python_compiled", "python3_compiled", "python_dynamic" and
            "python3_dynamic" values for has().

ref: https://github.com/neovim/neovim/pull/10942#issuecomment-529479500
2019-09-09 10:54:07 -07:00
Björn Linse
e5d5fc0857 doc/API/lua: detaching Lua buffer callbacks 2019-09-09 10:52:12 -07:00
Justin M. Keyes
456f1d4bdd doc: |api-fast| [ci skip] 2019-09-09 10:52:12 -07:00
Marvim the Paranoid Android
225941ddd0 version.c: update [ci skip] #10961
vim-patch:8.1.1680: the command table is not well aligned
vim-patch:8.1.1994: MS-Windows: cannot build with eval but without cscope
vim-patch:8.1.2002: version number 2000 missing
vim-patch:8.1.2003: MS-Windows: code page 65001 is not recognized
vim-patch:8.1.2006: build failure with huge features but without channel feature
vim-patch:8.1.2015: terminal altscreen test still fails sometimes
vim-patch:8.1.2016: terminal altscreen test now fails on MS-Windows

`beval` patches are N/A now. See https://github.com/neovim/neovim/pull/10942#issuecomment-528029830
vim-patch:8.0.1366: 1ad022a9b8
vim-patch:8.1.0444: unnecessary check for NULL pointer
vim-patch:8.1.0652: freeing memory for balloon eval too early
vim-patch:8.1.1302: v:beval_text is not tested in Visual mode
vim-patch:8.1.1648: MS-Windows: build error with normal feaures
vim-patch:8.1.1650: warning for using uninitialized variable
vim-patch:8.1.1654: GUI: screen updates from 'balloonexpr' are not displayed
vim-patch:8.1.1708: Coverity warns for using uninitialized variable
2019-09-09 10:03:59 -07:00
Justin M. Keyes
81c3fa6c9d doc 2019-09-09 09:53:19 -07:00
Justin M. Keyes
05c668f684
paste: fix normal-mode paste by different approach #10976
Forcing insert-mode after the first paste-chunk seems to work, as an
alternative to a9e2bae0eb (insert-before-cursor).

NB: Dot-repeat needs to match the original action.  Since a9e2bae0eb
changed paste to insert-before-cursor, dot-repeat must also. But that
makes dot-repeat unpleasant/unusual.
2019-09-09 08:29:49 -07:00
Jan Edmund Lazo
8dde9b58e5
vim-patch:8.1.1197: when starting with multiple tabs file messages is confusing
Problem:    When starting with multiple tabs file messages is confusing.
Solution:   Set 'shortmess' when loading the other tabs. (Christian Brabandt)
c75e812623
2019-09-08 23:16:54 -04:00
Justin M. Keyes
a9e2bae0eb paste: insert before cursor always
Inserting "after" the cursor in Normal-mode, for big paste-streams, is
not reliable: sometimes the text "after" the cursor ends up in the
middle of the pasted text.  Maybe the cursor position is not updated?

To avoid weird behavior, always paste "before".  Maybe nvim_put() or
vim.paste() can be fixed more properly later.
2019-09-08 16:42:11 -07:00
Justin M. Keyes
acd2729573 paste: do not clobber msg area for small pastes 2019-09-08 15:37:32 -07:00
Justin M. Keyes
0dea44f93c paste/cmdline: discard all chunks after first line
Problem:  If multiple paste "chunks" are streamed, chunks after the
          first line are pasted into the buffer.
Solution: Check for cmdline-mode for all chunks in a paste-stream.
2019-09-08 15:37:32 -07:00
Justin M. Keyes
ccd947ca4a
vim-patch:8.0.0970: passing invalid highlight id #10972
(We don't implement StatusLineTerm{NC}, but this patch seems generally relevant.)

Problem:    if there is no StatusLine highlighting and there is StatusLineNC
            or StatusLineTermNC highlighting then an invalid highlight id is
            passed to combine_stl_hlt(). (Coverity)
Solution:   Check id_S to be -1 instead of zero.
d6a7b3e6bb
2019-09-08 15:10:18 -07:00
Justin M. Keyes
d91f4cd7d0
paste: reset 'paste' option immediately #10974
- Workaround #10966: 'paste' option is not always reset.
- In any case there's not much reason to wait until phase=3, because
  pasting in cmdline-mode skips lines after the first line (thus the
  `:set paste .. :set nopaste` dance happens only ~once).
2019-09-08 14:58:47 -07:00
Björn Linse
77a93957d3
Merge pull request #10777 from glacambre/fix_10042
ex_getln.c: fix <S-Tab> not triggering Pmenu when wildoptions=pum
2019-09-08 22:42:24 +02:00
Jan Edmund Lazo
554566ccea vim-patch:8.1.2007: no test for what 8.1.1926 fixes #10970
Problem:    No test for what 8.1.1926 fixes.
Solution:   Add a test case.
fca068b977
2019-09-08 12:22:55 -07:00
glacambre
958ca938b4 ex_getln.c: fix <S-Tab> not triggering pum when wildoptions=pum (#10042)
Some of the logic that was present for <Tab> was missing from <S-Tab>.

Closes https://github.com/neovim/neovim/issues/10042.
2019-09-08 20:47:22 +02:00
Björn Linse
288526ae73
Merge pull request #10475 from erw7/fix-ext-popupmenu
Fix some keys not working in ext_popupmenu
2019-09-08 20:42:32 +02:00
Björn Linse
19993bca4a rpc: allow handling of nvim_ui_try_resize at the pager
This makes external UI behave consistenly with TUI w.r.t resizes.
Which will be needed anyway as TUI will use the external UI protocol
soon.
2019-09-08 15:24:14 +02:00
Björn Linse
bf9ff5148a messages: redraw after resize in pager
note: does not "return" space at the bottom to the caller
2019-09-08 15:24:14 +02:00
Björn Linse
f72c7b0b3a messages: batch draw :map 2019-09-08 15:24:14 +02:00
Björn Linse
e6b7613e89 refactor: allow us to process a child queue only while waiting on input 2019-09-08 15:24:14 +02:00
erw7
55b1126a22 Add nvim_ui_pum_set_height to api 2019-09-08 12:25:49 +09:00
Justin M. Keyes
3dbd94dafa
Merge #10963 from janlazo/vim-8.1.1988
vim-patch:8.0.1550,8.1.{1716,1988}
2019-09-07 19:28:15 -07:00
Abdelhakeem Osama
6692c0958f shada: initialize jumplist before search pattern (#10964)
Since 8b8ecf4, the shada module loads files in the jumplist to properly
clear duplicates. This can trigger some autocommands, which in turn
saves and restores search and substitute patterns, freeing the previous
strings in "spats" which are held in "wms" as well (heap-use-after-free).
To avoid this, initialize the jumplist in "wms" before search patterns.
2019-09-07 18:02:29 -07:00
Jan Edmund Lazo
15459f9255
vim-patch:8.1.1716: old style comments are wasting space
Problem:    Old style comments are wasting space
Solution:   Use new style comments in option header file.
ab0a789808
2019-09-07 13:09:15 -04:00
Jan Edmund Lazo
4add2f4f89
vim-patch:8.0.1550: various small problems in source files
Problem:    Various small problems in source files.
Solution:   Fix the problems.
792f0e3659
2019-09-07 10:35:09 -04:00
Jan Edmund Lazo
a96b3677c6
vim-patch:8.1.1988: :startinsert! does not work the same way as "A"
Problem:    :startinsert! does not work the same way as "A".
Solution:   Use the same code to move the cursor. (closes vim/vim#4896)
8d3b51084a
2019-09-06 23:27:14 -04:00
Marvim the Paranoid Android
1f119d4153 version.c: update [ci skip] #10942
vim-patch:8.0.0396: 'balloonexpr' only works synchronously
vim-patch:8.0.0932: terminal may not use right characters for BS and Enter
vim-patch-8.0.0934: change to struts.h missing in patch
vim-patch:8.0.0956: scrolling in a terminal window has flicker
vim-patch:8.0.0976: cannot send lines to a terminal job
vim-patch:8.0.1002: unnecessarily updating screen after timer callback
vim-patch:8.0.1096: terminal window in Normal mode has wrong background
vim-patch:8.0.1097: background color wrong if job changes background color
vim-patch:8.0.1102: terminal window does not use Normal colors
vim-patch:8.0.1293: setting a breakpoint in the terminal debugger sometimes fails
vim-patch:8.0.1309: cannot use 'balloonexpr' in a terminal
vim-patch:8.0.1312: balloon_show() only works in terminal when compiled with GUI
vim-patch:8.0.1318: terminal balloon only shows one line
vim-patch:8.0.1320: popup test fails on GUI-only build
vim-patch:8.0.1321: can't build huge version with Athena
# VIM_SERVERNAME is NA because we will have NVIM env var:
vim-patch:8.0.1330: MS-Windows: job in terminal can't get back to Vim
vim-patch:8.0.1346: crash when passing 50 char string to balloon_split()
vim-patch:8.0.1810: buffer of a terminal only updated in Terminal-Normal mode
vim-patch:8.0.1815: crash with terminal window and with 'lazyredraw' set
vim-patch:8.0.1842: popup menu inside terminal window isn't cleared

vim-patch:8.1.1973: cannot build without the quickfix feature
vim-patch:8.1.1974: Coverity warns for using pointer as array
vim-patch:8.1.1975: MS-Windows GUI responds slowly to timer
vim-patch:8.1.1976: Travis log always shows test output
vim-patch:8.1.1990: cannot build with eval but without cscope
vim-patch:8.1.1991: still cannot build with eval but without cscope
2019-09-06 14:42:31 -07:00
Daniel Hahler
8db62ac57d
build: cmake: GetCompileFlags: include CMAKE_C_FLAGS (#10957)
Calls `GetCompileFlags` from `src/nvim` directory, to include
`--coverage` (and any others).
2019-09-06 20:36:05 +02:00
Björn Linse
fd4636f1b9
Merge pull request #10930 from bfredl/pagerthrottle
fixes for pager glitches and crashes
2019-09-06 20:28:26 +02:00
Björn Linse
5c8a57da81 messages: fix crashes with scrollback 2019-09-06 19:38:07 +02:00
Björn Linse
72d7099abd messages: fix missing MsgArea highlighting on/after "-- more --" message 2019-09-06 19:38:07 +02:00
Björn Linse
d04a43fcaf messages: fix cut lines in scrollback upon overflow 2019-09-06 19:12:41 +02:00
Daniel Hahler
1dab52f878 vim-patch:8.0.1332: enhance quickfix highlighting #10259
Problem:    Highlighting in quickfix window could be better. (Axel Bender)
Solution:   Use the qfSeparator highlight item. (Yegappan Lakshmanan)
93a32e2ec4

This adds `syn_name2attr` already (from previous patch 8.0.1123,
vim/vim@1b9645de3).
2019-09-06 09:17:24 -07:00
Daniel Hahler
64caeb13e6 stdpaths_get_xdg_var: consider empty env vars #10953
Without this "sysinit uses VIM if XDG_CONFIG_DIRS unset" fails with an
existing `/etc/xdg/nvim/sysinit.vim` file, because `XDG_CONFIG_DIRS=` is
not considered, but the default ("/etc/xdg") used then.
2019-09-06 09:05:30 -07:00
Daniel Hahler
fecbafb29e build: fail with CLANG_TSAN + USE_GCOV #10958
This is better than skipping it silently.
2019-09-06 08:41:04 -07:00
Björn Linse
1a783b5ad6 screen: redrawdebug=nothrottle 2019-09-06 09:48:57 +02:00
Justin M. Keyes
8b06231612 Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}' 2019-09-05 14:10:32 -07:00
Justin M. Keyes
81eb0d3644
vim-patch:8.1.0561: MSCV error format has changed #10952
This was marked as NA, but maybe we want the Windows-specific
default 'errorformat'?

9719568533
2019-09-05 10:20:46 -07:00
Björn Linse
79ea47d478
Merge pull request #10451 from bfredl/floatbuf
anchor float to buffer position
2019-09-05 12:50:38 +02:00