mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
Various improvements to undo file code to make it more robust.
This commit is contained in:
parent
f05e3b0220
commit
9db580634c
@ -4170,13 +4170,10 @@ E822 undo.txt /*E822*
|
|||||||
E823 undo.txt /*E823*
|
E823 undo.txt /*E823*
|
||||||
E824 undo.txt /*E824*
|
E824 undo.txt /*E824*
|
||||||
E825 undo.txt /*E825*
|
E825 undo.txt /*E825*
|
||||||
E826 undo.txt /*E826*
|
|
||||||
E827 undo.txt /*E827*
|
|
||||||
E828 undo.txt /*E828*
|
E828 undo.txt /*E828*
|
||||||
E829 undo.txt /*E829*
|
E829 undo.txt /*E829*
|
||||||
E83 message.txt /*E83*
|
E83 message.txt /*E83*
|
||||||
E830 undo.txt /*E830*
|
E830 undo.txt /*E830*
|
||||||
E831 undo.txt /*E831*
|
|
||||||
E84 windows.txt /*E84*
|
E84 windows.txt /*E84*
|
||||||
E85 options.txt /*E85*
|
E85 options.txt /*E85*
|
||||||
E86 windows.txt /*E86*
|
E86 windows.txt /*E86*
|
||||||
|
@ -1097,6 +1097,7 @@ Vim 7.3:
|
|||||||
- When there is no undo info (undolevels negative), delete the undo file.
|
- When there is no undo info (undolevels negative), delete the undo file.
|
||||||
- Need to check all values for evil manipulation.
|
- Need to check all values for evil manipulation.
|
||||||
- Add undofile(name): get undo file name for buffer "name".
|
- Add undofile(name): get undo file name for buffer "name".
|
||||||
|
- patch for unused functions. (Dominique Pelle, 2010 May 29)
|
||||||
- Also crypt the undo file.
|
- Also crypt the undo file.
|
||||||
- Also crypt the swap file, each block separately. Change mf_write() and
|
- Also crypt the swap file, each block separately. Change mf_write() and
|
||||||
mf_read(). How to get b_p_key to these functions?
|
mf_read(). How to get b_p_key to these functions?
|
||||||
|
@ -267,10 +267,7 @@ Reading an existing undo file may fail for several reasons:
|
|||||||
The file text differs from when the undo file was written. This means
|
The file text differs from when the undo file was written. This means
|
||||||
the undo file cannot be used, it would corrupt the text. This also
|
the undo file cannot be used, it would corrupt the text. This also
|
||||||
happens when 'encoding' differs from when the undo file was written.
|
happens when 'encoding' differs from when the undo file was written.
|
||||||
*E825* *E826* *E831*
|
*E825* The undo file does not contain valid contents and cannot be used.
|
||||||
The undo file does not contain valid contents and cannot be used.
|
|
||||||
*E827* The magic number at the end of the file was not found. This usually
|
|
||||||
means the file was truncated.
|
|
||||||
|
|
||||||
Writing an undo file may fail for these reasons:
|
Writing an undo file may fail for these reasons:
|
||||||
*E828* The file to be written cannot be created. Perhaps you do not have
|
*E828* The file to be written cannot be created. Perhaps you do not have
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" Language: sed
|
" Language: sed
|
||||||
" Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
|
" Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
|
||||||
" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
|
" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
|
||||||
" Last Change: 2005 Dec 15
|
" Last Change: 2010 May 29
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
" For version 5.x: Clear all syntax items
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
@ -49,7 +49,7 @@ syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained
|
|||||||
" Metacharacters: $ * . \ ^ [ ~
|
" Metacharacters: $ * . \ ^ [ ~
|
||||||
" @ is used as delimiter and treated on its own below
|
" @ is used as delimiter and treated on its own below
|
||||||
let __at = char2nr("@")
|
let __at = char2nr("@")
|
||||||
let __sed_i = char2nr(" ")
|
let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||||
if has("ebcdic")
|
if has("ebcdic")
|
||||||
let __sed_last = 255
|
let __sed_last = 255
|
||||||
else
|
else
|
||||||
@ -105,8 +105,8 @@ if version >= 508 || !exists("did_sed_syntax_inits")
|
|||||||
if exists("highlight_sedtabs")
|
if exists("highlight_sedtabs")
|
||||||
HiLink sedTab Todo
|
HiLink sedTab Todo
|
||||||
endif
|
endif
|
||||||
let __sed_i = 32
|
let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||||
while __sed_i <= 126
|
while __sed_i <= __sed_last
|
||||||
exe "HiLink sedRegexp".__sed_i "Macro"
|
exe "HiLink sedRegexp".__sed_i "Macro"
|
||||||
exe "HiLink sedReplacement".__sed_i "NONE"
|
exe "HiLink sedReplacement".__sed_i "NONE"
|
||||||
let __sed_i = __sed_i + 1
|
let __sed_i = __sed_i + 1
|
||||||
@ -115,7 +115,7 @@ if version >= 508 || !exists("did_sed_syntax_inits")
|
|||||||
delcommand HiLink
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
|
|
||||||
unlet __sed_i __sed_delimiter __sed_metacharacters
|
unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters
|
||||||
|
|
||||||
let b:current_syntax = "sed"
|
let b:current_syntax = "sed"
|
||||||
|
|
||||||
|
@ -6134,7 +6134,7 @@ emsgn(s, n)
|
|||||||
get2c(fd)
|
get2c(fd)
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
{
|
{
|
||||||
long n;
|
int n;
|
||||||
|
|
||||||
n = getc(fd);
|
n = getc(fd);
|
||||||
n = (n << 8) + getc(fd);
|
n = (n << 8) + getc(fd);
|
||||||
@ -6148,7 +6148,7 @@ get2c(fd)
|
|||||||
get3c(fd)
|
get3c(fd)
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
{
|
{
|
||||||
long n;
|
int n;
|
||||||
|
|
||||||
n = getc(fd);
|
n = getc(fd);
|
||||||
n = (n << 8) + getc(fd);
|
n = (n << 8) + getc(fd);
|
||||||
@ -6163,7 +6163,7 @@ get3c(fd)
|
|||||||
get4c(fd)
|
get4c(fd)
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
{
|
{
|
||||||
long n;
|
int n;
|
||||||
|
|
||||||
n = getc(fd);
|
n = getc(fd);
|
||||||
n = (n << 8) + getc(fd);
|
n = (n << 8) + getc(fd);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* undo.c */
|
/* undo.c */
|
||||||
|
void u_check __ARGS((int newhead_may_be_NULL));
|
||||||
int u_save_cursor __ARGS((void));
|
int u_save_cursor __ARGS((void));
|
||||||
int u_save __ARGS((linenr_T top, linenr_T bot));
|
int u_save __ARGS((linenr_T top, linenr_T bot));
|
||||||
int u_savesub __ARGS((linenr_T lnum));
|
int u_savesub __ARGS((linenr_T lnum));
|
||||||
|
1020
src/undo.c
1020
src/undo.c
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user