| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- reduce variable scope
- prefer initialization over declaration and assignment
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
|
|
|
|
| |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
|
|
|
|
|
|
|
|
|
|
| |
(#25605)
Problem: Vim9: in script cannot set item in uninitialized list.
Solution: When a list is NULL allocate an empty one. (closes vim/vim#8461)
https://github.com/vim/vim/commit/e65081d1b591f16dc6e380a830d87565c5eb7b03
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
|
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem: reverse() on string doesn't work in compiled function.
Solution: Accept string in argument type check. (Yegappan Lakshmanan,
closes vim/vim#12377)
https://github.com/vim/vim/commit/f9dc278946d52235a0025fd347bd9ff571258470
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(#24757)
Problem: Implementation of some list functions too complicated.
Solution: Refactor do_sort_uniq(), f_count() and extend() (Yegappan
Lakshmanan, closes vim/vim#9378)
https://github.com/vim/vim/commit/d92813a59877c707e4b64bea6d786aad152acb45
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: map() may change the list or dict item type.
Solution: Add mapnew().
https://github.com/vim/vim/commit/ea696852e7abcdebaf7f17a7f23dc90df1f5e2ed
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
| |
followup to #24109
fix #16150
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot assign to range in list.
Solution: Implement overwriting a list range.
https://github.com/vim/vim/commit/4f0884d6e24d1d45ec83fd86b372b403177d3298
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function. Fix that
items(), keys() and values9) return zero for a NULL dict.
Make join() return an empty string for a NULL list. Make sort()
return an empty list for a NULL list.
https://github.com/vim/vim/commit/ef98257593a0abf1300d0f70358dc45a70a62580
Skip f_reverse() change for consistency with other functions.
Skip Test_null_list() and Test_null_dict() because of missing patches.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot use a range with :unlet.
Solution: Implement ISN_UNLETRANGE.
https://github.com/vim/vim/commit/5b5ae29bd3d7b832b6f15320430f7f191e0abd1f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Substitute() accepts a number but not a float expression.
Solution: Also accept a float. (closes vim/vim#8331)
https://github.com/vim/vim/commit/7a2217bedd223df4c8bbebe731bf0b5fe8532533
Vim9script is N/A. No need to port the strict argument and
tv_get_string_buf_chk_strict(), as it's only used for Vim9script.
Like the patch, use vim_snprintf over snprintf, as the "%g" specifier in
snprintf removes the ".0" from integer floats.
This means similiar to numbers, floats are (mostly) convertable to
strings.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
It has not been used for a long time and the likelihood of it still working is
low.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Some functions give two error messages.
Solution: Do not give a second error message. (closes vim/vim#12352)
https://github.com/vim/vim/commit/e4098457ab9c94225b1b0e3c5e06b82b75587971
It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Insufficient testing for assert and test functions.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#11190)
https://github.com/vim/vim/commit/e24b5e0b0f5ab015215ef2761baa98ccb1ba8606
Cherry-pick E1219 from patch 8.2.3229.
Cherry-pick test_assert.vim change from patch 9.0.0491.
Cherry-pick the whole Test_refcount() function and skip it.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)
https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#23480)
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes vim/vim#8632)
https://github.com/vim/vim/commit/a764e73d4ffc5d046807c757eaacb9b0a5408152
Cherry-pick test_assert.vim change from patch 8.2.3229.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Too much indent.
Solution: Return out early from a funtion. (Yegappan Lakshmanan,
close vim/vim#11238)
https://github.com/vim/vim/commit/368aa6908862874fdb901c534ee99033ac977e4a
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: blob index and slice not implemented yet.
Solution: Implement blob index and slice.
https://github.com/vim/vim/commit/cfc3023cb6ce5aaec13f49bc4b821feb05e3fb03
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
vim/vim#7408)
https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a
Cherry-pick a line in docs added later.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Behavior of negative index in list change changed. (Naruhiko
Nishino)
Solution: Only change it for Vim9 script. (closes vim/vim#8749)
https://github.com/vim/vim/commit/92f05f21afdb8a43581554a252cb2fc050f9e03b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
https://github.com/vim/vim/commit/cc673e746ab98566556ff964d7a76f2fb46d7f84
Omit E1024 and E1062: Vim9 script only.
Omit string_slice() and char_idx2byte(): Vim9 script only.
Remove the first tv_is_luafunc() check because it always returns false.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: list slice not supported yet.
Solution: Add support for list slicing.
https://github.com/vim/vim/commit/ed5918771fcf9877d8445e74c62ab1ce6b8e28c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: cannot assign to [var; var].
Solution: Assign rest of items to a list.
https://github.com/vim/vim/commit/9af78769eeae0318e07aa8b6af4d6e2244481ca7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specific (#23315)
Problem: Error message for wrong argument type is not specific.
Solution: Include more information in the error. (Yegappan Lakshmanan,
closes vim/vim#11037)
https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b
Skip reduce() and deepcopy() changes because of missing patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#23309)
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009)
https://github.com/vim/vim/commit/04c4c5746e15884768d2cb41370c3276a196cd4c
Cherry-pick removal of E922 from docs from patch 9.0.1403.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Using null object with execute() has strange effects.
Solution: Give an error message ofr Job and Channel.
https://github.com/vim/vim/commit/e2a8f0773e91685843c062b1e48259712d5f2213
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
https://github.com/vim/vim/commit/92f26c256e06277ff2ec4ce7adea1eb58c85abe0
Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
| |
|
| |
|
|
|
|
| |
message.c functions now take const char * as a format. Error message
definitions can be made const.
|
|
|
|
|
|
|
|
| |
Problem: CTRL-X on 2**64 subtracts two. (James McCoy)
Solution: Correct computation for large number. (closes vim/vim#12103)
https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot use repeat() with a blob.
Solution: Implement blob repeat. (closes vim/vim#11090)
https://github.com/vim/vim/commit/375141e1f80dced9be738568a3418f65813f4a2f
Co-authored-by: Bakudankun <bakudankun@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot manipulate blobs.
Solution: Add blob2list() and list2blob(). (Yegappan Lakshmanan,
closes vim/vim#8868)
https://github.com/vim/vim/commit/5dfe467432638fac2e0156a2f9cd0d9eb569fb39
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: blob operations not tested in all ways.
Solution: Run tests with CheckLegacyAndVim9Success(). Make blob assign with
index work.
https://github.com/vim/vim/commit/51e933261b984db014e858d79387a826d2626fb6
Cherry-pick related changes from patches 8.2.{0633,0634}.
N/A patches for version.c:
vim-patch:8.2.2779: memory access error in remove() for blob
Problem: Memory access error in remove() for blob.
Solution: Adjust length for memmove().
https://github.com/vim/vim/commit/f7e92aae1581203306a340b4c0059cc74adea9d6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|