Commit Graph

15260 Commits

Author SHA1 Message Date
Jan Edmund Lazo
9a9bb9186a
vim-patch:8.1.0716: get warning message when 'completefunc' returns nothing
Problem:    Get warning message when 'completefunc' returns nothing.
Solution:   Allow for returning v:none to suppress the warning message.
            (Yasuhiro Matsumoto, closes vim/vim#3789)
cee9bc2e3d
2020-01-17 23:09:32 -05:00
Jan Edmund Lazo
a7aa1fc87d
spell: spell_soundfold_sal() is dead code 2020-01-17 19:06:51 -05:00
Jan Edmund Lazo
1042338c00
clang/'Logic error': zero-init struct 2020-01-17 19:06:50 -05:00
Jan Edmund Lazo
d811fab0ad
vim-patch:8.2.0120: virtcol() does not check arguments to be valid
Problem:    virtcol() does not check arguments to be valid, which may lead to
            a crash.
Solution:   Check the column to be valid.  Do not decrement MAXCOL.
            (closes vim/vim#5480)
b3d33d8570
2020-01-17 19:06:50 -05:00
Jan Edmund Lazo
03da3697a4
vim-patch:8.2.0112: illegal memory access when using 'cindent'
Problem:    Illegal memory access when using 'cindent'.
Solution:   Check for NUL byte. (Dominique Pelle, closes vim/vim#5470)
02ad46394e
2020-01-17 19:06:50 -05:00
Björn Linse
fd89ad7bfb
Merge pull request #11390 from erw7/feature-conpty
win/Terminal: Change to use ConPTY, if available
2020-01-17 12:59:50 +01:00
erw7
1e4f290691 Remove termtype option 2020-01-17 11:36:28 +01:00
erw7
c86d5fa981 Change to replace stderr with conout 2020-01-17 11:36:28 +01:00
erw7
4e06594c53 Add missing include file 2020-01-17 11:36:28 +01:00
erw7
a5a3d7160d Change option name from termwintype to termtype 2020-01-17 11:36:28 +01:00
erw7
8f91d709b0 Rename from os_win_conpty.{c,h} to pty_conpty_win.{c,h} 2020-01-17 11:36:28 +01:00
erw7
2c8016c704 Add stdin, stdout replacement functions 2020-01-17 11:36:28 +01:00
erw7
60c7eabb2f Change enum to a name that follows naming convention 2020-01-17 11:36:28 +01:00
erw7
59ae38a919 Change to use TriState instead of bool
Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2020-01-17 11:36:28 +01:00
erw7
b25e42f798 Fix function prototype 2020-01-17 11:36:28 +01:00
erw7
b4ff583277 Minor changes in reviewer's point 2020-01-17 11:36:28 +01:00
erw7
7aff0340e1 Move ConPTY resize to os_win_conpty.c 2020-01-17 11:36:28 +01:00
erw7
ed37d1081c Change union name from pty_object to object
Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2020-01-17 11:36:28 +01:00
erw7
5355cee77d Change to use ConPTY, if available 2020-01-17 11:36:28 +01:00
Björn Linse
8fe0635e73
Merge pull request #11723 from bfredl/nocleareol
messages: echo "line1\r\nline2" should not clear line1
2020-01-16 20:35:27 +01:00
Björn Linse
b4a92aadd2 messages: echo "line1\r\nline2" should not clear line1 2020-01-16 19:35:45 +01:00
Björn Linse
6e78b21623
Merge pull request #11563 from bfredl/mark_madness
extmarks: mark sanity/madness
2020-01-16 15:31:05 +01:00
Björn Linse
ca1a00edd6 extmarks/bufhl: reimplement using new marktree data structure
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).

Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)

Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes  complexity for little gain.

Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.

fixes #11598
2020-01-16 12:36:10 +01:00
Daniel Hahler
8ba3354d74
api_set_error: include expression with "Failed to evaluate expression" (#11713) 2020-01-15 09:08:22 +01:00
Marvim the Paranoid Android
f86acd213b version.c: update [ci skip] #11689
vim-patch:8.0.1789: BufWinEnter does not work well for a terminal window
vim-patch:8.2.0105: Vim license not easy to find on github
vim-patch:8.2.0106: printf formats are not exactly right
vim-patch:8.2.0107: hgignore is out of sync from gitignore
2020-01-14 23:59:48 -08:00
Matthieu Coudron
53473b3b71 fillchars: fix display on closed fold
The rollback of the last written symbol was not thorough, hence
confusing the code later on and causing a buggy display.

To reproduce, use `set fillchars+=foldopen:▾,foldsep:│` and close a
fold. Foldcolumn should display a glitch.
2020-01-14 22:51:13 +01:00
Björn Linse
55677ddc46 Add new marktree data structure for storing marks
This is inspired by Atom's "marker index" data structure to efficiently
adjust marks to text insertions deletions, but uses a wide B-tree
(derived from kbtree) to keep the nesting level down.
2020-01-14 12:57:31 +01:00
Daniel Hahler
3d1531aee5
API: include invalid buffer/window/tabpage in error message (#11712) 2020-01-14 09:21:10 +01:00
Justin M. Keyes
9231684986
doc [ci skip] #11656 2020-01-12 23:41:55 -08:00
Matthew Malcomson
dfb676fe0d edit.c: Ensure undo sync when emulating <Esc>x #11706
After PR #8226 an unmapped META key in insert mode behaves like
ESC-<key> (:help i_META).

The behaviour does not fully match, since if <Esc>-<key> is pressed
manually then since it were pressed manually `gotchars` would be called
on the second <key> after insert-mode had already been left.

This would mean that `may_sync_undo` (called from `gotchars`) would
call `u_sync(FALSE)` on the second key (since we would be in normal
mode).

This overall means that <Meta-[something]> behaves differently with
respect to undo than <Esc>[something] when the [something] makes a
change.

As an example, under `nvim -u NONE`:
ihello<M-.>u

leaves the buffer empty, while
ihello<Esc>.u

leaves the buffer with one instance of `hello`.

- Fix by calling u_sync() manually in the new clause under
  `normalchar:` in `insert_handle_key`.
- Update test in tui_spec.lua that accidentally relied on the old behaviour.
2020-01-12 17:09:39 -08:00
Matthieu Coudron
05ea3c1997 defaults: set fillchars "foldsep" to box line #11702
"│" U+2502 BOX DRAWINGS LIGHT VERTICAL

Fallback to old default | if 'ambiwidth' is set.
2020-01-11 16:36:11 -08:00
Jan Edmund Lazo
1cbe8d6d78 vim-patch:8.0.1593: :qall never exits active :terminal #11704
Problem:    :qall never exits with an active terminal window.
Solution:   Add a way to kill a job in a terminal window.
25cdd9c33b
2020-01-11 16:31:05 -08:00
Jan Edmund Lazo
462ee281b7 vim-patch:8.0.1769: refactor save/restore of viewstate #11701
Problem:    Repeated saving and restoring viewstate for 'incsearch'.
Solution:   Use a structure.
9b25af3620
2020-01-11 13:21:21 -08:00
Jan Edmund Lazo
a4d21f0592 vim-patch.sh: fix for bash 4.3 or older #11700 2020-01-11 12:09:54 -08:00
butwerenotthereyet
29b1a4761a tabpage: disallow go-to-previous in cmdline-win #11692
After cbc8d72fde when editing
the command in the command editing window (q:, q/, q?) it was possible
to switch to the previous tab.  Doing so put Nvim in a bad state.
Moreover, switching tabs via the other available mechanisms (gt, gT,
<C-W>gt, <C-W>gT) is not possible when in the command editing window.

Here, the behavior is prevented.  It is no longer possible to switch to
the previous tab when editing the command in the command editing window.
The solution is to share code between gt, gT, and g<Tab>.  Specifically,
goto_tabpage_lastused now calls through goto_tabpage rather than
directly calling goto_tabpage_tp.  Doing so works well because all the
validation enjoyed by gt and gT is present in goto_tabpage.
2020-01-09 07:31:16 -08:00
Justin M. Keyes
25afa10f92
Merge #11669 'LSP: differentiate diagnostic underline by severity' 2020-01-08 22:48:57 -08:00
Justin M. Keyes
0a1c6d9a37 LSP: highlight groups test, doc 2020-01-08 22:18:18 -08:00
Justin M. Keyes
b6276f5aee
Merge #11691 from janlazo/vim-8.2.0099 2020-01-08 22:13:46 -08:00
Justin M. Keyes
8c8681d594 test: hoist buf_lines() 2020-01-08 09:41:41 -08:00
Justin M. Keyes
844cd9cef1 test: just say no to hyper-granularity
- Move plugin/lsp/* to plugin/*
- Merge lsp/util_spec.lua into lsp_spec.lua
2020-01-08 09:30:59 -08:00
Alvaro Muñoz
e616ec4394 LSP: differentiate diagnostic underline by severity 2020-01-08 08:50:02 -08:00
kevinhwang91
831fa45ad8 API: nvim_get_hl_by_id: omit hl instead of returning -1 #11685
Problem: When Normal highlight group defines ctermfg/bg, but other
         highlight group lacks ctermfg/bg, nvim_get_hl_by_id(hl_id,
         v:false) returns -1 for the missing ctermfg/bg instead of just
         omitting it.
Solution: checking for -1 in hlattrs2dict()

fix #11680
2020-01-08 06:19:23 -08:00
Marvim the Paranoid Android
a91ea02830 version.c: update [ci skip] #11636
vim-patch:8.0.0902: cannot specify directory or environment for a job
vim-patch:8.0.1127: Test_peek_and_get_char fails on 32 bit system
vim-patch:8.1.0661: clipboard regexp might be used recursively
vim-patch:8.1.0834: GUI may wait too long before dealing with messages
vim-patch:8.2.0040: timers test is still flaky on Travis for Mac
vim-patch:8.2.0053: windowsversion() does not always return the right value
vim-patch:8.2.0055: cannot use ":gui" in vimrc with VIMDLL enabled
vim-patch:8.2.0057: cannot build with small features
vim-patch:8.2.0059: compiler warnings for unused variables in small build
vim-patch:8.2.0060: message test only runs with one encoding
vim-patch:8.2.0065: Amiga and alikes: autoopen only used on Amiga OS4
vim-patch:8.2.0080: globals using INIT4() are not in the tags file
vim-patch:8.2.0081: MS-Windows also need the change to support INIT4()
vim-patch:8.2.0086: build error for small version
vim-patch:8.2.0094: MS-Windows: cannot build with Strawberry Perl 5.30
vim-patch:8.2.0100: macros for Ruby are too complicated
2020-01-07 22:38:10 -08:00
Jan Edmund Lazo
45759e44f9
Remove (void) hacks, Mark unused attrs 2020-01-08 01:08:55 -05:00
Jan Edmund Lazo
3d6cca5a9d
vim-patch:8.2.0099: use of NULL pointer when out of memory
Problem:    Use of NULL pointer when out of memory.
Solution:   Check for NULL pointer. (Dominique Pelle, closes vim/vim#5449)
8b7aa2f9b2
2020-01-07 23:24:38 -05:00
Daniel Hahler
e8d61005dc
third-party: upgrade libvterm to v0.1.3 (#11678) 2020-01-07 20:12:56 +01:00
Ville Hakulinen
013436c997 ui_grid_resize: fix resize logic for floating window #11655 2020-01-06 22:03:15 -08:00
Rob Pilling
4a7d84ae60 man.vim: workaround for 'cscopetag' #11679
The old `:Man` implementation would take either the word under
the cursor, or the argument passed in, and load that as a man page.

Since we now use 'tagfunc' and look for all relevant man-pages, if
your system has several (i.e. same name, different sections), we return
several, giving the user an option.

This works for most tag commands except `:tjump`, which will
fail if there's multiple tags to choose from. This just happens to
be what the cscope code uses (it actually attempts to prompt the
user, but this fails).
2020-01-06 21:57:36 -08:00
Justin M. Keyes
83b0054b87
Merge #11674 'vim-patch:8.0.1786,8.1.{851,1308,1309,1579}' 2020-01-06 06:52:52 -08:00
Jan Edmund Lazo
83083dd47b
vim-patch:8.1.1309: test for Normal highlight fails on MS-Windows GUI
Problem:    Test for Normal highlight fails on MS-Windows GUI.
Solution:   Skip the test for MS-Windows GUI.
6b528fa062
2020-01-06 00:18:02 -05:00