Justin M. Keyes
ae846b41df
vim-patch:8.0.1496: VIM_CLEAR()
...
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629 )
vim-patch:8.0.1481
2019-05-25 10:07:05 +02:00
Jan Edmund Lazo
4aad4c0533
vim-patch:8.0.1513: the jumplist is not always properly cleaned up
...
Problem: The jumplist is not always properly cleaned up.
Solution: Call fname2fnum() before cleanup_jumplist(). (Yegappan Lakshmanan)
4867974137
2019-05-19 23:15:47 -04:00
Jan Edmund Lazo
d6d9596b38
vim-patch:8.0.1498: getjumplist() returns duplicate entries
...
Problem: Getjumplist() returns duplicate entries. (lacygoill)
Solution: Call cleanup_jumplist(). (Yegappan Lakshmanan)
a7e18d237f
2019-05-19 23:15:47 -04:00
Marco Hinz
773bdd41ec
options: avoid using empty 'shadafile'
...
References https://github.com/neovim/neovim/pull/9907
Fixes https://github.com/neovim/neovim/issues/9912
2019-04-16 20:00:32 +02:00
Justin M. Keyes
aa82f8b88f
vim-patch:8.0.0716: "--clean", 'shadafile' #9907
...
Nvim notes:
- Nvim does not support "-u DEFAULTS", that change is omitted.
- Also add 'shadafile' as an alias to 'viminfofile'.
- Deprecate 'viminfofile'.
Problem: Not easy to start Vim cleanly without changing the viminfo file.
Not possible to know whether the -i command line flag was used.
Solution: Add the --clean command line argument. Add the 'viminfofile'
option. Add "-u DEFAULTS".
c4da113ef9
2019-04-15 21:15:36 +02:00
Abdelhakeem Osama
35362495c9
jumplist: avoid extra tail entry #9805
...
fixes #9775
2019-04-02 00:50:28 +02:00
Justin M. Keyes
94fc3e0182
clang/"null passed to nonnull arg": shada.c
2019-01-13 17:03:55 +01:00
Justin M. Keyes
423b6d9907
PVS/V535: shada.c: variable reassigned in inner loop
...
False positive: `i` is intentionally, temporarily reassigned.
See a70fde1b45
#9425
2019-01-04 02:29:31 +01:00
Justin M. Keyes
a70fde1b45
build: enable -Wshadow
...
Note about shada.c:
- shada_read_next_item_start was intentionally shadowing `unpacked` and
`i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly
depended on those variable names.
- Macros were changed to parameterize `unpacked` (but not `i`). Macros
like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other
approach is messy.
2019-01-02 21:06:37 +01:00
MichaHoffmann
8cb04c2230
fixed lint errors
2018-09-24 22:05:01 +02:00
MichaHoffmann
affef0aab8
add func_attr_printf in :
...
log.c
message.c
strings.c
fixed some printf warnings in:
src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
2018-09-24 21:28:04 +02:00
Justin M. Keyes
a02d22cca8
IO: shada should respect 'fsync' option
...
shada_write_file() is called on exit (:quit and friends), this can be
very slow.
Note: AFAICT Vim (do_viminfo()) does not appear to fsync() viminfo.
2018-04-21 12:50:28 +02:00
ZyX
bdf5f57989
shada: Fix conversion warnings
2018-04-01 23:37:23 +03:00
ZyX
dd1b493f75
shada: Fix some memory leaks and completely ignore numbered mark names
...
Problems:
- In two places in shada_read_when_writing() memory just was not freed. Both
places were verified to cause test failures.
- Numbered marks got assigned incorrect (off-by-one compared to position in the
array) numbers in replace_numbered_mark.
- It was possible to have non-continuously populated array of numbered marks
which messed up code for merging them.
(Note about tests: marks with additional data are always compared different when
merging, that caused some confusion regarding why test did not work the way
I expected.)
2018-04-01 21:29:47 +03:00
ZyX
f5373e2cdc
shada: Add functions to format ShaDa entries for debugging purposes
...
To be used in debugging printfs.
2018-04-01 21:23:43 +03:00
ZyX
200898546e
shada: When storing numeric marks reset the numbers
...
Attempt to fix observed crash. Crash currently not reproduced.
2018-04-01 20:05:19 +03:00
ZyX
3df11cfbca
Revert "shada: In place of ignoring cursor position with lnum 0 save with 1"
...
This reverts commit aa728798b4
.
2018-03-27 03:03:02 +03:00
ZyX
aa728798b4
shada: In place of ignoring cursor position with lnum 0 save with 1
2018-03-27 01:35:21 +03:00
ZyX
30e7fb2e32
shada: Also filter out invalid cursor position when writing '0' mark
...
Based on https://github.com/neovim/neovim/pull/5908#issuecomment-375909903 , but
with adjusted condition as line number or column less then zero should not
appear at all based on what I know.
2018-03-27 01:33:59 +03:00
ZyX
7941aaa3bf
macros: Rename LAST_ARRAY_ENTRY to ARRAY_LAST_ENTRY
2018-03-27 01:33:59 +03:00
ZyX
0bfc91be96
shada: Make ignore_buf also inline
2018-03-27 01:33:59 +03:00
ZyX
607e0d2202
shada: Save numbered marks
...
Problems so far:
- Marks in the current instance are not adjusted.
- Duplicates are not removed (not that it works in Vim either now, not at
8.0.134 at least).
2018-03-26 00:38:29 +03:00
Justin M. Keyes
7ae4144208
refactor/rename: path_try_shorten_fname()
2018-03-24 14:17:40 +01:00
Daniel Hahler
f588113191
shada: fix typo ( #8066 )
2018-02-25 20:14:32 +01:00
ZyX
9ea1752d60
*: Provide list length when allocating lists
2018-01-14 01:33:16 +03:00
ZyX
6b45dbca04
mark: Make sure that jumplist item will not have zero lnum
...
Fixes #7169
2017-12-24 00:32:43 +03:00
ZyX
f4132fb38b
*: Fix linter errors
2017-12-11 10:19:20 +03:00
ZyX
ac4bbf55f6
*: Hide list implementation in other files as well
2017-12-10 22:04:43 +03:00
ZyX
63f72ac27c
shada: Fix linter error
2017-07-04 17:47:45 +03:00
ZyX
91b9ad7d82
shada: Make sure that code does not attempt to read too long items
...
Fixes #6957
2017-07-04 15:41:59 +03:00
AdnoC
2f2eeb19ba
shada: Add default value for is_unnamed
2017-05-31 13:31:06 -04:00
AdnoC
0c3dea5c4d
style/lint
2017-05-31 13:31:01 -04:00
AdnoC
336412e1db
shada/linting: Moved some code out of shada_write.
...
shada_write was too long (over 500 lines) and caused a linting error.
Register initialization was moved to its own function in order to save lines.
2017-05-31 13:19:09 -04:00
AdnoC
a00b03d03f
shada: Set the unnamed register to the previous unnamed register on startup
2017-05-31 13:18:59 -04:00
ZyX
b2265a0977
shada: Fix V581: adjacent branches with same condition
2017-05-20 04:29:54 +03:00
James McCoy
5ec72aadbf
*: Use __attribute__((fallthrough)) where comments aren't supported
...
Although GCC now detects possibly unintentional fall through, there
rules around which the comments are detected are rather strict. In
cases where a comment isn't detected, upstream [recommends] using their
fallthrough attribute.
[recommends]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817#c11
2017-05-12 17:07:25 -04:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
7701014b65
*: Remove useless asserts
2017-04-08 20:22:46 +03:00
ZyX
e814695223
eval/*code,shada: Drop support for converting UTF-8 from/to p_enc
...
Not needed any longer since p_enc is always utf-8.
2017-04-08 19:20:41 +03:00
ZyX
b3587a456b
shada: Initialize vimconv_T
2017-04-08 19:00:05 +03:00
ZyX
e586047a53
eval/decode,shada: Do not forget to clean up converters
2017-04-08 19:00:04 +03:00
ZyX
b10880dadc
eval: Make writefile() able to disable fsync()
2017-04-02 22:11:35 +03:00
ZyX
2ad4fba46d
eval: Move copy_tv to eval/typval
2017-03-29 10:08:06 +03:00
ZyX
28dafe3ff0
eval,*: Move get_tv_string to typval.c
...
Function was renamed and changed to return `const char *`.
2017-03-29 10:08:05 +03:00
ZyX
e18a578308
*: Move some dictionary functions to typval.h and use char*
...
Also fixes buffer reusage in setmatches() and complete().
2017-03-29 10:07:42 +03:00
ZyX
fb146e80aa
eval: Split eval.c into smaller files
2017-03-29 10:05:06 +03:00
ZyX
5ac5c7971c
coverity/133898: Fix sizeof argument
2017-01-23 02:16:16 +03:00
James McCoy
492f2cfeff
vim-patch:7.4.1925
...
Problem: Viminfo does not merge file marks properly.
Solution: Use a timestamp. Add the :clearjumps command.
2d35899721
2017-01-09 20:23:41 -05:00
ZyX
10d9c6d813
shada: Mark ALWAYS_INLINE function as inline
2017-01-06 01:47:07 +03:00
ZyX
ac50971f87
shada: Move setpcmark()/cleanup_jumplist() out of the cycle
2017-01-04 16:55:28 +03:00