zeertzjq
2065ce877e
vim-patch:partial:9.0.1196: code is indented more than necessary ( #21796 )
...
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11813 )
e857598896
Partial port as this depends on some previous eval and 'smoothscroll'
patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2023-01-14 21:36:15 +08:00
dundargoc
e89c39d6f0
refactor: replace char_u with char 21 ( #21779 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-14 15:58:28 +08:00
dundargoc
f2141de9e4
refactor: replace char_u with char 20 ( #21714 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-13 07:35:39 +08:00
dundargoc
50f03773f4
refactor: replace char_u with char 18 ( #21237 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-09 22:37:34 +08:00
dundargoc
1492094003
refactor: replace char_u with char 17 - remove STRLCPY ( #21235 )
...
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2023-01-09 21:13:06 +08:00
luukvbaal
2d7599248b
vim-patch:9.0.1089: unnecessary assignment ( #21493 )
...
Problem: unnecessary assignment
Solution: Remove the assignment. (Luuk van Baal, closes vim/vim#11736 )
c53e7904b9
2022-12-23 21:13:58 +08:00
zeertzjq
98695b4999
vim-patch:8.1.1313: warnings for using localtime() and ctime() ( #21229 )
...
Problem: Warnings for using localtime() and ctime().
Solution: Use localtime_r() if available. Avoid using ctime().
63d2555c9c
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2022-11-29 11:48:06 +08:00
zeertzjq
7328c4de54
vim-patch:9.0.0733: use of strftime() is not safe ( #21228 )
...
Problem: Use of strftime() is not safe.
Solution: Check the return value of strftime(). Use a larger buffer and
correctly pass the available space. (Dominique Pellé, closes
vim/vim#11348 )
84d14ccdb5
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com >
2022-11-29 11:18:15 +08:00
dundargoc
3b96ccf7d3
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-11-28 14:53:35 +01:00
Dundar Göc
bd22585061
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-11-26 15:52:21 +01:00
Dundar Göc
40f3f75867
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-11-19 16:27:10 +01:00
zeertzjq
4b7aafc2f4
fix(memline): use long instead of linenr_T for db_line_count
2022-11-17 23:30:56 +08:00
zeertzjq
ec5c1c35c2
vim-patch:8.2.2586: process id may be invalid
...
Problem: Process id may be invalid.
Solution: Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
van der Sanden, closes vim/vim#7947 )
f52f0606ed
test_override() is N/A.
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2022-11-17 20:34:33 +08:00
zeertzjq
8cf38c2fd9
vim-patch:8.2.2026: Coverity warns for possibly using not NUL terminated string
...
Problem: Coverity warns for possibly using not NUL terminated string.
Solution: Put a NUL in b0_hname just in case.
e79cdb69a4
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2022-11-17 18:24:31 +08:00
zeertzjq
abe1dd308e
vim-patch:8.2.1970: it is easy to make mistakes when cleaning up swap files
...
Problem: It is easy to make mistakes when cleaning up swap files after the
system crashed.
Solution: Warn for the process still running after recovery. Do not
automatically delete a swap file created on another system.
(David Fries, closes vim/vim#7273 )
f883508e36
2022-11-17 18:24:21 +08:00
dundargoc
66360675cf
build: allow IWYU to fix includes for all .c files
...
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549 , but doesn't close
it since this only works fully for .c files and not headers.
2022-11-15 10:30:03 +01:00
bfredl
fae7540732
Merge pull request #20821 from dundargoc/refactor/clang-tidy
...
refactor: fix clang-tidy warnings
2022-11-08 09:48:48 +01:00
Lewis Russell
bdb98de2d1
refactor: more clint ( #20910 )
2022-11-07 10:21:44 +00:00
dundargoc
731cdde28e
refactor: fix clang-tidy warnings
...
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
2022-11-06 11:44:10 +01:00
dundargoc
0117c97e62
refactor(clint): convert short to int16_t ( #20815 )
2022-10-27 12:28:16 +08:00
dundargoc
784e498c4a
refactor: clang-tidy fixes to silence clangd warning ( #20683 )
...
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
2022-10-21 20:47:44 +08:00
zeertzjq
585ab2564a
refactor: suppress PVS false positives ( #20264 )
...
Some V512 warnings have changed to V1086, and PVS apparently does not
know `uv_run()` can change `*timeout_expired`.
2022-09-21 06:02:53 +08:00
bfredl
1e5daed676
Merge pull request #20164 from bfredl/luanull
...
fix(lua): make vim.str_utfindex and vim.str_byteindex handle NUL bytes
2022-09-13 23:17:11 +02:00
bfredl
25e4af439f
fix(lua): make vim.str_utfindex and vim.str_byteindex handle NUL bytes
...
fixes #16290
2022-09-13 22:50:22 +02:00
Lewis Russell
8eabbacf22
refactor(memline): resolve clint errors
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-09-13 10:35:52 +01:00
Dundar Göc
3ff46544c9
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-11 13:28:59 +02:00
Dundar Göc
684bc749ef
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-10 11:17:40 +02:00
Dundar Göc
c5322e752e
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-09 21:02:42 +02:00
Dundar Göc
73207cae61
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-06 16:44:37 +02:00
dundargoc
12afc344de
refactor: migrate comment style 2 #20080
2022-09-06 07:23:00 -07:00
Lewis Russell
1ffd527c83
refactor: migrate comment style ( #20012 )
...
Done automatically using the following perl command:
perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-09-02 17:39:49 +01:00
Dundar Göc
49e893f296
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-09-01 10:47:42 +02:00
Dundar Göc
fb1edb2f57
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-31 13:47:18 +02:00
dundargoc
2828aae7b4
refactor: replace char_u with char 4 ( #19987 )
...
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-08-30 14:52:09 +02:00
zeertzjq
f58a979599
vim-patch:9.0.0318: clearing screen causes flicker ( #19993 )
...
Problem: Clearing screen causes flicker.
Solution: Do not clear but redraw in more cases. Add () to "wait_return".
13608d851a
Only 2 lines of actual code change.
2022-08-30 06:26:06 +08:00
Dundar Göc
58f30a326f
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-29 15:48:56 +02:00
Dundar Göc
691f4715c0
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-27 17:59:43 +02:00
Dundar Göc
3952770360
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-26 22:24:28 +02:00
Lewis Russell
2498e9feb0
refactor: change FALSE/TRUE to false/true
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-08-26 09:36:55 +01:00
Dundar Goc
40855b0143
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-08-25 18:59:12 +02:00
Lewis Russell
93f24403f8
refactor: pre-incr to post-incr
2022-08-25 13:10:41 +01:00
zeertzjq
6cc6e11929
vim-patch:9.0.0206: redraw flags are not named specifically ( #19913 )
...
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
a4d158b3c8
2022-08-23 22:00:19 +08:00
zeertzjq
2bed0d1d97
vim-patch:8.2.4753: error from setting an option is silently ignored ( #19888 )
...
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
31e5c60a68
2022-08-22 13:56:50 +08:00
Lewis Russell
51063a90df
vim-patch:8.1.2057: the screen.c file is much too big
...
Problem: The screen.c file is much too big.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943 )
7528d1f6b5
This is an approximation vim-patch 8.1.2057. Applying the patch directly
isn't feasible since our version of screen.c has diverged too much,
however we still introduce drawscreen.c and drawline.c:
- screen.c is now a much smaller file used for low level screen functions
- drawline.c contains everything needed for win_line()
- drawscreen.c contains everything needed for update_screen()
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-08-19 10:01:40 +01:00
Lewis Russell
542fa8a9cc
refactor: change pre-decrement/increment to post ( #19799 )
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-08-16 12:26:08 +01: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
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
Dundar Goc
824a729628
refactor: replace char_u with char
...
Work on https://github.com/neovim/neovim/issues/459
2022-07-31 00:52:59 +02:00
Lewis Russell
d73c31a41f
Merge pull request #19167 from dundargoc/refactor/conversion
...
refactor: enable -Wconversion warning for memline.c
2022-07-18 20:22:18 +01:00
zeertzjq
8ce60ddd07
vim-patch:8.2.4399: crash after ml_get error
...
Problem: Crash after ml_get error.
Solution: When returning "???" flush the line and set ml_line_lnum.
f9435e49ef
2022-07-07 08:10:53 +08:00