Commit Graph

11285 Commits

Author SHA1 Message Date
Jan Edmund Lazo
3f8ba68895 screen: screen_cleared is TriState 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
971e9370ad fold: lineFolded() is bool 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
6dfaf8e914 fold: check_closed() returns bool
Update affected variables (ie. had_folded).
Add const to params to restrict usage.

TODO: refactor win_T.w_lines[idx].wl_folded from char to bool
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
4fb9b42869 search: refactor variables in findmatchlimit()
Combine declaration and initialization.
Refactor int variables, that use TRUE/FALSE macros (not MAYBE), to bool.
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
ba6417091c search: start_in_quotes in findmatchlimit is TriState 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
0e55d88639 edit: dont_sync_undo is TriState 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
deae2e8434 ex_cmds: refactor utf8 variables to TriState
- utf8 in helptags_one()
- this_utf in fix_help_buffer()
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
f35df8d697 menu: enable in ex_menu() is TriState 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
f193b5241f fold: fold_T.fd_small is TriState 2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
9e20398908 diff: refactor diff_a_works to use TriState 2018-08-01 15:28:44 -04:00
Jan Edmund Lazo
a095a48987 clint: detect MAYBE and recommend TriState
Vim uses MAYBE for 3-value boolean with FALSE/TRUE/MAYBE.
Use TriState type instead to restrict to 3 values, kFalse/kTrue/kNone.
2018-08-01 15:23:01 -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
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
Björn Linse
d183103b45 test: assert scroll region state for clear
some clients assume this, so tests should check it
2018-07-24 16:37:04 +02:00
Björn Linse
ed5ac84ab0 tests: test for redrawing tabline when msgsep marker goes outside screen 2018-07-24 16:36:20 +02:00
Jan Edmund Lazo
f0a702d116 file_search: free stackp if vim_findfile() failed
ff_free_stack_element() accepts NULL ptr and returns early.
This removes the need to check if stackp is not NULL.
2018-07-24 01:15:24 -04:00
Jan Edmund Lazo
7c7701af12 vim-patch:8.1.0111: .po files do not use recommended names
Problem:    .po files do not use recommended names.
Solution:   Give a warning if the recommended name is not used.  Accept the
            recommended name for conversion. (Christian Brabandt, Ken Takata)
d1d037e901
2018-07-23 19:35:11 -04:00
Jan Edmund Lazo
57c095d5fc vim-patch:8.0.1839: script to check .po file doesn't check for plural header
Problem:    Script to check .po file doesn't check for plural header.
Solution:   Add a check that the plural header is present when needed.
9cfc7d885c
2018-07-23 12:42:46 -04:00
Jan Edmund Lazo
7cf36fc67e vim-patch:8.0.1778: script to check translations does not always work
Problem:    Script to check translations does not always work.
Solution:   Go to first line before searching for MIME.
b07bbb0d29
2018-07-23 12:41:29 -04:00
Jan Edmund Lazo
b63f5c170d vim-patch:8.0.0835: translations check with msgfmt does not work
Problem:    Translations check with msgfmt does not work.
Solution:   Add a space before the file name.
65cedb2074
2018-07-23 12:34:21 -04:00
Jan Edmund Lazo
45a2c6543c vim-patch:8.0.0830: translating messages is not ideal
Problem:    Translating messages is not ideal.
Solution:   Add a remark about obsolete messages.  Use msgfmt in the check
            script. (Christian Brabandt)
aaef1bae3c
2018-07-23 12:33:39 -04:00
Jan Edmund Lazo
1ed5abfe88 vim-patch:8.0.0794: checking translations fails with multiple NL
Problem:    The script to check translations fails if there is more than one
            NL in one line.
Solution:   Count the number of NL characters.  Make count() accept a string.
9966b21a57
2018-07-23 11:50:37 -04:00