Commit Graph

11544 Commits

Author SHA1 Message Date
Jan Edmund Lazo
db4bddb770 syntax: use const on check_keyword_id() variables
Declare and initialize variables as close as possible.
Use const pointers without changing semantics if possible.
2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
2a7047b77c syntax: syn_state.sst_next_list is int16_t* 2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
eb7aa76b13 syntax: current_next_list is int16_t* 2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
095ddcb548 syntax: update types of stateitem_T members
Replace 'short' with 'int16_t' to match lint changes from 8.0.1541.
Update ID_LIST_ALL to match type of stateitem_T.si_cont_list.
2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
6f5eadcdac syntax: use const on syn_list_keywords() variables 2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
9b34b867dd syntax: update types for keyentry_T,sp_syn
Replace 'short' with 'int16_t'
2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
e6993f2491 syntax: use const on copy_id_list() params,vars 2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
ef3cbd91cb syntax: use const on add_keyword() params,vars 2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
a34066963e syntax: update types of syn_opt_arg_T members
Use bool, not int, for booleans.
Use int16_t, not short, to match lint changes from patch 8.0.1541.
2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
9229f7a05d syntax: use const on put_id_list() variables 2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
b647ba6afb vim-patch:8.0.1541: synpat_T is taking too much memory
Problem:    synpat_T is taking too much memory.
Solution:   Reorder members to reduce padding. (Dominique Pelle, closes vim/vim#2671)
36f923014a
2018-07-29 07:51:50 -04:00
Jan Edmund Lazo
eaa2cd9f7c vim-patch:8.0.0735: no indication that the quickfix window/buffer changed
Problem:    There is no way to notice that the quickfix window contents has
            changed.
Solution:   Increment b:changedtick when updating the quickfix window.
            (Yegappan Lakshmanan)
a8788f4d0b
2018-07-28 23:58:34 -04:00
Jan Edmund Lazo
91b8210779 vim-patch:8.0.0687: minor issues related to quickfix
Problem:    Minor issues related to quickfix.
Solution:   Set the proper return status for all cases in setqflist() and at
            test cases for this.  Move the "adding" flag outside of
            FEAT_WINDOWS. Minor update to the setqflist() help text. (Yegappan
            Lakshmanan)
86f100dc09
2018-07-28 23:58:34 -04:00
Marcos Almeida
a2253744c9 system(): handle profiling and 'verbose' #8730
closes #8362

Vim's code calls `call_shell` directly from `get_system_output_as_rettv`
whereas in Nvim this function has been rewritten to not call `call_shell` but to call
`os_system` via `do_os_system`, losing the support for profiling and verbose.

Changing the code to call `call_shell` from `get_system_output_as_rettv`
seems to be too complicated to be worth it on the current version of the
code. So this commit duplicates the relevant code.
2018-07-29 03:49:11 +02:00
Justin M. Keyes
befc7de26f
Merge pull request #8770 from janlazo/vim-8.0.0726 2018-07-29 02:00:48 +02:00
Daniel Hahler
a4494b7cbc checkhealth: always report stderr with errors (#8783)
This also reports the exit code (e.g. 127 for when pyenv-which fails).
2018-07-29 01:46:59 +02:00
Daniel Hahler
ade88fe4cc checkhealth: do not use exepath with host_prog (#8784)
This would need to get `expand`ed to not become empty, and is being
handled by s:check_bin already.

`s:check_bin` will also complain about e.g.
"~/.pyenv/versions/3.6.6/bin/python" not being executable, but that
reflects that the host will fail to start with it.

Fixes #8778
2018-07-29 01:44:46 +02:00
hyatskov
bb33fc4f55 log.c: Fix possible truncation in buffer (#8791) 2018-07-29 01:38:17 +02:00
Justin M. Keyes
8951304c10
Merge #8793 from janlazo/vim-8.0.0837 2018-07-29 01:32:39 +02:00
Jan Edmund Lazo
e09e9ca810 lint 2018-07-27 18:43:53 -04:00
Jan Edmund Lazo
882782f0fb screen: add const and reindent update_debug_signs() 2018-07-27 18:43:53 -04:00
Jan Edmund Lazo
243d16688a vim-patch:8.0.0837: signs can be drawn on top of console messages
Problem:    Signs can be drawn on top of console messages.
Solution:   don't redraw at a prompt or when scrolled up. (Christian Brabandt,
            closes vim/vim#1907)
0792048842
2018-07-27 18:40:31 -04:00
Björn Linse
9abe0bdb54
Merge pull request #8789 from bfredl/updatehl
screen.c: add update_window_hl to special redrawing entrypoints, fixes a crash
2018-07-27 23:20:58 +02:00
Björn Linse
9a584773b5 screen.c: add update_window_hl to special redrawing entrypoints
The following (run as a script) used to cause a crash due to :sign using a
special redraw (not updating nvim's specific highlight data structures)
without proper redraw first, as split just flags for redraw later.

set cursorline
sign define piet text=>> texthl=Search
split
sign place 3 line=2 name=piet buffer=1
2018-07-27 17:11:01 +02:00
James McCoy
85a7170f19
Merge pull request #8767 from janlazo/vim-8.0.0493
[RDY] vim-patch:8.0.0493
2018-07-27 10:50:57 -04:00
James McCoy
594859fdd6
Merge pull request #8485 from janlazo/vim-8.0.1012
[RDY] vim-patch:8.0.{805,806,810,1012,1017}
2018-07-27 10:44:29 -04:00
James McCoy
e42688fcf3
Merge pull request #8769 from janlazo/vim-8.0.1502
[RDY] vim-patch:8.0.{1502,1512,1622}
2018-07-27 10:06:46 -04:00
Björn Linse
5f15788dc3
tui: clip invalid regions on resize (#8779), fixes #8774 2018-07-26 19:55:26 +02:00
Justin M. Keyes
9c0c5e8bc6
Merge #8729 'log: milliseconds, format' 2018-07-25 16:29:23 +02:00
Justin M. Keyes
27dc42160f log.c: format: padding
- milliseconds: leading zeroes
- PID: whitespace padding
2018-07-25 15:29:57 +02:00
Peter Hodge
ea2e8f4f10 DOC: regenerate api docs 2018-07-25 15:07:13 +10:00
Peter Hodge
7ab27eeb53 DOC: add support for intro sections in api docs 2018-07-25 15:07:13 +10:00
Peter Hodge
b53b621ef6 functests: tests related to operations on unloaded buffers #7688 2018-07-25 15:07:13 +10:00
Peter Hodge
10bb11e8d1 API: update docs WRT behaviours/methods for unloaded buffers #7688 2018-07-25 15:07:13 +10:00
Peter Hodge
8ff0872cf7 API: add nvim_buf_is_loaded() #7688 2018-07-25 15:07:13 +10:00
Peter Hodge
40e2d6b59b API: buf_get_lines, buf_line_count handle unloaded buffers #7688 2018-07-25 15:07:13 +10:00
Peter Hodge
ae52170a52 cmake: bump API version 2018-07-25 14:09:04 +10:00
Jan Edmund Lazo
30bba7a10c vim-patch:8.0.1017: test for MS-Windows $HOME always passes
Problem:    Test for MS-Windows $HOME always passes.
Solution:   Rename the test function.  Make the test pass.
dde6034111

Assume $HOME contains the literal absolute path.
Nested environment variable expansion is unsupported.
2018-07-24 23:17:36 -04:00
Jan Edmund Lazo
5ed0975ea2 vim-patch:8.0.1012: MS-Windows: problem with $HOME when is was set internally
Problem:    MS-Windows: Problem with $HOME when is was set internally.
Solution:   Only use the $HOME default internally. (Yasuhiro Matsumoto, closes
            vim/vim#2013)
48340b62e8

Restore vim_getenv() behaviour for $HOME on Windows.
2018-07-24 23:17:28 -04:00
Jan Edmund Lazo
b0ab46056f vim-patch:8.0.0810: MS-Windows: tests still hang
Problem:    MS-Windows: tests still hang.
Solution:   Only create the XfakeHOME directory if it does not exist yet.
d0b6c6c54e
2018-07-24 22:31:26 -04:00
Jan Edmund Lazo
290a9632d6 vim-patch:8.0.0806: tests may try to create XfakeHOME twice
Problem:    Tests may try to create XfakeHOME twice.
Solution:   Avoid loading setup.vim twice.
f98246d484
2018-07-24 22:31:26 -04:00
Jan Edmund Lazo
28c3679b64 vim-patch:8.0.0805: GUI test fails with gnome2
Problem:    GUI test fails with gnome2.
Solution:   Set $HOME to an existing directory.
d1ee0043c0
2018-07-24 22:31:26 -04:00
Justin M. Keyes
ef86aad878 log.c: ISO 8601 date/time
After:
    INFO  2018-07-17T22:05:46.175 656 main:560: starting main loop
2018-07-24 19:36:38 +02:00
Justin M. Keyes
3258c6a2f4 log.c: include milliseconds
closes #8727

Before:
    INFO  180711.233956 11124 main:560: starting main loop
After:
    INFO  180711.233956.807 11124 main:560: starting main loop

Note:
  - Can't use uv_hrtime() nor uv_now(), they are not "since the epoch".
    Also, log.c can't assume a loop exists.
2018-07-24 19:36:38 +02:00
Justin M. Keyes
4d6a1e5566 log.c: message format
- Log-level name (INFO/ERROR/…) should be in the first column, so that
  filtering by log-level is maximally trivial.
- Use 2-digit year. 4-digit year is useless, logs don't survive for
  decades without context.

Before:
    2018/07/05 17:49:41 INFO  27596 on_process_exit:393: foo
After:
    INFO  180705.174941 27596 on_process_exit:393: foo
2018-07-24 19:25:51 +02:00
Justin M. Keyes
ddea519542 rename: os_get_localtime => os_localtime 2018-07-24 19:25:50 +02:00
Björn Linse
72ddbb675f
Merge pull request #8771 from bfredl/glitches
Fix redraw glitches with newgrid refactor

Fixes #8768 #8775
2018-07-24 17:45:42 +02:00
Björn Linse
dcac926ced ui: fix glitches where scrolling region affects clearing of screen
the first implemented UI protocol clients (python-gui and builitin TUI)
allowed the cleared region to be restricted by setting the scroll region.
This was never used by nvim though, and not documented and implemented by
newer clients, to check we remain compatible with both kind of clients,
ensure the scroll region is in a reset state.
2018-07-24 16:38:51 +02:00
Björn Linse
d545413492 screen.c: fix redrawing tabline when messages overflow screen 2018-07-24 16:38:24 +02:00
Björn Linse
11861bc9c8 tests: add test for switching tabpage right after scroll 2018-07-24 16:37:48 +02:00