Jan Edmund Lazo
c0dbd8df95
fold: use_level,maybe_small are bool
...
use_levelp, maybe_smallp in check_closed() are bool ptrs.
2018-08-01 15:28:50 -04:00
Jan Edmund Lazo
44cb491f6e
globals: virtual_op is TriState
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
faa9869a9e
fold: recursive in deleteFoldEntry() is bool
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
14cffc3d1d
fold: fold_changed is bool
2018-08-01 15:28:49 -04:00
Jan Edmund Lazo
667b8cd108
fold: finish in foldUpdateIEMSRecurse() is bool
2018-08-01 15:28:49 -04:00
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
battlmonstr
e92f1bb271
Fix crash in lang_init() on macOS if lang_region = NULL
...
This is a regression after PR #7704 :
mac: Set $LANG based on the system locale
CFStringGetCStringPtr sometimes returns "lang_region" = NULL,
in this case CFStringGetCString is used instead,
which places output to "buf", but "buf" was not used
by the code.
2018-08-01 12:00:13 +02:00
Jan Edmund Lazo
c83ecee885
syntax: syn_pattern.sp_syncing is bool
2018-07-30 18:09:34 -04:00
Jan Edmund Lazo
1c5eee3c91
syntax: add const to get_syntax_attr() params
2018-07-30 16:19:38 -04:00
Jan Edmund Lazo
8f647cf03c
syntax: add const to syn_finish_line() params,vars
2018-07-30 15:29:22 -04:00
Jan Edmund Lazo
eafcfb2fb5
syntax: did_header is bool
...
Refactor all affected functions:
- add const
- declare and initialize on same line
- update boolean declarations from int with bool
2018-07-29 20:28:44 -04:00
Jan Edmund Lazo
d3f609db05
syntax: disptick_T is uint16_t
2018-07-29 18:03:16 -04:00
Jan Edmund Lazo
3feabcacb0
syntax: scl_id is int
2018-07-29 08:20:00 -04:00
Jan Edmund Lazo
3e6d3bf3bd
vim-patch:8.0.1088: occasional memory use after free
...
Problem: Occasional memory use after free.
Solution: Use the highlight table directly, don't keep a pointer.
414168d97f
2018-07-29 07:52:45 -04:00
Jan Edmund Lazo
f0ca2283b0
vim-patch:8.0.1078: using freed memory with ":hi Normal"
...
Problem: Using freed memory with ":hi Normal".
Solution: Get "item" again after updating the table.
b4ea1914b8
2018-07-29 07:52:45 -04:00
Jan Edmund Lazo
6b7b56dabe
vim-patch:8.0.1072: :highlight command causes a redraw even when nothing changed
...
Problem: The :highlight command causes a redraw even when nothing changed.
Solution: Only set "need_highlight_changed" when an attribute changed.
99433291b1
2018-07-29 07:52:45 -04:00
Jan Edmund Lazo
0c0318f8a7
vim-patch:8.0.0831: with 8 colors the bold attribute is not set properly
...
Problem: With 8 colors the bold attribute is not set properly.
Solution: Move setting HL_TABLE() out of lookup_color. (closes vim/vim#1901 )
12d853fae1
Use TriState on lookup_color() to avoid 'NOLINT' comments.
2018-07-29 07:52:45 -04:00
Jan Edmund Lazo
5af90e2ee7
vim-patch:8.0.0791: terminal colors depend on the system
...
Problem: Terminal colors depend on the system.
Solution: Use the highlight color lookup tables.
b41bf8e6b4
2018-07-29 07:52:45 -04:00
Jan Edmund Lazo
51f939e912
syntax: refactor get_id_list()
...
Add const to parameters and variables.
Declare and init variables on same line.
Use `sizeof(*ptr)` to calculate size for malloc().
2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
c18a1b9034
syntax: refactor syn_combine_list()
...
Add const on parameters and variables.
Update declarations to avoid typecasts.
Use `sizeof(*ptr)` for malloc() to reduce effect of type changes.
ie. short to int16_t
Update syn_compare_stub() variable declarations for consistency.
2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
6646502bbb
syntax: syn_cluster_T.scl_list is int16_t*
2018-07-29 07:51:51 -04:00
Jan Edmund Lazo
8888a6ce80
syntax: refactor syn_current_attr()
...
Declare and initialize variables on same line if possible.
Add const to parameters and variables.
Use bool for any parameter,variable using TRUE/FALSE macros.
Replace 'short' type with 'int16_t'.
2018-07-29 07:51:51 -04:00
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