zeertzjq
6e69a3c3e7
refactor: remove CSI unescaping and clean up related names and comments
2022-01-21 18:08:56 +08:00
zeertzjq
aa4eadd2be
vim-patch:8.2.0128: cannot list options one per line
...
Problem: Cannot list options one per line.
Solution: Use ":set!" to list one option per line.
6b915c0c0e
2022-01-20 14:34:24 +08:00
Gregory Anders
de6f9233ee
refactor: source ftplugin.vim separately from filetype.vim ( #17129 )
...
This is a follow-on to #17040 . The real benefit of #17040 was ensuring
that the ftplugin FileType autocommand was defined first and thus always
fired first. A side effect of the implementation in #17040 was that
setting variables that modified the state of filetype detection (such as
g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the
user's init file. Filetype detection can also no longer be prevented
from loading by using `:filetype off`.
This PR addresses both of those side effects by unconditionally sourcing
ftplugin.vim and indent.vim before the user's init file (which ensures
that these autocommands run first) and sourcing filetype.vim *after* the
user's init file (thus allowing it to be blocked or modified).
2022-01-18 12:46:41 -07:00
bfredl
9386fca597
Merge pull request #16848 from dundargoc/refactor/prevent-overflow-by-casting
...
refactor: avoid overflow by explicitly casting operand to a wider type
2022-01-08 16:47:23 +01:00
zeertzjq
30547c0d2b
vim-patch:8.2.3999: redundant check for NUL byte
...
Problem: Redundant check for NUL byte.
Solution: Remove the check for a NUL byte. (closes vim/vim#9471 )
c024ed9233
2022-01-05 22:11:28 +08:00
zeertzjq
bfe11dc8d0
vim-patch:8.2.3414: fullcommand() gives wrong name with buffer-local user command
...
Problem: fullcommand() gives the wrong name if there is a buffer-local user
command. (Naohiro Ono)
Solution: Use a separate function to get the user command name.
(closes vim/vim#8840 )
80c88eac5a
2022-01-05 22:11:28 +08:00
zeertzjq
6e1a59da6c
vim-patch:8.2.2887: crash when passing null string to fullcommand()
...
Problem: Crash when passing null string to fullcommand().
Solution: Check for NULL pointer. (closes vim/vim#8256 )
4c8e8c6e19
2022-01-05 22:11:28 +08:00
Gregory Anders
3fd454bd4a
feat: filetype.lua ( #16600 )
...
Adds a new vim.filetype module that provides support for filetype detection in
Lua.
2022-01-04 07:28:29 -07:00
Dundar Göc
3fccdeb326
chore(fixup): bfredl size_t
2022-01-01 02:55:34 +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
Björn Linse
7bb593169e
Merge pull request #16752 from gpanders/lua-user-commands
...
feat(api): implement nvim_{add,del}_user_command
2021-12-28 23:18:07 +01:00
Gregory Anders
eff11b3c3f
feat(api): implement nvim_{add,del}_user_command
...
Add support for adding and removing custom user commands with the Nvim
API.
2021-12-28 14:08:44 -07: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
Jan Edmund Lazo
9dd8557921
Merge pull request #16774 from zeertzjq/vim-8.2.2468
...
vim-patch:8.2.2468: not easy to get the full command name from a shortened one
2021-12-25 23:26:59 -05:00
zeertzjq
599a3d6abd
fixup! vim-patch:8.2.2468: not easy to get the full command name from a shortened one
2021-12-26 11:25:57 +08:00
zeertzjq
42cf76fd0a
vim-patch:8.2.3780: ":cd" works differently on MS-Windows
...
Problem: ":cd" works differently on MS-Windows.
Solution: Add the 'cdhome' option. (closes vim/vim#9324 )
29f3a45915
2021-12-25 11:31:54 +08:00
zeertzjq
8eff0ca6d5
vim-patch:8.2.2468: not easy to get the full command name from a shortened one
...
Problem: Not easy to get the full command name from a shortened one.
Solution: Add fullcommand(). (Martin Tournoij, closes vim/vim#7777 )
038e09ee76
2021-12-25 07:42:06 +08:00
zeertzjq
09c412837f
refactor: remove some chdir-related unnecessary calls and checks
...
xmalloc() always retuns a valid pointer.
Calling os_chdir() with the same directory as the current one doesn't do
anything other than wasting time.
2021-12-20 18:58:13 +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
51822f0655
refactor(misc1): move out autocmd related functions
2021-12-09 21:10:58 +01:00
Jan Edmund Lazo
523f03b506
lint ( #16526 )
2021-12-05 23:33:22 -05:00
Jan Edmund Lazo
828bf128a6
Merge pull request #15840 from vimpostor/vim-8.2.3430
...
vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
2021-11-30 22:13:50 -05:00
zeertzjq
36565c9da2
vim-patch:8.2.2350: using "void" for no reason ( #16410 )
...
Problem: Using "void" for no reason.
Solution: Use "char *".
033135eb8e
2021-11-30 21:34:33 -05:00
Jan Edmund Lazo
0d967f0298
Merge pull request #16362 from zeertzjq/vim-8.2.3617
...
vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
2021-11-21 17:47:09 -05:00
Volodymyr Kot
2bd8f2fb5e
vim-patch:8.1.0753: printf format not checked for semsg() ( #16378 )
...
Problem: printf format not checked for semsg().
Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle,
closes vim/vim#3805 )
b5443cc46d
(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
2021-11-20 13:26:16 +01: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
4785cad8ee
vim-patch:8.2.3617: ":verbose pwd" does not mention 'autochdir' was applied
...
Problem: ":verbose pwd" does not mention 'autochdir' was applied.
Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142 )
0526815c15
2021-11-19 20:07:04 +08:00
Magnus Groß
69bd1e4e36
vim-patch:8.2.3430: no generic way to trigger an autocommand on mode change
...
Problem: No generic way to trigger an autocommand on mode change.
Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856 )
f1e8876fa2
N/A patches for version.c:
vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete
Problem: Function prototype for trigger_modechanged() is incomplete.
Solution: Add "void".
28e591dd50
Fixes #4399 .
Fixes #7416 .
2021-11-18 11:23:18 +01: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
1450a6f753
refactor(macroman): get rid of MB_COPY_CHAR macro
...
clean up docs for MB_PTR_ADV and MB_PTR_BACK
2021-11-14 17:08:50 +01:00
Björn Linse
0039ba04b0
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
2021-11-14 12:49:12 +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
James McCoy
684640f551
vim-patch:8.1.0306: plural messages are not translated properly
...
Problem: Plural messages are not translated properly.
Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin)
da6e8919e7
2021-11-01 06:40:00 -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
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
Christian Clason
eaa03b7181
vim-patch:8.2.3550: completion() does not work properly ( #16112 )
...
* vim-patch:8.2.3550: completion() does not work properly
Problem: completion() does not work properly.
Solution: Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita,
closes vim/vim#9016 )
ae38a9db77
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com >
2021-10-21 17:46:24 +02:00
Dundar Göc
f677ba4dab
vim-patch:8.1.2379: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
217e1b8359
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
Dundar Göc
38dd53c525
refactor: make commas trail in enums
2021-10-19 15:20:33 +02:00
Jan Edmund Lazo
a1e8199fff
Merge pull request #15952 from zeertzjq/vim-8.1.1291
...
vim-patch:8.0.{1459,1460,1461,1463},8.1.{0602,0604,1291},8.2.{0189,0876,0909,1411}: chdir and DirChanged related patches
2021-10-17 10:26:11 -04: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
zeertzjq
6004f9137a
refactor(dirchanged): tab -> tabpage
...
Match Vim's behavior.
2021-10-17 22:04:53 +08:00
zeertzjq
60584c0245
vim-patch:8.2.0909: cannot go back to the previous local directory
...
Problem: Cannot go back to the previous local directory.
Solution: Add "tcd -" and "lcd -". (Yegappan Lakshmanan, closes vim/vim#4362 )
002bc79991
2021-10-17 22:04:53 +08:00
zeertzjq
34cfe74568
vim-patch:8.2.0876: :pwd does not give a hint about the scope of the directory
...
Problem: :pwd does not give a hint about the scope of the directory
Solution: Make ":verbose pwd" show the scope. (Takuya Fujiwara, closes vim/vim#5469 )
950587242c
2021-10-17 22:04:53 +08:00
zeertzjq
b1dd90c760
vim-patch:8.2.0189: cd() with NULL argument crashes
...
Problem: cd() with NULL argument crashes.
Solution: Check for NULL. (Ken Takata, closes vim/vim#5558 )
7cc96923c4
2021-10-17 22:04:53 +08:00
zeertzjq
8727d38012
vim-patch:8.1.1291: not easy to change directory and restore
...
Problem: Not easy to change directory and restore.
Solution: Add the chdir() function. (Yegappan Lakshmanan, closes vim/vim#4358 )
1063f3d200
Also includes some documentation changes from patch 8.1.1218.
2021-10-17 22:04:53 +08:00
zeertzjq
57651df9c1
vim-patch:8.1.0604: autocommand test fails on MS-Windows
...
Problem: Autocommand test fails on MS-Windows.
Solution: Use pathcmp() instead of strcmp() to check if a directory differs.
9eb76af451
2021-10-17 22:04:53 +08:00
zeertzjq
e91dee5c21
vim-patch:8.1.0602: DirChanged is also triggered when directory didn't change
...
Problem: DirChanged is also triggered when the directory didn't change.
(Daniel Hahler)
Solution: Compare the current with the new directory. (closes vim/vim#3697 )
2caad3fbbd
2021-10-17 22:04:53 +08:00