vim-patch:7.4.1925

Problem:    Viminfo does not merge file marks properly.
Solution:   Use a timestamp.  Add the :clearjumps command.

2d35899721
This commit is contained in:
James McCoy 2017-01-02 14:09:48 -05:00
parent 282109c51b
commit 492f2cfeff
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
7 changed files with 29 additions and 15 deletions

View File

@ -3534,7 +3534,7 @@ foreground() Move the Vim window to the foreground. Useful when sent from
{only in the Win32 GUI and console version} {only in the Win32 GUI and console version}
*function()* *E700* *E922* *E929* *function()* *E700* *E922* *E923*
function({name} [, {arglist}] [, {dict}]) function({name} [, {arglist}] [, {dict}])
Return a |Funcref| variable that refers to function {name}. Return a |Funcref| variable that refers to function {name}.
{name} can be a user defined function or an internal function. {name} can be a user defined function or an internal function.

View File

@ -1135,7 +1135,7 @@ files for different types of files (e.g., C code) and load them based on the
file name, using the ":autocmd" command (see |:autocmd|). More information on file name, using the ":autocmd" command (see |:autocmd|). More information on
ShaDa file format is contained in |shada-format| section. ShaDa file format is contained in |shada-format| section.
*E136* *E138* *shada-error-handling* *E136* *E929* *shada-error-handling*
Some errors make Neovim leave temporary file named `{basename}.tmp.X` (X is Some errors make Neovim leave temporary file named `{basename}.tmp.X` (X is
any free letter from `a` to `z`) while normally it will create this file, any free letter from `a` to `z`) while normally it will create this file,
write to it and then rename `{basename}.tmp.X` to `{basename}`. Such errors write to it and then rename `{basename}.tmp.X` to `{basename}`. Such errors
@ -1155,7 +1155,7 @@ include:
Do not forget to remove the temporary file or replace the target file with Do not forget to remove the temporary file or replace the target file with
temporary one after getting one of the above errors or all attempts to create temporary one after getting one of the above errors or all attempts to create
a ShaDa file may fail with |E138|. If you got one of them when using a ShaDa file may fail with |E929|. If you got one of them when using
|:wshada| (and not when exiting Neovim: i.e. when you have Neovim session |:wshada| (and not when exiting Neovim: i.e. when you have Neovim session
running) you have additional options: running) you have additional options:
@ -1187,7 +1187,7 @@ running) you have additional options:
internal info is written (also disables safety checks internal info is written (also disables safety checks
described in |shada-error-handling|). If 'shada' is described in |shada-error-handling|). If 'shada' is
empty, marks for up to 100 files will be written. empty, marks for up to 100 files will be written.
When you get error "E138: All .tmp.X files exist, When you get error "E929: All .tmp.X files exist,
cannot write ShaDa file!" check that no old temp files cannot write ShaDa file!" check that no old temp files
were left behind (e.g. were left behind (e.g.
~/.local/share/nvim/shada/main.shada.tmp*). ~/.local/share/nvim/shada/main.shada.tmp*).

View File

@ -479,6 +479,12 @@ return {
addr_type=ADDR_WINDOWS, addr_type=ADDR_WINDOWS,
func='ex_close', func='ex_close',
}, },
{
command='clearjumps',
flags=bit.bor(TRLBAR, CMDWIN),
addr_type=ADDR_LINES,
func='ex_clearjumps',
},
{ {
command='cmap', command='cmap',
flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN),

View File

@ -130,17 +130,17 @@ int setmark_pos(int c, pos_T *pos, int fnum)
return OK; return OK;
} }
if (c > 'z') /* some islower() and isupper() cannot handle if (ASCII_ISLOWER(c)) {
characters above 127 */
return FAIL;
if (islower(c)) {
i = c - 'a'; i = c - 'a';
RESET_FMARK(curbuf->b_namedm + i, *pos, curbuf->b_fnum); RESET_FMARK(curbuf->b_namedm + i, *pos, curbuf->b_fnum);
return OK; return OK;
} }
if (isupper(c)) { if (ASCII_ISUPPER(c) || ascii_isdigit(c)) {
assert(c >= 'A' && c <= 'Z'); if (ascii_isdigit(c)) {
i = c - 'A'; i = c - '0' + NMARKS;
} else {
i = c - 'A';
}
RESET_XFMARK(namedfm + i, *pos, fnum, NULL); RESET_XFMARK(namedfm + i, *pos, fnum, NULL);
return OK; return OK;
} }
@ -798,6 +798,13 @@ void ex_jumps(exarg_T *eap)
MSG_PUTS("\n>"); MSG_PUTS("\n>");
} }
void ex_clearjumps(exarg_T *eap)
{
free_jumplist(curwin);
curwin->w_jumplistlen = 0;
curwin->w_jumplistidx = 0;
}
/* /*
* print the changelist * print the changelist
*/ */

View File

@ -4424,8 +4424,8 @@ msgstr ""
"перед записом: %s" "перед записом: %s"
#, c-format #, c-format
msgid "E138: All %s.tmp.X files exist, cannot write ShaDa file!" msgid "E929: All %s.tmp.X files exist, cannot write ShaDa file!"
msgstr "E138: Усі файли %s.tmp.X зайнято, неможливо записати файл ShaDa!" msgstr "E929: Усі файли %s.tmp.X зайнято, неможливо записати файл ShaDa!"
#, c-format #, c-format
msgid "System error while opening temporary ShaDa file %s for writing: %s" msgid "System error while opening temporary ShaDa file %s for writing: %s"

View File

@ -118,9 +118,10 @@ KHASH_SET_INIT_STR(strset)
// E576: Missing '>' // E576: Missing '>'
// E577: Illegal register name // E577: Illegal register name
// E886: Can't rename viminfo file to %s! // E886: Can't rename viminfo file to %s!
// E929: Too many viminfo temp files, like %s!
// Now only six of them are used: // Now only six of them are used:
// E137: ShaDa file is not writeable (for pre-open checks) // E137: ShaDa file is not writeable (for pre-open checks)
// E138: All %s.tmp.X files exist, cannot write ShaDa file! // E929: All %s.tmp.X files exist, cannot write ShaDa file!
// RCERR (E576) for critical read errors. // RCERR (E576) for critical read errors.
// RNERR (E136) for various errors when renaming. // RNERR (E136) for various errors when renaming.
// RERR (E575) for various errors inside read ShaDa file. // RERR (E575) for various errors inside read ShaDa file.

View File

@ -515,7 +515,7 @@ static int included_patches[] = {
1928, 1928,
// 1927 NA // 1927 NA
// 1926 NA // 1926 NA
// 1925 NA 1925,
// 1924 NA // 1924 NA
1923, 1923,
// 1922 NA // 1922 NA