Jan Edmund Lazo
64abd7be79
Merge pull request #16341 from zeertzjq/vim-8.2.2518
...
vim-patch:8.2.{2518,2520,3572,3588}: 'listchars' (and 'fillchars'?) fixes
2021-11-21 22:21:32 -05:00
dundargoc
725cbe7d41
refactor: saner options for uncrustify ( #16204 )
...
* sp_enum_after_assign = force
* sp_brace_typedef = force
* nl_do_brace = remove
* sp_do_brace_open = force
* sp_brace_close_while = force
* sp_before_semi = remove
* sp_before_semi_for = remove
* sp_before_semi_for_empty = remove
* sp_between_semi_for_empty = remove
* sp_after_semi_for_empty = remove
* sp_before_square = remove
* sp_before_squares = remove
* sp_inside_square = remove
* sp_inside_fparens = remove
* sp_inside_fparen = remove
* sp_inside_tparen = remove
* sp_after_tparen_close = remove
* sp_return_paren = force
* pos_bool = lead
* sp_pp_concat = remove
* sp_pp_stringify = remove
* fixup: disable formatting for the INIT section
2021-11-19 14:21:53 -05:00
zeertzjq
5ff972cafe
vim-patch:8.2.3522: cannot use \x and \u when setting 'listchars' ( #16049 )
...
Problem: Cannot use \x and \u when setting 'listchars'.
Solution: Support hex and unicode in hex form. (closes vim/vim#9006 )
93ff6720fe
2021-11-17 20:55:59 -05:00
zeertzjq
145fc69df9
vim-patch:8.2.3588: break statement is never reached
...
Problem: Break statement is never reached.
Solution: Rely on return value of set_chars_option() not changing.
(closes vim/vim#9103 )
606efc7df4
2021-11-17 07:11:46 +08:00
zeertzjq
7528bcec42
fix(options): using :set fillchars should clear local value
2021-11-17 07:11:46 +08:00
zeertzjq
8c24e1462c
vim-patch:8.2.2518: 'listchars' should be window-local
...
Problem: 'listchars' should be window-local.
Solution: Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
closes vim/vim#5206 , closes vim/vim#7850 )
eed9d46293
Nvim already has this feature, but it implements :set listchars the same
as :setglobal listchars, which is incorrect. Vim's implementation of
:set listchars is correct: using :set listchars clears local value.
2021-11-17 07:11:40 +08:00
dundargoc
eba317d7a9
refactor: reduce number of explicit char casts ( #16077 )
...
* refactor: reduce number of explicit char casts
2021-11-16 20:27:59 +01:00
Jan Edmund Lazo
8f984dc1f2
Merge pull request #16047 from mcepl/vim-8.2.3520
...
vim-patch:8.2.3520: cannot define a function for thesaurus completion
2021-11-14 21:23:42 -05:00
Björn Linse
9f27e6cbe7
refactor(multibyte): eliminate mb_char2cells alias for utf_char2cells
2021-11-14 12:49:09 +01:00
Matěj Cepl
2dc0af3a4f
vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
...
Problem: 'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution: Make 'thesaurusfunc' global-local.
f4d8b76d30
2021-11-06 14:24:46 +01:00
James McCoy
e6ff154be6
vim-patch:8.1.0779: argument for message functions is inconsistent
...
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
32526b3c18
2021-11-01 06:41:29 -04:00
James McCoy
efa924f66b
vim-patch:8.1.0743: giving error messages is not flexible
...
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302 ) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
f9e3e09fdc
2021-11-01 06:41:28 -04:00
dundargoc
a68faed02d
refactor: saner options for uncrustify #16196
...
* refactor: general good option changes
sp_deref = remove
sp_not = remove
sp_inv = remove
sp_inside_paren_cast = remove
mod_remove_duplicate_include = true
sp_after_semi = add
sp_after_semi_for = force
sp_sizeof_paren = remove
nl_return_expr = remove
nl_else_brace = remove
nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
2021-10-31 17:03:08 -07:00
dundargoc
4472c56d54
refactor: uncrustify #16090
2021-10-29 17:23:20 -07:00
Matěj Cepl
b092171e7c
vim-patch:8.2.3525: option variable name does not match option name
...
Problem: Option variable name does not match option name. (Christ van
Willigen)
Solution: Rename the variable.
d4c4bfa007
2021-10-24 08:57:30 +02:00
Matěj Cepl
cbec765915
vim-patch:8.2.3520: cannot define a function for thesaurus completion
...
Problem: Cannot define a function for thesaurus completion.
Solution: Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987 ,
closes 8950)
160e994d76
2021-10-23 22:30:50 +02:00
Dundar Göc
ce441b8b13
vim-patch:8.1.2392: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
6e0ce171e1
2021-10-21 12:07:14 +02:00
dundargoc
81717d2461
vim-patch:8.1.2243: typos in comments ( #16104 )
...
Problem: Typos in comments.
Solution: Fix the typos. (Dominique Pelle, closes vim/vim#5160 ) Also adjust
formatting a bit.
32aa10203b
2021-10-20 12:19:14 -07:00
dundargoc
aff444659e
fix(PVS/V1028): prevent possible overflow #16023
...
Full warning: "Possible overflow. Consider casting operands, not the
result."
https://pvs-studio.com/en/docs/warnings/v1028/
2021-10-17 17:11:23 -07:00
Jan Edmund Lazo
77e6ecf85a
Merge pull request #15930 from dundargoc/vim-patch/old-style-c-comments
...
vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
2021-10-17 10:21:40 -04:00
Dundar Göc
24a1880866
refactor: reduce number of unique char casts
2021-10-13 18:26:18 +02:00
dundargoc
649b3160a1
refactor: reduce number of unique char casts ( #15995 )
2021-10-12 17:52:54 +02:00
dundargoc
5940a3415b
vim-patch:8.2.3490: superfluous return statements #15978
...
Problem: Superfluous return statements.
Solution: Remove superfluous return statements from void functions.
(closes vim/vim#8977 )
3826c0513b
2021-10-09 16:38:50 -07:00
Dundar Göc
6d9dea4201
refactor: remove redundant casts
2021-10-07 13:16:55 +02:00
Dundar Göc
b4acae2c4a
vim-patch:8.1.2392: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
6e0ce171e1
2021-10-06 11:50:10 +02:00
dundargoc
d90fb1c0bf
Refactor/uncrustify ( #15790 )
...
* refactor: format with uncrustify
* fixup(dundar): fix functions comments
* fixup(dundar): remove space between variable and ++/--
* fixup(dundar): better workaround for macro attributes
This is done to be able to better use uncrustify rules for macros
* fixup(justin): make preprocessors follow neovim style guide
2021-09-29 19:48:50 +02:00
Björn Linse
a0ec8597e3
fix(runtime): make a copy of runtime_search_path when iterating
...
This is to prevent concurrent modification, just like save_rtp
in the vim 8 implementation
2021-09-27 21:17:53 +02:00
Björn Linse
ac3288d556
fix(runtime): ordering of loading packages with user config
...
site packages must be sourced before user config
NOTE: we only consider dirs exactly matching "after" to be an AFTER dir.
vim8 considers all dirs like "foo/bar_after", "Xafter" etc, as an
"after" dir in SOME codepaths not not in ALL codepaths.
2021-09-26 15:44:40 +02:00
dundargoc
2f9b9e61d7
refactor: format with uncrustify #15778
...
* fixup: force exactly one whitespace between type and variable
2021-09-25 17:16:04 -07:00
dundargoc
7a26eb8a56
refactor: format with uncrustify #15755
2021-09-24 05:03:15 -07:00
Justin M. Keyes
c76cddf3e0
fix(startup): init.lua: set $MYVIMRC to absolute path #15748
...
- main.c: remove os_setenv("MYVIMRC",…), it is already done by
do_source().
- This also sets $MYVIMRC to a full (absolute) path.
- code cleanup.
2021-09-21 08:47:46 -07:00
zeertzjq
f4ce4c1677
vim-patch:8.2.3437: compiler warnings for 32/64 bit usage
...
Problem: Compiler warnings for 32/64 bit usage.
Solution: Add type casts. (Mike Williams, closes vim/vim#8870 )
f5785cf059
2021-09-19 13:13:44 +08:00
zeertzjq
a348c666a3
vim-patch:8.2.3425: warning for using uninitialized variable
...
Problem: Warning for using uninitialized variable.
Solution: Initialize it. (John Marriott)
56e14698b4
2021-09-19 13:13:44 +08:00
zeertzjq
51567db4b6
vim-patch:8.2.3424: a sequence of spaces is hard to see in list mode
...
Problem: A sequence of spaces is hard to see in list mode.
Solution: Add the "multispace" option to 'listchars'. (closes vim/vim#8834 )
f14b8ba137
2021-09-19 13:13:44 +08:00
Christian Clason
4a7a99ff31
Merge pull request #15550 from jasonccox/vim-8.2.3385
...
vim-patch:8.2.3385,8.2.3393
2021-09-12 10:55:35 +02:00
Sean Dewar
7175efb518
fix(get_showbreak_value): remove FUNC_ATTR_UNUSED
2021-09-11 15:36:04 +01:00
Sean Dewar
34cb087955
vim-patch:8.1.1355: obvious mistakes are accepted as valid expressions
...
Problem: Obvious mistakes are accepted as valid expressions.
Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto,
closes vim/vim#3981 )
16e9b85113
Update vim_str2nr_spec.lua to add more tests that use strict = true.
2021-09-11 15:33:19 +01:00
Sean Dewar
fd1dbb103b
vim-patch:8.1.2281: 'showbreak' cannot be set for one window
...
Problem: 'showbreak' cannot be set for one window.
Solution: Make 'showbreak' global-local.
ee85702c10
Change in oneleft() is N/A as the relevant condition was removed
(has_mbyte is always true for Nvim, so the condition was always false;
see commit 73dc9e9
).
Use wp over curwin for curs_columns().
Required for v8.2.2903 (otherwise test fails as it'll leave the global
option set).
N/A patches for version.c:
vim-patch:8.1.2283: missed on use of p_sbr
Problem: Missed on use of p_sbr.
Solution: Add missing p_sbr change.
91e22eb6e0
Already ported in commit 43a874a
.
2021-09-10 15:50:43 +01:00
Jason Cox
85ba41a4b3
vim-patch:8.2.3385: escaping for fish shell does not work properly
...
Problem: Escaping for fish shell does not work properly.
Solution: Insert a backslash before a backslash. (Jason Cox, closes vim/vim#8810 )
6e82351130
2021-09-02 13:07:29 -06:00
Gregory Anders
460019366e
feat: defaults: auto-create backup dir
...
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.
Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.
The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.
Co-authored by: murphy66 <murphy66@gmail.com >
2021-08-27 10:34:44 -06:00
zeertzjq
32024787b6
vim-patch:8.1.2229: color number column above/below cursor #15409
...
Problem: Cannot color number column above/below cursor differently.
Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624 )
efae76ab1a
2021-08-27 05:50:37 -07:00
Jan Edmund Lazo
43a874ab74
vim-patch:8.2.3198: cannot use 'formatlistpat' for breakindent
...
Problem: Cannot use 'formatlistpat' for breakindent.
Solution: Use a negative list indent. (Maxim Kim, closes vim/vim#8594 )
f674b358fc
Port get_showbreak_value() from patch v8.1.2281
to avoid breaking changes when porting older patches.
2021-08-08 22:22:34 -04:00
Jan Edmund Lazo
f89a275e32
vim-patch:8.2.3160: 'breakindent' does not work well for bulleted lists
...
Problem: 'breakindent' does not work well for bulleted and numbered lists.
Solution: Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
closes vim/vim#8564 , closes vim/vim#1661 )
4a0b85ad01
2021-08-08 22:22:34 -04:00
Jan Edmund Lazo
cdbd54972b
option: pvs/v557 ( #14740 )
...
Replace STRCAT with STRLCAT() to always NUL-terminate "errbuf" array.
2021-08-08 17:27:50 -04:00
zeertzjq
1666fe9dfe
vim-patch:8.1.2029: cannot control 'cursorline' highlighting well
...
Problem: Cannot control 'cursorline' highlighting well.
Solution: Add "screenline". (Christian Brabandt, closes vim/vim#4933 )
017ba07fa2
2021-08-02 05:41:17 +08:00
Jan Edmund Lazo
20fc0519af
vim-patch:8.2.3246: memory use after free
...
Problem: Memory use after free.
Solution: When clearing a string option set the pointer to "empty_option".
77111e2bfc
2021-08-01 11:27:11 -04:00
zeertzjq
5f01714b25
vim-patch:8.1.2019: 'cursorline' always highlights the whole line ( #15161 )
...
Problem: 'cursorline' always highlights the whole line.
Solution: Add 'cursorlineopt' to specify what is highlighted.
(closes vim/vim#4693 )
410e98a70b
2021-07-30 21:51:26 -04:00
Björn Linse
f0cc3a9480
refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
...
It might come as a schocking surprise, but the defaults we support
are the NEOVIM defaults.
2021-07-14 21:54:19 +02:00
Björn Linse
fc869da6dc
refactor(options): delet unused P_VIM flag
2021-07-14 21:06:07 +02:00
Thomas Vigouroux
ff53c5585f
refactor(undo): don't assume curbuf in u_compute_hash
2021-07-09 15:36:07 +02:00