documentation/functests: Replace NeoVim with Neovim

This commit is contained in:
ZyX 2015-08-18 21:20:48 +03:00
parent 0fe11fe70a
commit 48ba2f0109
3 changed files with 29 additions and 29 deletions

View File

@ -991,16 +991,16 @@ MERGING *shada-merging*
{Nvim}
When writing ShaDa files with |:wshada| without bang or at regular exit
information in the existing ShaDa file is merged with information from current
NeoVim instance. For this purpose ShaDa files store timestamps associated
Neovim instance. For this purpose ShaDa files store timestamps associated
with ShaDa entries. Specifically the following is being done:
1. History lines are merged, ordered by timestamp. Maximum amount of items in
ShaDa file is defined by 'shada' option (|shada-/|, |shada-:|, |shada-@|,
etc: one suboption for each character that represents history name
(|:history|)).
2. Local marks and changes for files that were not opened by NeoVim are copied
to new ShaDa file. Marks for files that were opened by NeoVim are merged,
changes to files opened by NeoVim are ignored. |shada-'|
2. Local marks and changes for files that were not opened by Neovim are copied
to new ShaDa file. Marks for files that were opened by Neovim are merged,
changes to files opened by Neovim are ignored. |shada-'|
3. Jump list is merged: jumps are ordered by timestamp, identical jumps
(identical position AND timestamp) are squashed.
4. Search patterns and substitute strings are not merged: search pattern or
@ -1008,14 +1008,14 @@ with ShaDa entries. Specifically the following is being done:
to ShaDa file.
5. For each register entity with greatest timestamp is the only saved.
|shada-<|
6. All saved variables are saved from current NeoVim instance. Additionally
6. All saved variables are saved from current Neovim instance. Additionally
existing variable values are copied, meaning that the only way to remove
variable from a ShaDa file is either removing it by hand or disabling
writing variables completely. |shada-!|
7. For each global mark entity with greatest timestamp is the only saved.
8. Buffer list and header are the only entries which are not merged in any
fashion: the only header and buffer list present are the ones from the
NeoVim instance which was last writing the file. |shada-%|
Neovim instance which was last writing the file. |shada-%|
COMPATIBILITY *shada-compatibility*
{Nvim}
@ -1040,13 +1040,13 @@ ShaDa files are forward and backward compatible. This means that
history types. |history|
6. Unknown keys found in register, local mark, global mark, change, jump and
search pattern entries are saved internally and dumped when writing.
Entries created during NeoVim session never have such additions.
Entries created during Neovim session never have such additions.
7. Additional elements found in replacement string and history entries are
saved internally and dumped. Entries created during NeoVim session never
saved internally and dumped. Entries created during Neovim session never
have such additions.
8. Additional elements found in variable entries are simply ignored when
reading. When writing new variables they will be preserved during merging,
but that's all. Variable values dumped from current NeoVim session never
but that's all. Variable values dumped from current Neovim session never
have additional elements, even if variables themselves were obtained by
reading ShaDa files.
@ -1074,7 +1074,7 @@ The text in the ShaDa file is UTF-8-encoded. Normally you will always work
with the same 'encoding' value, and this works just fine. However, if you
read the ShaDa file with value for 'encoding' different from utf-8 and
'encoding' used when writing ShaDa file, some of the text (non-ASCII
characters) may be invalid as NeoVim always attempts to convert the text in
characters) may be invalid as Neovim always attempts to convert the text in
the ShaDa file from the UTF-8 to the current 'encoding' value. Filenames are
never converted, affected elements are:
@ -1099,7 +1099,7 @@ start with an existing one to get the format right. You need to understand
MessagePack (or, more likely, find software that is able to use it) format to
do this. This can be useful in order to create a second file, say
"~/.my.shada" which could contain certain settings that you always want when
you first start NeoVim. For example, you can preload registers with
you first start Neovim. For example, you can preload registers with
particular data, or put certain commands in the command line history. A line
in your .nvimrc file like >
:rshada! ~/.my.shada
@ -1114,18 +1114,18 @@ that file. This was done to avoid accidentally destroying a file when the
file name of the ShaDa file is wrong. This could happen when accidentally
typing "nvim -i file" when you wanted "nvim -R file" (yes, somebody
accidentally did that!). If you want to overwrite a ShaDa file with an error
in it, you will either have to fix the error, delete the file (while NeoVim is
in it, you will either have to fix the error, delete the file (while Neovim is
running, so most of the information will be restored) or write it explicitly
with |:wshada| and a bang.
*E136* *E138* *shada-error-handling*
Note: when NeoVim finds out that it failed to write part of the ShaDa file
Note: when Neovim finds out that it failed to write part of the ShaDa file
(e.g. because there is no space left to write the file) or when it appears
that already present ShaDa file contains errors that indicate that this file
is likely not a ShaDa file then ShaDa file with `.tmp.X` suffix is left on the
file system (where X is any latin small letter: from U+0061 to U+007A). You
may use such file to recover the data if you want, but in any case it needs to
be cleaned up after you resolve the issue that prevented old ShaDa file from
being overwritten. If NeoVim fails to find unexisting `.tmp.X` file it will
being overwritten. If Neovim fails to find unexisting `.tmp.X` file it will
not write ShaDa file at all. Errors which trigger this behaviour are listed
at |shada-keeping-tmpfile|.
@ -1188,7 +1188,7 @@ exactly four MessagePack objects:
Key Data ~
generator Binary, software used to generate ShaDa
file. Is equal to "nvim" when ShaDa file was
written by NeoVim.
written by Neovim.
version Binary, generator version.
encoding Binary, effective 'encoding' value.
max_kbyte Integer, effective |shada-s| limit value.

View File

@ -1016,14 +1016,14 @@ static const void *shada_hist_iter(const void *const iter,
/// according to the timestamp). If entry was already in the ring buffer
/// existing entry will be removed unless it has greater timestamp.
///
/// Before the new entry entries from the current NeoVim history will be
/// Before the new entry entries from the current Neovim history will be
/// inserted unless `do_iter` argument is false.
///
/// @param[in,out] hms_p Ring buffer and associated structures.
/// @param[in] entry Inserted entry.
/// @param[in] do_iter Determines whether NeoVim own history should
/// @param[in] do_iter Determines whether Neovim own history should
/// be used. Must be true only if inserting
/// entry from current NeoVim history.
/// entry from current Neovim history.
/// @param[in] can_free_entry True if entry can be freed.
static void hms_insert(HistoryMergerState *const hms_p, const ShadaEntry entry,
const bool do_iter, const bool can_free_entry)
@ -1054,7 +1054,7 @@ static void hms_insert(HistoryMergerState *const hms_p, const ShadaEntry entry,
if (entry.timestamp > existing_entry->data.timestamp) {
hmll_remove(hmll, existing_entry);
} else if (!do_iter && entry.timestamp == existing_entry->data.timestamp) {
// Prefer entry from the current NeoVim instance.
// Prefer entry from the current Neovim instance.
if (existing_entry->can_free_entry) {
shada_free_shada_entry(&existing_entry->data);
}
@ -1083,7 +1083,7 @@ static void hms_insert(HistoryMergerState *const hms_p, const ShadaEntry entry,
/// @param[in] num_elements Number of elements in the result.
/// @param[in] do_merge Prepare structure for merging elements.
/// @param[in] reading If true, then merger is reading history for use
/// in NeoVim.
/// in Neovim.
static inline void hms_init(HistoryMergerState *const hms_p,
const uint8_t history_type,
const size_t num_elements,
@ -1099,7 +1099,7 @@ static inline void hms_init(HistoryMergerState *const hms_p,
hms_p->history_type = history_type;
}
/// Merge in all remaining NeoVim own history entries
/// Merge in all remaining Neovim own history entries
///
/// @param[in,out] hms_p Merger structure into which history should be
/// inserted.
@ -1119,7 +1119,7 @@ static inline void hms_insert_whole_neovim_history(
}
}
/// Convert merger structure to NeoVim internal structure for history
/// Convert merger structure to Neovim internal structure for history
///
/// @param[in] hms_p Converted merger structure.
/// @param[out] hist_array Array with the results.
@ -1548,7 +1548,7 @@ static void shada_read(ShaDaReadDef *const sd_reader, const int flags)
shada_read_main_cycle_end:
// Warning: shada_hist_iter returns ShadaEntry elements which use strings from
// original history list. This means that once such entry is removed
// from the history NeoVim array will no longer be valid. To reduce
// from the history Neovim array will no longer be valid. To reduce
// amount of memory allocations ShaDa file reader allocates enough
// memory for the history string itself and separator character which
// may be assigned right away.
@ -2349,7 +2349,7 @@ static inline ShaDaWriteResult shada_read_when_writing(
/// @param[in] sd_writer Structure containing file writer definition.
/// @param[in] sd_reader Structure containing file reader definition. If it is
/// not NULL then contents of this file will be merged
/// with current NeoVim runtime.
/// with current Neovim runtime.
static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
ShaDaReadDef *const sd_reader)
FUNC_ATTR_NONNULL_ARG(1)
@ -3063,7 +3063,7 @@ int shada_read_marks(void)
///
/// @param[in] fname File to write to. If it is NULL or empty then default
/// @param[in] forceit If true, use forced reading (prioritize file contents
/// over current NeoVim state).
/// over current Neovim state).
/// @param[in] missing_ok If true, do not error out when file is missing.
///
/// @return OK in case of success, FAIL otherwise.

View File

@ -21,7 +21,7 @@ describe('ShaDa history merging code', function()
os.remove(shada_fname)
end)
it('takes item with greater timestamp from NeoVim instance when reading',
it('takes item with greater timestamp from Neovim instance when reading',
function()
wshada('\004\001\009\147\000\196\002ab\196\001a')
eq(0, exc_exec(sdrcmd()))
@ -40,7 +40,7 @@ describe('ShaDa history merging code', function()
eq(1, found)
end)
it('takes item with equal timestamp from NeoVim instance when reading',
it('takes item with equal timestamp from Neovim instance when reading',
function()
wshada('\004\000\009\147\000\196\002ab\196\001a')
eq(0, exc_exec(sdrcmd()))
@ -78,7 +78,7 @@ describe('ShaDa history merging code', function()
eq(1, found)
end)
it('takes item with greater timestamp from NeoVim instance when writing',
it('takes item with greater timestamp from Neovim instance when writing',
function()
wshada('\004\001\009\147\000\196\002ab\196\001a')
eq(0, exc_exec(sdrcmd()))
@ -95,7 +95,7 @@ describe('ShaDa history merging code', function()
eq(1, found)
end)
it('takes item with equal timestamp from NeoVim instance when writing',
it('takes item with equal timestamp from Neovim instance when writing',
function()
wshada('\004\000\009\147\000\196\002ab\196\001a')
eq(0, exc_exec(sdrcmd()))