zeertzjq
9ab9eb1220
fix(source): make changing 'shellslash' change expand() result
2022-08-15 10:14:53 +08:00
zeertzjq
d6a6adf708
vim-patch:8.2.1658: expand('<stack>') has trailing ".."
...
Problem: Expand('<stack>') has trailing "..".
Solution: Remove the "..". (closes vim/vim#6927 )
https://github.com/vim/vim/commit/a810db3f17d477e057059c72062c08fd97bcea43
2022-08-15 10:14:53 +08:00
zeertzjq
ed65724e57
vim-patch:8.2.1653: expand('<stack>') does not include the final line number
...
Problem: Expand('<stack>') does not include the final line number.
Solution: Add the line nuber. (closes vim/vim#6927 )
https://github.com/vim/vim/commit/4f25b1aba050b85fa97ca2316aa04dd4b0b22530
2022-08-15 10:14:53 +08:00
zeertzjq
98ab0bb5f7
vim-patch:8.2.1297: when a test fails it's often not easy to see where
...
Problem: When a test fails it's often not easy to see what the call stack
is.
Solution: Add more entries from the call stack in the exception message.
https://github.com/vim/vim/commit/a5d0423fa16f18b4576a2a07e50034e489587a7d
Use docs from latest Vim.
2022-08-15 10:14:52 +08:00
zeertzjq
1c164689a4
refactor: move menu non-symbols to menu_defs.h ( #19778 )
2022-08-15 10:04:05 +08:00
zeertzjq
d3569e8337
vim-patch:8.1.1960: fold code is spread out ( #19777 )
...
Problem: Fold code is spread out.
Solution: Move fold functions to fold.c.
https://github.com/vim/vim/commit/db022f3ffb57c5ff4b97b4e93a994d11e4c10466
2022-08-15 06:33:30 +08:00
zeertzjq
41d6b8a6d0
vim-patch:9.0.0207: stacktrace not shown when debugging ( #19776 )
...
Problem: Stacktrace not shown when debugging.
Solution: Set msg_scroll in msg_source(). (closes vim/vim#10917 )
https://github.com/vim/vim/commit/28c162f6f1f525882a9a60f10ab4836dee7eb59f
2022-08-15 06:01:38 +08:00
Lewis Russell and zeertzjq
47aba12593
refactor(eval/funcs.c): resolve all clint errors
...
... and tidy up local variable declarations
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-08-14 15:51:03 +01:00
zeertzjq
b1faf5f0b9
vim-patch:8.2.4249: the timeout limit for spell suggestions is always 5000 ( #19769 )
...
Problem: The timeout limit for spell suggestions is always 5000 milli
seconds.
Solution: Add the "timeout" entry to 'spellsuggest'.
https://github.com/vim/vim/commit/585ee07cfef307b2fc828537e0d31fdc22d7e79f
2022-08-14 19:11:36 +08:00
zeertzjq
c77cce615b
vim-patch:8.1.2081: the spell.c file is too big ( #19767 )
...
Problem: The spell.c file is too big.
Solution: Move the code for spell suggestions to a separate file. (Yegappan
Lakshmanan, closes vim/vim#4988 )
https://github.com/vim/vim/commit/46a426c9acfdd3d6c0fa134a17681634b9325bee
2022-08-14 18:30:37 +08:00
zeertzjq
c96020b2bf
vim-patch:8.2.3675 ( #19766 )
...
vim-patch:8.2.3675: using freed memory when vim_strsave() fails
Problem: Using freed memory when vim_strsave() fails.
Solution: Clear "last_sourcing_name". Check for msg_source() called
recursively. (closes vim/vim#8217 )
https://github.com/vim/vim/commit/ba8c92687d53c91bbc20c867a49e0988819ea2d5
Although xstrdup() cannot fail in Nvim, it may still be possible that an
error appears (e.g. in regexp engine) when printing the message.
2022-08-14 15:15:43 +08:00
zeertzjq
fa8fde99e6
vim-patch:9.0.0203: confusing variable name ( #19762 )
...
Problem: Confusing variable name.
Solution: Use "prim_aep" instead of "spell_aep".
https://github.com/vim/vim/commit/c9b6570fab46bf2c246a954cfb8c0d95fe2746b3
2022-08-14 06:19:12 +08:00
zeertzjq
1ca2247639
vim-patch:8.2.0823: Vim9: script reload test is disabled
...
Problem: Vim9: script reload test is disabled.
Solution: Compile a function in the context of the script where it was
defined. Set execution stack for compiled function. Add a test
that an error is reported for the right file/function.
https://github.com/vim/vim/commit/25e0f5863e9010a75a1ff0d04e8f886403968755
Omit stack_top_is_ufunc(): only used by Vim9 script.
2022-08-14 04:29:44 +08:00
zeertzjq
a10a23aae9
vim-patch:8.2.0097: crash with autocommand and spellfile
...
Problem: Crash with autocommand and spellfile. (Tim Pope)
Solution: Do not pop exestack when not pushed. (closes vim/vim#5450 )
https://github.com/vim/vim/commit/ce6db0273f2c4359f48d75103a42991aa481f14e
2022-08-14 04:29:44 +08:00
zeertzjq
3a8b859147
vim-patch:8.2.0078: expanding <sfile> works differently the second time
...
Problem: Expanding <sfile> works differently the second time.
Solution: Keep the expanded name when redefining a function. (closes vim/vim#5425 )
https://github.com/vim/vim/commit/b9adef79eca6f95bc7376ff3a6a383e436c5d6ea
2022-08-14 04:29:44 +08:00
zeertzjq
de72f9098a
vim-patch:8.2.0061: the execute stack can grow big and never shrinks
...
Problem: The execute stack can grow big and never shrinks.
Solution: Reduce the size in gargage collect.
https://github.com/vim/vim/commit/3fbcc128cbd2311819cc5a7bb89e45669860f008
2022-08-14 04:29:44 +08:00
zeertzjq and VVKot
ded2925b40
refactor: change remaining sourcing_name/sourcing_lnum to exestack
...
Co-Authored-By: VVKot <volodymyr.kot.ua@gmail.com >
2022-08-14 04:29:44 +08:00
zeertzjq
f52c236c5b
vim-patch:8.2.0056: execution stack is incomplete and inefficient
...
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506
Omit test_debugger.vim: superseded by later patches.
Omit check_map_keycodes(): N/A.
Omit kword_test.c: N/A (converted to a unit test).
2022-08-14 04:29:44 +08:00
c1cbe3fb3d
refactor(screen.c): resolve all clint errors ( #19754 )
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
Co-authored-by: Christian Clason <c.clason@uni-graz.at >
2022-08-13 16:59:15 +02:00
zeertzjq
3cf629022b
vim-patch:9.0.0198: ml_get error when switching buffer in Visual mode ( #19756 )
...
Problem: ml_get error when switching buffer in Visual mode.
Solution: End Visual mode when switching buffer. (closes vim/vim#10902 )
https://github.com/vim/vim/commit/cfeb8a584be11758cf71ae02f6c937b06d6bb66f
2022-08-13 21:47:52 +08:00
zeertzjq
02a4974418
vim-patch:7.4.1168 ( #19645 )
...
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay
Pavlov)
Solution: Make the string "v:true" instead of "true".
https://github.com/vim/vim/commit/f48aa160fdd7b8caa7678e1a2139244dd2bdc547
2022-08-13 21:31:00 +08:00
Christian Clason
33b49d5f55
vim-patch:9.0.0197: astro files are not detected ( #19755 )
...
Problem: Astro files are not detected.
Solution: Add a pattern to match Astro files. (Emilia Zapata, closes vim/vim#10904 )
https://github.com/vim/vim/commit/6a76e84f555da6d9ee57db80143e1e5eb85535ff
2022-08-13 15:11:03 +02:00
bfredl
33f4ba7379
fix(winbar): do not always assume cursor is valid. fixes #19458
2022-08-13 10:45:21 +02:00
Christian Clason
a850b15e19
vim-patch:9.0.0195: metafun files are not recogized ( #19746 )
...
Problem: Metafun files are not recogized.
Solution: Add filetype detection patterns.
https://github.com/vim/vim/commit/9032b9ceb6073288d75386dbcbd9d1982fa24080
2022-08-13 10:26:12 +02:00
zeertzjq
1de62b9ea1
fix(charclass): make behavior with empty str match latest Vim ( #19749 )
...
Later Vim patches changed to return 0 for empty string and null string.
Also update setcellwidth() docs to match latest Vim.
2022-08-13 12:25:01 +08:00
zeertzjq
754892e59d
vim-patch:8.2.{1536,1540}: charclass() ( #19748 )
...
vim-patch:8.2.1536: cannot get the class of a character; emoji widths are wrong
Problem: Cannot get the class of a character; emoji widths are wrong in
some environments.
Solution: Add charclass(). Update some emoji widths. Add script to check
emoji widths.
https://github.com/vim/vim/commit/4e4473c927167fd24e5c8df90e0e8035080cf2da
Use latest charclass() docs from Vim.
Rewrite DoIt() in emoji_list.vim in Lua.
Omit emoji table updates:
- emoji_width update looks wrong as these added ranges are only double-width when followed by 0xFE0F.
- Other updates are too old.
vim-patch:8.2.1540: the user cannot try out emoji character widths
Problem: The user cannot try out emoji character widths.
Solution: Move the emoji script to the runtime/tools directory.
https://github.com/vim/vim/commit/98945560c1ae6e2ddee820a7de718a36e3f4b6e5
2022-08-13 11:29:38 +08:00
zeertzjq
6f14c5d2dd
refactor: remove some unused includes ( #19747 )
...
- Remove autocmd.h from fileio.h
- Remove normal.h from main.h
- Move bufinfo_T from undo_defs.h to undo.c
2022-08-13 08:59:11 +08:00
zeertzjq
342d18b91e
refactor: remove some unused includes ( #19740 )
...
Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other
headers.
2022-08-12 21:16:28 +08:00
Dundar Goc
094cdf2d69
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-12 14:22:02 +02:00
zeertzjq
f79773a3b4
refactor: move non-symbols in ex_eval.h to ex_eval_defs.h ( #19739 )
...
This avoids including ex_eval.h in any other header, thus preventing
future circular includes.
2022-08-12 19:16:24 +08:00
zeertzjq
103f10d901
refactor: move code dealing with script files to runtime.c ( #19734 )
...
vim-patch:8.1.1927: code for dealing with script files is spread out
Problem: Code for dealing with script files is spread out.
Solution: Move the code to scriptfile.c. (Yegappan Lakshmanan, closes vim/vim#4861 )
https://github.com/vim/vim/commit/307c5a5bb77c3728dfab06c30e9f786309c63f74
2022-08-12 15:41:43 +08:00
zeertzjq
a93d29589a
vim-patch:8.1.1689: profiling code is spread out
...
Problem: Profiling code is spread out.
Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan,
closes vim/vim#4668 )
https://github.com/vim/vim/commit/660a10ad41c14363326f83451c3c425201923119
2022-08-12 14:15:03 +08:00
zeertzjq
c7ca94ba7f
vim-patch:8.1.1684: profiling functionality is spread out
...
Problem: Profiling functionality is spread out.
Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan,
closes vim/vim#4666 )
https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa
Move proftime_T to types.h for now to avoid recursive #include.
2022-08-12 13:44:37 +08:00
Lewis Russell
a27756cc24
fix(signs): priority of extmark signs ( #19718 )
2022-08-11 17:26:17 +01:00
zeertzjq
94c3176478
refactor: use CLEAR_FIELD and CLEAR_POINTER macros ( #19709 )
...
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
2022-08-11 15:44:55 +08:00
bfredl
faccae47fc
fix(mpack): make sure a bool always is a bool
...
before, RelWithDebInfo linking gave this warning:
src/mpack/conv.h:36:16: warning: type of ‘mpack_unpack_boolean’ does not match original declaration [-Wlto-type-mismatch]
36 | MPACK_API bool mpack_unpack_boolean(mpack_token_t t) FUNUSED FPURE;
| ^
src/mpack/conv.c:196:16: note: return value type mismatch
196 | MPACK_API bool mpack_unpack_boolean(mpack_token_t t)
| ^
2022-08-10 20:36:28 +02:00
Jonas Strittmatter
ff1266aaaa
vim-patch:9.0.0182: quarto files are not recognized ( #19702 )
...
Problem: Quarto files are not recognized.
Solution: Recognize quarto files by the extension. (Jonas Strittmatter,
closes vim/vim#10880 )
https://github.com/vim/vim/commit/3a9687fb2749cb3da6e3bbf60cb9eaa81f7889ae
2022-08-10 13:44:57 +02:00
Famiu Haque
78658ef383
fix(api): vim.cmd.make crashes when argument count isn't 1 ( #19701 )
...
Closes #19696
2022-08-10 18:37:59 +08:00
zeertzjq
3030b4d653
feat(tui): allow grid and host to disagree on ambiguous-width chars ( #19686 )
...
Note: This only applies to ambiguous-width characters.
2022-08-09 21:08:46 +08:00
zeertzjq
24bf0490ea
vim-patch:9.0.0176: checking character options is duplicated and incomplete ( #19690 )
...
Problem: Checking character options is duplicated and incomplete.
Solution: Move checking to check_chars_options(). (closes vim/vim#10863 )
https://github.com/vim/vim/commit/8ca29b6a3599b82b8822b7697cad63d0244c2d59
2022-08-09 20:35:34 +08:00
zeertzjq
cd14efd281
vim-patch:8.1.1823: command line history code is spread out ( #19688 )
...
Problem: Command line history code is spread out.
Solution: Put the code in a new file. (Yegappan Lakshmanan, closes vim/vim#4779 )
Also graduate the +cmdline_hist feature.
https://github.com/vim/vim/commit/d7663c22c6c1ff0f86b81371586fbc851d3a3e9e
2022-08-09 17:13:44 +08:00
zeertzjq
603f7bd253
fix(fillchars): change fallback after setcellwidths()
2022-08-08 20:03:40 +08:00
zeertzjq
9fedb6fd78
vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid
...
Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution: Check the value and give an error. (closes vim/vim#9024 )
https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673
Cherry-pick f_setcellwidths() change from patch 9.0.0036.
Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
2022-08-08 20:03:40 +08:00
zeertzjq
01a7009af9
refactor(setcellwidths): use TV_LIST_ITEM_NEXT properly
2022-08-08 20:03:40 +08:00
zeertzjq
967415d527
vim-patch:8.2.1537: memory acccess error when using setcellwidths()
...
Problem: Memory acccess error when using setcellwidths().
Solution: Use array and pointers correctly.
https://github.com/vim/vim/commit/b06a6d59d12dbd67d55b3c46f6e5547e9103c931
2022-08-08 20:03:40 +08:00
zeertzjq and delphinus
53c9500c1d
vim-patch:8.2.1535: it is not possible to specify cell widths of characters
...
Problem: It is not possible to specify cell widths of characters.
Solution: Add setcellwidths().
https://github.com/vim/vim/commit/08aac3c6192f0103cb87e280270a32b50e653be1
Co-Authored-By: delphinus <me@delphinus.dev >
2022-08-08 20:03:40 +08:00
zeertzjq
bc8fbb7c1d
refactor: move non-symbols in mbyte.h to mbyte_defs.h
...
This just avoids including mbyte.h in eval/typval.h, so that mbyte.h can
include eval/typval.h in Vim patch 8.2.1535.
2022-08-08 20:03:40 +08:00
zeertzjq
18766e742b
fix(folds): fix fold remains when :delete makes buffer empty ( #19673 )
2022-08-08 06:07:59 +08:00
zeertzjq
629169462a
fix(terminal): skip aucmd_win when checking terminal size ( #19668 )
2022-08-07 19:43:29 +08:00
zeertzjq
fa8b2b4c50
vim-patch:8.2.4492: no error if an option is given a value with ":let &opt = val" ( #19670 )
...
Problem: No error if an option is given an invalid value with
":let &opt = val".
Solution: Give the error. (closes vim/vim#9864 )
https://github.com/vim/vim/commit/8ccbbeb620dcc73154de29c51100fe815cefe109
2022-08-07 17:11:03 +08:00