| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some notes:
- Replaced msgpack_unpacker usage with regular xmalloc’ed buffer. Also since
msgpack_unpack_next (as well as msgpack_unpacker_next) is not ever going to
return MSGPACK_UNPACK_EXTRA_BYTES this condition was checked manually.
Function that does return this status is msgpack_unpack, but it is marked as
obsolete.
- Zero type is checked prior to main switch in shada_read_next_item because
otherwise check would be skipped.
- Zeroing entry at the start of shada_read_next_item makes it safer.
- dedent('') does not work.
- v:oldfiles list is only replaced with bang, if it is NULL or empty.
|
| |
| |
| |
| | |
Now all keys are defined in a way that makes it easy to redefine if needed.
|
| |
| |
| |
| | |
It is already handled by libuv which is used by os_open.
|
| |
| |
| |
| |
| | |
Unlike some wrapper functions it is not used actually, so no need to export it.
Also removed ShadaPosition typedef which was not used.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Notes:
- E136 code greatly changed its meaning: now it is write error and not read
error.
- E195 was removed because shada_read_everything will already do all the
necessary error reporting.
- E886 can be reported by both :rshada and :wshada, but :rshada comes first and
AFAIR it is the only error which is not E575 and can be reported by :rshada.
|
| |
| |
| |
| |
| |
| |
| | |
According to the manual (POSIX) this is the only case when errno is set by these
functions. This is needed because some functions (e.g. buflist_new) leave errno
set to non-zero value under some conditions (e.g. when opening non-existing
files).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Also fixes the error: when writing shada files existing history items may be
freed.
Warning: valgrind reports some memory leaks.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
As usual, GCC is overparanoid with -Wconversion.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This test can safely be ignored for other kinds of strings, but history string
contains separator after the last NUL byte and string containing NUL byte inside
thus means that separator will be placed at one position, but seeked at
another.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
kShaDaWantMarks now loads only local file change list and file-local marks.
kShaDaWantInfo now loads global marks and jump list.
|
| | |
|
| |
| |
| |
| |
| | |
Should be faster then constantly running shada_removable for each buffer many
times.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Currently only merges history when reading ShaDa file. No tests yet.
|
| |
| |
| |
| | |
Avoids unneeded malloc()s/free()s and lots of code for parsing.
|
| |
| |
| |
| |
| | |
I do not know why marks were not read originally, but without this change marks
are not going to be read at startup when Vim starts without arguments.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
|
| |
| |
| |
| | |
Caused by using memcpy for assigning one structure to another.
|
| |
| |
| |
| | |
It is not needed to know that os/* uses libuv.
|
|/
|
|
|
|
| |
This is required to have <esc> working correctly when the
`ttimeout`/`ttimeoutlen` options are set. Ref:
https://github.com/neovim/neovim/issues/2093#issuecomment-146506480
|
| |
|
|
|
|
| |
Closes #3399
|
| |
|
|
|
|
|
|
|
|
|
| |
Using the `curbuf->terminal` condition alone is wrong since it does not
necessarily mean nvim is in terminal mode. It needs to be used with
`State & TERM_FOCUS` because the current buffer could have changed without
`terminal_enter` exiting.
Close #3403
|
|
|
|
|
| |
Take the return value of input_enqueue into consideration, waiting for the main
thread to consume input. Close #1714 #3377.
|
| |
|
|
|
|
|
| |
This allows callers to incrementally process buffers that are filled by
incomplete chunks more easily.
|
|
|
|
|
|
|
| |
Add a new special key that can be used by UIs to toggle the 'paste' option and
use it in the TUI instead of the user's 'pastetoggle' value.
Close #2843 #2092
|
|
|
|
|
|
|
| |
Setting `msg_didout` after `call_shell` is enough as it will cause
`hit_return_msg()` to print on next line.
Close #3269
|