Commit Graph

14677 Commits

Author SHA1 Message Date
Shane Smith
a4d48d37c1 vim-patch:8.1.1256: cannot navigate through errors relative to the cursor
Problem:    Cannot navigate through errors relative to the cursor.
Solution:   Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
            closes vim/vim#4316)
3ff33114d7
2019-10-27 23:43:47 -04:00
Shane Smith
cf7c34dea1 vim-patch:8.1.1112: duplicate code in quickfix file
Problem:    Duplicate code in quickfix file.
Solution:   Move code into functions. (Yegappan Lakshmanan, closes vim/vim#4207)
87f59b09ea
2019-10-27 23:24:54 -04:00
Shane Smith
c222f3e006 vim-patch:8.1.1098: quickfix code duplication
Problem:    Quickfix code duplication.
Solution:   Refactor the qf_init_ext() function. (Yegappan Lakshmanan,
            closes vim/vim#4193)
95946f1209
2019-10-27 23:15:28 -04:00
Shane Smith
e55eac92c6 vim-patch:8.1.1062: quickfix code is repeated
Problem:    Quickfix code is repeated.
Solution:   Define FOR_ALL_QFL_ITEMS(). Move some code to separate functions.
            (Yegappan Lakshmanan, closes vim/vim#4166)
a16123a666
2019-10-27 22:42:29 -04:00
Shane Smith
d10d7aed79 vim-patch:8.1.1030: quickfix function arguments are inconsistent
Problem:    Quickfix function arguments are inconsistent.
Solution:   Pass a list pointer instead of info and index. (Yegappan
            Lakshmanan, closes vim/vim#4135)
0398e00a1b
2019-10-27 16:25:59 -04:00
Shane Smith
7714c9e210 vim-patch:8.1.1006: repeated code in quickfix support
Problem:    Repeated code in quickfix support.
Solution:   Move code to functions. (Yegappan Lakshmanan, closes vim/vim#4091)
4aa47b28f4
2019-10-27 16:19:17 -04:00
Shane Smith
0f93528d1f vim-patch:8.1.0532: cannot distinguish between quickfix and location list
Problem:    Cannot distinguish between quickfix and location list.
Solution:   Add an explicit type variable. (Yegappan Lakshmanan)
2d67d307ee
2019-10-27 16:19:17 -04:00
Shane Smith
8d10241a62 vim-patch:8.1.0488: using freed memory in quickfix code
Problem:    Using freed memory in quickfix code. (Dominique Pelle)
Solution:   Add the quickfix_busy() flag to postpone deleting quickfix lists
            until it is safe. (Yegappan Lakshmanan, closes #3538)
9f84ded38b
2019-10-27 16:17:35 -04:00
Shane Smith
f0dc110f31 vim-patch:8.1.0469: too often indexing in qf_lists[]
Problem:    Too often indexing in qf_lists[].
Solution:   Use a qf_list_T pointer. (Yegappan Lakshmanan)
108e7b422b
2019-10-27 15:33:30 -04:00
Shane Smith
b041096ed4 vim-patch:8.1.0407: quickfix code mixes using the stack and a list pointer
Problem:    Quickfix code mixes using the stack and a list pointer.
Solution:   Use a list pointer in more places. (Yegappan Lakshmanan,
            closes vim/vim#3443)
fe15b7dfa6
2019-10-27 15:33:30 -04:00
Shane Smith
a123050c1a vim-patch:8.1.0252: quickfix functions are too long
Problem:    Quickfix functions are too long.
Solution:   Refactor. (Yegappan Lakshmanan, closes vim/vim#2950)
de3b3677f7
2019-10-27 15:33:29 -04:00
Justin M. Keyes
479c014122
Merge #11298 from janlazo/vim-8.1.2220
vim-patch:8.1.2220
2019-10-26 19:19:03 -07:00
Jan Edmund Lazo
0cf694e83e
ci: do not skip before_install on lint job 2019-10-26 21:19:02 -04:00
Jan Edmund Lazo
3bee2f1604
ci: use python3 for flake8
'make pylint' fails if flake8 runs on python2.
2019-10-26 20:27:03 -04:00
Jan Edmund Lazo
c3d81a4902
vim-patch:8.1.2220: :cfile does not abort like other quickfix commands
Problem:    :cfile does not abort like other quickfix commands.
Solution:   Abort when desired. Add tests for aborting. (Yegappan Lakshmanan,
            closes vim/vim#5121)
6a0cc916bd
2019-10-26 20:23:53 -04:00
Justin M. Keyes
6d8fe9b3f4 lint 2019-10-26 16:21:22 -07:00
smolck
46bde66147 gen_vimdoc.py: dump API docs to msgpack #11296
Convenient for API clients who want to reuse the API docs in their own
docs. Could be used e.g. to eliminate nvim.net's own doxygen parser:
3a736232a4/src/NvimClient.APIGenerator/Docs

TODO: currently the result values are formatted as Vim help docs. We
should change the values to have structure, something like this:

    [{
      'nvim_win_get_var': [
        'line1,
        'line2',
        [ 'item1', 'item2', ... ]
      ],
      'nvim_win_set_var': [
        ...
      ],
      ...
    }]

close #11296
2019-10-26 15:31:15 -07:00
Justin M. Keyes
726c8c7d74
win/dist: nvim-qt v0.2.15 #11295 2019-10-26 13:18:14 -07:00
Justin M. Keyes
ad532d3c66
Merge #11294 from tomtomjhj/vim-8.1.2173
vim-patch:8.1.{2173,2207,2218}
2019-10-26 12:50:51 -07:00
Daniel Hahler
4b5e2f7a0b tests: remove some redundant legacy tests #11028
These were turned into new-style Vim tests in cbecae46f.
2019-10-26 12:43:38 -07:00
vincowl
ec5776d92d build: add -fstack-protector* to linker #11292
Needed by chromeOS.
fixes #11228
2019-10-26 12:36:26 -07:00
Jaehwang Jerry Jung
6dcc1d1005 vim-patch:8.1.2218: "gN" is off by one in Visual mode
Problem:    "gN" is off by one in Visual mode.
Solution:   Check moving forward. (Christian Brabandt, vim/vim#5075)
453c19257f
2019-10-27 03:35:19 +09:00
Jaehwang Jerry Jung
c26466ae8b vim-patch:8.1.2207: "gn" doesn't work quite right
Problem:    "gn" doesn't work quite right. (Jaehwang Jerry Jung)
Solution:   Improve and simplify the search logic. (Christian Brabandt,
            closes vim/vim#5103, closes vim/vim#5075)
edaad6e0a0
2019-10-27 03:35:19 +09:00
Jaehwang Jerry Jung
034077ed1c vim-patch:8.1.2173: searchit() has too many arguments
Problem:    Searchit() has too many arguments.
Solution:   Move optional arguments to a struct.  Add the "wrapped" argument.
92ea26b925
2019-10-27 03:35:19 +09:00
Justin M. Keyes
19ba36d0e1
Merge #11271 from h-michael/add-more-info
lua/vim.shared: improve some validation messages
2019-10-26 02:30:40 -07:00
Justin M. Keyes
316c29bbf3 test/pcall_err(): truncate full paths, omit linenr
ref #11271
2019-10-26 02:00:58 -07:00
Hirokazu Hata
996a057fb9 lua/stdlib: adjust some validation messages #11271
close #11271
2019-10-26 00:27:01 -07:00
Justin M. Keyes
91b831da8b
Merge #11275 from janlazo/ci/nodejs
ci/nodejs: use node v10, prefer shell builtins in ci scripts
2019-10-25 22:26:15 -07:00
Jan Edmund Lazo
0b771cd9aa vim-patch:8.1.0859: handle multibyte "%v" in 'errorformat' #11285
Problem:    "%v" in 'errorformat' does handle multi-byte characters.
Solution:   Handle multi-byte characters. (Yegappan Lakshmanan, closes vim/vim#3700)
c45eb770a5
2019-10-25 22:17:21 -07:00
Joshua Rubin
99aa166cb1 man.vim: never switch to non-man window #11286
In order to find if there was already an open man page, the :Man command
would cycle through each window to see if &ft=='man'. This triggers
autocmds, e.g. BufEnter, unnecessarily and can have unexpected
side-effects.

Change the logic to check each window's ft without switching to it
unless it is actually a man window.

Signed-off-by: Joshua Rubin <me@jawa.dev>
2019-10-25 09:41:22 -07:00
Jan Edmund Lazo
ec205f4b9b
ci: simplify tree-sitter-cli install
Remove useless `npm link` for tree-sitter-cli.
Use powershell builtins.
2019-10-25 07:24:57 -04:00
Jan Edmund Lazo
9b22b69454
CI/Appveyor: set powershell strict mode
Set-PSDebug produces too much noise and has global scope.
Strict mode is scoped to the script context and catches errors.
2019-10-25 07:24:56 -04:00
Jan Edmund Lazo
c065b0d75f
CI: bump nodejs to v10.x (LTS)
v8.x will be EOL at end of 2019.
nvm on Travis has outdated LTS aliases.
2019-10-25 07:24:56 -04:00
Justin M. Keyes
4f4f5ef4fd
Merge #11213 from janlazo/vim-8.1.0014
vim-patch:8.1.{14,288,345,410,434,438,455}
2019-10-24 20:41:39 -07:00
Jan Edmund Lazo
ced2a38ad4
tag: fix pvs/v547 error 2019-10-24 22:40:30 -04:00
Jan Edmund Lazo
8daefa348e
vim-patch:8.1.0455: checking for empty quickfix stack is not consistent
Problem:    Checking for empty quickfix stack is not consistent.
Solution:   Use qf_stack_empty(). (Yegappan Lakshmanan)
019dfe6855
2019-10-23 01:33:17 -04:00
Jan Edmund Lazo
aa8f059397
vim-patch:8.1.0438: the ex_make() function is too long
Problem:    The ex_make() function is too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan)
b434ae2a1f
2019-10-23 01:33:16 -04:00
Jan Edmund Lazo
279ff23379
vim-patch:8.1.0434: copy_loclist() is too long
Problem:    copy_loclist() is too long.
Solution:   Split in multiple functions. (Yegappan Lakshmanan)
09037503ea
2019-10-23 01:33:16 -04:00
Jan Edmund Lazo
8257d49ff6
vim-patch:8.1.0410: the ex_copen() function is too long
Problem:    The ex_copen() function is too long.
Solution:   Refactor to split off two functions. (Yegappan Lakshmanan)
476c0db002
2019-10-23 01:33:16 -04:00
Jan Edmund Lazo
f3d6d8750b
vim-patch:8.1.0345: cannot get the window id associated with the location list
Problem:    Cannot get the window id associated with the location list.
Solution:   Add the "filewinid" argument to getloclist(). (Yegappan
            Lakshmanan, closes vim/vim#3202)
c9cc9c78f2
2019-10-23 01:33:16 -04:00
Jan Edmund Lazo
5e02bd071e
vim-patch:8.1.0288: quickfix code uses cmdidx too often
Problem:    Quickfix code uses cmdidx too often.
Solution:   Add is_loclist_cmd(). (Yegappan Lakshmanan)
396659592f
2019-10-23 01:33:16 -04:00
Jan Edmund Lazo
6dceaf3361
vim-patch:8.1.0014: qf_init_ext() is too long
Problem:    qf_init_ext() is too long.
Solution:   Split it into multiple functions. (Yegappan Lakshmanan,
            closes vim/vim#2939)
6053f2d29a
2019-10-23 01:33:15 -04:00
Justin M. Keyes
53b025887e
Merge #11261 from janlazo/vim-8.1.2185
vim-patch:8.1.{2185,2188,2190,2197}
2019-10-22 21:09:45 -07:00
Justin M. Keyes
9e4db2ef50
Merge #11199 from bobrippling/vim-8.1.1228
vim-patch:8.1.{1099,1228,1962} add 'tagfunc'
2019-10-22 20:27:35 -07:00
Rob Pilling
3b6b528ea9 vim-patch:8.1.1962: leaking memory when using tagfunc()
Problem:    Leaking memory when using tagfunc().
Solution:   Free the user_data. (Dominique Pelle, closes vim/vim#4886)
55008aad50
2019-10-22 20:13:02 +01:00
Rob Pilling
194f7bface vim-patch:8.1.1228: not possible to process tags with a function
Problem:    Not possible to process tags with a function.
Solution:   Add tagfunc() (Christian Brabandt, Andy Massimino, closes vim/vim#4010)
45e18cbdc4
2019-10-22 20:13:02 +01:00
Rob Pilling
e284b7233f Perform HASHTAB_ITER bookkeeping before user-code
The `HASHTAB_ITER` logic keeps track of how many entries in the hash
table are left to visit, decrementing this on each iteration of the
loop. This was previously decremented at the end of the loop body:

```c
size_t hi##todo_ = hi##ht_->ht_used;
for (hashitem_T *hi = hi##ht_->ht_array; hi##todo_; hi++) {
  if (!HASHITEM_EMPTY(hi)) {
    {
      <user code, macro-inserted>
    }
    hi##todo_--; // <--- important decrement here
  }
}
```

This meant that if the body of the loop (substituted in via macro
expansion) contained a `continue` statement, we'd skip decrementing our
counter, meaning we'd iterate too many times over the hash table,
usually leading to an out of bounds read beyond the hash table's
memory, or uninitialised/null pointers from unused hash table slots.

Decrementing `hi##todo` before the arbitrary loop body protects us from
this, and has no adverse side-effects since only the macro code can (or
should) use this variable.

Before this commit, no code within `HASHTAB_ITER()` contained a
`continue`, meaning this bug was left dormant and the fix has a very
minimal chance of introducing any bugs.
2019-10-22 19:55:55 +01:00
Jan Edmund Lazo
c067efa696
vim-patch:8.1.2197: ExitPre autocommand may cause accessing freed memory
Problem:    ExitPre autocommand may cause accessing freed memory.
Solution:   Check the window pointer is still valid. (closes vim/vim#5093)
34ba06b6e6
2019-10-21 07:34:06 -04:00
Jan Edmund Lazo
13a6878d18
vim-patch:8.1.2190: syntax test fails on Mac
Problem:    Syntax test fails on Mac.
Solution:   Limit the window size to 20 rows.
83e9a1ce75
2019-10-21 07:34:05 -04:00
Jan Edmund Lazo
60415a5d3a
vim-patch:8.1.2188: build error for missing define
Problem:    Build error for missing define.
Solution:   Add missing change.
2b78ab5d0c

These "WILD_" macros are used in earlier vim patches.
2019-10-21 07:34:05 -04:00