Christian Clason
1b73ae653f
Merge pull request #16914 from godlygeek/fix_14587
...
fix(screen): don't put empty sign text in line number column
2022-02-13 11:41:17 +01:00
Lewis Russell
50250542c3
refactor(signs): more efficient signcol calc
...
When iterating signs to calculate the sign column, stop iterating when
we reach the maximum configured from 'signcolumn'.
2022-02-12 17:56:39 +00:00
zeertzjq
a2a37effc2
refactor(PVS/V547): p == NULL is always false
2022-02-09 15:23:45 +08:00
zeertzjq
d65ee12914
vim-patch:8.2.1741: pathshorten() only supports using one character
...
Problem: pathshorten() only supports using one character.
Solution: Add an argument to control the length. (closes vim/vim#7006 )
6a33ef0deb
Cherry-pick a line in test from patch 8.2.0634.
Use Nvim's config paths in docs.
shorten_dir() returning a pointer looks a bit confusing here, as it is
actually the same pointer passed to it, and it doesn't really reduce
much code, so change it back to void.
Assigning rettv->vval.v_string = NULL is not needed if a pointer is
within 64 bits. While this is usually the case, I'm not sure if it can
be taken for granted.
2022-02-06 16:29:12 +08:00
zeertzjq
89e308d7da
Merge pull request #17226 from dundargoc/refactor/remove-redundant-code
...
vim-patch:8.2.4241: some type casts are redundant
2022-02-03 20:47:29 +08:00
zeertzjq
f4300985d3
Merge pull request #17113 from zeertzjq/vim-8.2.2569
...
feat(statusline): support multibyte fillchar
2022-02-01 17:57:01 +08:00
Dundar Göc
2793fcae0a
vim-patch:8.2.4241: some type casts are redundant
...
Problem: Some type casts are redundant.
Solution: Remove the type casts. (closes vim/vim#9643 )
420fabcd4f
This is not a literal port but an equivalent one.
2022-01-30 19:16:51 +01:00
zeertzjq
f2d84df4a8
vim-patch:8.2.3095: with 'virtualedit' set to "block" block selection is wrong
...
Problem: With 'virtualedit' set to "block" block selection is wrong after
using "$". (Marco Trosi)
Solution: Compute the longest selected line. (closes vim/vim#8495 )
b17ab86e7b
2022-01-27 18:55:21 +08:00
bfredl
d50dd12725
Merge pull request #17095 from zeertzjq/vim-8.2.3227
...
vim-patch:8.2.{3227,3280,4094}: global-local 'virtualedit'
2022-01-27 08:34:57 +01:00
zeertzjq
cb39c825c4
vim-patch:8.2.3410: crash with linebreak, listchars and large tabstop
...
Problem: Crash with linebreak, listchars and large tabstop.
Solution: Account for different size listchars for a tab. (closes vim/vim#8841 )
89a54b413a
2022-01-21 18:16:16 +08:00
zeertzjq
296b8fbe3b
vim-patch:8.2.3121: 'listchars' "exceeds" character appears in foldcolumn
...
Problem: 'listchars' "exceeds" character appears in foldcolumn. Window
separator is missing. (Leonid V. Fedorenchik)
Solution: Only draw the "exceeds" character in the text area. Break the
loop when not drawing the text. (closes vim/vim#8524 )
41fb723ee9
2022-01-21 18:16:16 +08:00
zeertzjq
be15ac06ba
feat(statusline): support multibyte fillchar
...
This includes a partial port of Vim patch 8.2.2569 and some changes to
nvim_eval_statusline() to allow a multibyte fillchar. Literally every
line of C code touched by that patch has been refactored in Nvim, and
that patch contains some irrelevant foldcolumn tests I'm not sure how to
port (as Nvim's foldcolumn behavior has diverged from Vim's).
2022-01-16 19:54:27 +08:00
zeertzjq
87e54f123a
vim-patch:8.2.3280: 'virtualedit' local to buffer is not the best solution
...
Problem: 'virtualedit' local to buffer is not the best solution.
Solution: Make it window-local. (Gary Johnson, closes vim/vim#8685 )
51ad850f5f
2022-01-15 19:21:17 +08:00
zeertzjq
d391940b9a
vim-patch:8.2.3227: 'virtualedit' can only be set globally
...
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638 )
53ba05b090
I changed some macros to unsigned integer literals to avoid compiler warnings.
2022-01-15 19:21:17 +08:00
Matt Wozniski
4ddd6c53bd
fix(screen): don't put empty sign text in line number column
...
When `signcolumn=number` but no sign on a given line has any text,
display the line's line number instead of the (empty) sign text in the
line number column.
2022-01-04 01:49:40 -05:00
dundargoc
6fb9c278d8
chore(fixup): zeer
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-01-01 02:52:39 +01:00
Dundar Göc
db7fe34017
refactor: avoid overflow by explicitly casting operand to a wider type
2021-12-31 14:45:03 +01:00
dundargoc
6e00d4754c
vim-patch:8.2.3914 ( #16808 )
...
* vim-patch:8.2.3914: various spelling mistakes in comments
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416 )
af4a61a85d
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2021-12-28 11:28:48 +01:00
zeertzjq
28dadd5a54
fix(screen): truncate when overwriting right half of a double-width char
...
Unlike the code above, this truncates the character in the same grid.
This is mainly for the pum scrollbar in the next commit.
2021-12-24 08:06:27 +08:00
zeertzjq
bc75544fac
fix(screen): truncate double-width character correctly
...
The `c = '>';` is useless here, because it is not used later.
`u8c` should also need to be set to '>', and `u8cc` needs to be cleared.
2021-12-24 08:06:26 +08:00
Björn Linse
df54d82b7c
refactor(misc1): move out high-level input functions to a new file: input.c
...
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
2021-12-10 18:15:33 +01:00
Björn Linse
26eb605152
Merge pull request #16597 from bfredl/nomisc1
...
refactor: move out some long-hanging fruit from misc1.c
2021-12-10 10:56:17 +01:00
Björn Linse
d9c1669a54
refactor(misc1): move out misc functions which obviously belong elsewhere
...
Also make some function names more descriptive/regular.
2021-12-09 23:17:29 +01:00
James McCoy
e8f9262125
vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'
...
Problem: Cannot adjust sign highlighting for 'cursorline'.
Solution: Add CursorLineSign and CursorLineFold highlight groups.
(Gregory Anders, closes vim/vim#9201 )
e413ea04b7
2021-12-08 21:47:58 -05:00
Jan Edmund Lazo
5abd7c2c14
Merge pull request #16421 from seandewar/vim-8.1.0035
...
vim-patch:8.1.{35,42,64},8.2.{1781,1783,1976,2014,3671}
2021-12-07 21:17:12 -05:00
Björn Linse
be768be6b7
Merge pull request #16556 from zeertzjq/hl-change-update
...
fix(highlight): always update window highlight if highlight changed
2021-12-07 18:41:17 +01:00
zeertzjq
b326bf5f41
fix(screen): do not draw filler lines post eof if already at last row
2021-12-07 23:19:56 +08:00
zeertzjq
23dcef9269
fix(highlight): always update window highlight if highlight changed
2021-12-07 20:48:39 +08:00
Sean Dewar
1fffccc5d6
vim-patch:8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
...
Problem: Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution: Set restart_edit to 'A' and check for it.
942b4541a2
Nvim already checked for 'i' in showmode(), so this bug was fixed with <C-W>
(though this patch now changes <C-W> to use 'A').
However, the missing changes I ported for v8.1.0036 use 'A' when a callback
leaves the window in insert mode and edit gets restarted, so this bug was
possible there.
Modify showmode() restart_edit condition to match v8.2.1978:
957cf67d50
2021-12-07 11:34:26 +00: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
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
Björn Linse
54ff21a153
refactor(macros): delete multibyte macros which just are aliases
2021-11-14 16:33:12 +01:00
Björn Linse
71a4d275dc
refactor(multibyte): eliminate mb_char2len alias for utf_char2len
2021-11-14 12:49:12 +01:00
Björn Linse
0039ba04b0
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
2021-11-14 12:49:12 +01:00
Björn Linse
9f27e6cbe7
refactor(multibyte): eliminate mb_char2cells alias for utf_char2cells
2021-11-14 12:49:09 +01:00
Björn Linse
77c54fc995
Merge pull request #16155 from zeertzjq/fix-redr-border-corruption
...
fix(float): fix potential heap corruption in win_redr_border
2021-11-06 22:32:28 +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
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
zeertzjq
de670f3809
fix(float): fix potential heap corruption in win_redr_border
2021-10-28 06:32:36 +08:00
Björn Linse
c8882ca7e7
refactor(api): move extmark API to its own file
2021-10-25 22:33:40 +02:00
Jan Edmund Lazo
bb9e6a1583
Merge pull request #16111 from dundargoc/vim-patch/comments
...
vim-patch:8.1.2368,8.1.2378,8.1.2379,8.1.2380,8.1.2387,8.1.2388,8.1.2392,8.1.2394,8.1.2395,8.1.2396
2021-10-23 13:05:19 -04:00
Björn Linse
8d7816cf27
feat(decorations): support more than one virt_lines block
2021-10-23 14:17:09 +02:00
Dundar Göc
daf670dde6
vim-patch:8.1.2394: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
63d9e730f7
2021-10-21 12:07:14 +02:00
Dundar Göc
6059784770
refactor: remove space after star
2021-10-19 15:20:33 +02:00
Famiu Haque
9086938f7b
feat(api): evaluate statusline string #16020
...
Adds API function `nvim_eval_statusline` to allow evaluating a
statusline string and obtaining information regarding it.
Closes https://github.com/neovim/neovim/issues/15849
2021-10-18 12:44:17 -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
Dundar Göc
41d3b98deb
vim-patch:8.1.2394: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
63d9e730f7
2021-10-06 11:50:10 +02:00
dundargoc
9c268263b1
refactor: format with uncrustify #15842
...
* refactor: format with uncrustify
* refactor: convert function comments to doxygen
2021-10-02 07:59:41 -07:00