mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	@@ -1,4 +1,4 @@
 | 
				
			|||||||
*change.txt*    For Vim version 7.4.  Last change: 2014 Jun 26
 | 
					*change.txt*    For Vim version 7.4.  Last change: 2015 Jan 27
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		  VIM REFERENCE MANUAL    by Bram Moolenaar
 | 
							  VIM REFERENCE MANUAL    by Bram Moolenaar
 | 
				
			||||||
@@ -1110,7 +1110,7 @@ letters to replace their previous contents or as uppercase letters to append
 | 
				
			|||||||
to their previous contents.  When the '>' flag is present in 'cpoptions' then
 | 
					to their previous contents.  When the '>' flag is present in 'cpoptions' then
 | 
				
			||||||
a line break is inserted before the appended text.
 | 
					a line break is inserted before the appended text.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
5. Read-only registers ":, "., "% and "#
 | 
					5. Read-only registers ":, ". and "%
 | 
				
			||||||
These are '%', '#', ':' and '.'.  You can use them only with the "p", "P",
 | 
					These are '%', '#', ':' and '.'.  You can use them only with the "p", "P",
 | 
				
			||||||
and ":put" commands and with CTRL-R.
 | 
					and ":put" commands and with CTRL-R.
 | 
				
			||||||
						*quote_.* *quote.* *E29*
 | 
											*quote_.* *quote.* *E29*
 | 
				
			||||||
@@ -1121,8 +1121,6 @@ and ":put" commands and with CTRL-R.
 | 
				
			|||||||
		('textwidth' and other options affect what is inserted).
 | 
							('textwidth' and other options affect what is inserted).
 | 
				
			||||||
							*quote_%* *quote%*
 | 
												*quote_%* *quote%*
 | 
				
			||||||
	"%	Contains the name of the current file.
 | 
						"%	Contains the name of the current file.
 | 
				
			||||||
							*quote_#* *quote#*
 | 
					 | 
				
			||||||
	"#	Contains the name of the alternate file.
 | 
					 | 
				
			||||||
						*quote_:* *quote:* *E30*
 | 
											*quote_:* *quote:* *E30*
 | 
				
			||||||
	":	Contains the most recent executed command-line.  Example: Use
 | 
						":	Contains the most recent executed command-line.  Example: Use
 | 
				
			||||||
		"@:" to repeat the previous command-line command.
 | 
							"@:" to repeat the previous command-line command.
 | 
				
			||||||
@@ -1130,7 +1128,23 @@ and ":put" commands and with CTRL-R.
 | 
				
			|||||||
		one character of it was typed.  Thus it remains unchanged if
 | 
							one character of it was typed.  Thus it remains unchanged if
 | 
				
			||||||
		the command was completely from a mapping.
 | 
							the command was completely from a mapping.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
6. Expression register "=			*quote_=* *quote=* *@=*
 | 
												*quote_#* *quote#*
 | 
				
			||||||
 | 
					6. Alternate file register "#
 | 
				
			||||||
 | 
					Contains the name of the alternate file for the current window.  It will
 | 
				
			||||||
 | 
					change how the |CTRL-^| command works.
 | 
				
			||||||
 | 
					This register is writable, mainly to allow for restoring it after a plugin has
 | 
				
			||||||
 | 
					changed it.  It accepts buffer number: >
 | 
				
			||||||
 | 
					    let altbuf = bufnr(@#)
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					    let @# = altbuf
 | 
				
			||||||
 | 
					It will give error |E86| if you pass buffer number and this buffer does not
 | 
				
			||||||
 | 
					exist.
 | 
				
			||||||
 | 
					It can also accept a match with an existing buffer name: >
 | 
				
			||||||
 | 
					    let @# = 'buffer_name'
 | 
				
			||||||
 | 
					Error |E93| if there is more than one buffer matching the given name or |E94|
 | 
				
			||||||
 | 
					if none of buffers matches the given name.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					7. Expression register "=			*quote_=* *quote=* *@=*
 | 
				
			||||||
This is not really a register that stores text, but is a way to use an
 | 
					This is not really a register that stores text, but is a way to use an
 | 
				
			||||||
expression in commands which use a register.  The expression register is
 | 
					expression in commands which use a register.  The expression register is
 | 
				
			||||||
read-only; you cannot put text into it.  After the '=', the cursor moves to
 | 
					read-only; you cannot put text into it.  After the '=', the cursor moves to
 | 
				
			||||||
@@ -1151,7 +1165,7 @@ If the "= register is used for the "p" command, the String is split up at <NL>
 | 
				
			|||||||
characters.  If the String ends in a <NL>, it is regarded as a linewise
 | 
					characters.  If the String ends in a <NL>, it is regarded as a linewise
 | 
				
			||||||
register.
 | 
					register.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
7. Selection and drop registers "*, "+ and "~ 
 | 
					8. Selection and drop registers "*, "+ and "~ 
 | 
				
			||||||
Use these registers for storing and retrieving the selected text for the GUI.
 | 
					Use these registers for storing and retrieving the selected text for the GUI.
 | 
				
			||||||
See |quotestar| and |quoteplus|.  When the clipboard is not available or not
 | 
					See |quotestar| and |quoteplus|.  When the clipboard is not available or not
 | 
				
			||||||
working, the unnamed register is used instead.  For Unix systems and Mac OS X,
 | 
					working, the unnamed register is used instead.  For Unix systems and Mac OS X,
 | 
				
			||||||
@@ -1169,12 +1183,12 @@ GTK GUI}
 | 
				
			|||||||
Note: The "~ register is only used when dropping plain text onto Vim.
 | 
					Note: The "~ register is only used when dropping plain text onto Vim.
 | 
				
			||||||
Drag'n'drop of URI lists is handled internally.
 | 
					Drag'n'drop of URI lists is handled internally.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
8. Black hole register "_				*quote_*
 | 
					9. Black hole register "_				*quote_*
 | 
				
			||||||
When writing to this register, nothing happens.  This can be used to delete
 | 
					When writing to this register, nothing happens.  This can be used to delete
 | 
				
			||||||
text without affecting the normal registers.  When reading from this register,
 | 
					text without affecting the normal registers.  When reading from this register,
 | 
				
			||||||
nothing is returned.
 | 
					nothing is returned.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
9. Last search pattern register	"/			*quote_/* *quote/*
 | 
					10. Last search pattern register	"/		*quote_/* *quote/*
 | 
				
			||||||
Contains the most recent search-pattern.  This is used for "n" and 'hlsearch'.
 | 
					Contains the most recent search-pattern.  This is used for "n" and 'hlsearch'.
 | 
				
			||||||
It is writable with `:let`, you can change it to have 'hlsearch' highlight
 | 
					It is writable with `:let`, you can change it to have 'hlsearch' highlight
 | 
				
			||||||
other matches without actually searching.  You can't yank or delete into this
 | 
					other matches without actually searching.  You can't yank or delete into this
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -918,13 +918,15 @@ do_buffer (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (buf == NULL) {        /* could not find it */
 | 
					  if (buf == NULL) {        /* could not find it */
 | 
				
			||||||
    if (start == DOBUF_FIRST) {
 | 
					    if (start == DOBUF_FIRST) {
 | 
				
			||||||
      /* don't warn when deleting */
 | 
					      // don't warn when deleting
 | 
				
			||||||
      if (!unload)
 | 
					      if (!unload) {
 | 
				
			||||||
        EMSGN(_("E86: Buffer %" PRId64 " does not exist"), count);
 | 
					        EMSGN(_(e_nobufnr), count);
 | 
				
			||||||
    } else if (dir == FORWARD)
 | 
					      }
 | 
				
			||||||
 | 
					    } else if (dir == FORWARD) {
 | 
				
			||||||
      EMSG(_("E87: Cannot go beyond last buffer"));
 | 
					      EMSG(_("E87: Cannot go beyond last buffer"));
 | 
				
			||||||
    else
 | 
					    } else {
 | 
				
			||||||
      EMSG(_("E88: Cannot go before first buffer"));
 | 
					      EMSG(_("E88: Cannot go before first buffer"));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    return FAIL;
 | 
					    return FAIL;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1711,18 +1713,15 @@ static buf_T *buflist_findname_file_id(char_u *ffname, FileID *file_id,
 | 
				
			|||||||
  return NULL;
 | 
					  return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/// Find file in buffer list by a regexp pattern.
 | 
				
			||||||
 * Find file in buffer list by a regexp pattern.
 | 
					/// Return fnum of the found buffer.
 | 
				
			||||||
 * Return fnum of the found buffer.
 | 
					/// Return < 0 for error.
 | 
				
			||||||
 * Return < 0 for error.
 | 
					int buflist_findpat(
 | 
				
			||||||
 */
 | 
					    const char_u *pattern,
 | 
				
			||||||
int 
 | 
					    const char_u *pattern_end,  // pointer to first char after pattern
 | 
				
			||||||
buflist_findpat (
 | 
					    int unlisted,               // find unlisted buffers
 | 
				
			||||||
    char_u *pattern,
 | 
					    int diffmode,               // find diff-mode buffers only
 | 
				
			||||||
    char_u *pattern_end,       /* pointer to first char after pattern */
 | 
					    int curtab_only             // find buffers in current tab only
 | 
				
			||||||
    int unlisted,                   /* find unlisted buffers */
 | 
					 | 
				
			||||||
    int diffmode,             /* find diff-mode buffers only */
 | 
					 | 
				
			||||||
    int curtab_only                /* find buffers in current tab only */
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  int match = -1;
 | 
					  int match = -1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7096,26 +7096,23 @@ int match_file_list(char_u *list, char_u *sfname, char_u *ffname)
 | 
				
			|||||||
  return FALSE;
 | 
					  return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/// Convert the given pattern "pat" which has shell style wildcards in it, into
 | 
				
			||||||
 * Convert the given pattern "pat" which has shell style wildcards in it, into
 | 
					/// a regular expression, and return the result in allocated memory.  If there
 | 
				
			||||||
 * a regular expression, and return the result in allocated memory.  If there
 | 
					/// is a directory path separator to be matched, then TRUE is put in
 | 
				
			||||||
 * is a directory path separator to be matched, then TRUE is put in
 | 
					/// allow_dirs, otherwise FALSE is put there -- webb.
 | 
				
			||||||
 * allow_dirs, otherwise FALSE is put there -- webb.
 | 
					/// Handle backslashes before special characters, like "\*" and "\ ".
 | 
				
			||||||
 * Handle backslashes before special characters, like "\*" and "\ ".
 | 
					///
 | 
				
			||||||
 *
 | 
					/// Returns NULL on failure.
 | 
				
			||||||
 * Returns NULL on failure.
 | 
					char_u * file_pat_to_reg_pat(
 | 
				
			||||||
 */
 | 
					    const char_u *pat,
 | 
				
			||||||
char_u *
 | 
					    const char_u *pat_end,   // first char after pattern or NULL
 | 
				
			||||||
file_pat_to_reg_pat (
 | 
					    char *allow_dirs,        // Result passed back out in here
 | 
				
			||||||
    char_u *pat,
 | 
					    int no_bslash            // Don't use a backward slash as pathsep
 | 
				
			||||||
    char_u *pat_end,           /* first char after pattern or NULL */
 | 
					 | 
				
			||||||
    char *allow_dirs,        /* Result passed back out in here */
 | 
					 | 
				
			||||||
    int no_bslash             /* Don't use a backward slash as pathsep */
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  char_u      *endp;
 | 
					  const char_u *endp;
 | 
				
			||||||
  char_u      *reg_pat;
 | 
					  char_u      *reg_pat;
 | 
				
			||||||
  char_u      *p;
 | 
					  const char_u *p;
 | 
				
			||||||
  int nested = 0;
 | 
					  int nested = 0;
 | 
				
			||||||
  int add_dollar = TRUE;
 | 
					  int add_dollar = TRUE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,7 @@
 | 
				
			|||||||
#define NVIM_GLOBALS_H
 | 
					#define NVIM_GLOBALS_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdbool.h>
 | 
					#include <stdbool.h>
 | 
				
			||||||
 | 
					#include <inttypes.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// EXTERN is only defined in main.c. That's where global variables are
 | 
					// EXTERN is only defined in main.c. That's where global variables are
 | 
				
			||||||
// actually defined and initialized.
 | 
					// actually defined and initialized.
 | 
				
			||||||
@@ -1239,6 +1240,7 @@ EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
 | 
				
			|||||||
EXTERN char_u e_maxmempat[] INIT(= N_(
 | 
					EXTERN char_u e_maxmempat[] INIT(= N_(
 | 
				
			||||||
        "E363: pattern uses more memory than 'maxmempattern'"));
 | 
					        "E363: pattern uses more memory than 'maxmempattern'"));
 | 
				
			||||||
EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
 | 
					EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
 | 
				
			||||||
 | 
					EXTERN char_u e_nobufnr[] INIT(= N_("E86: Buffer %" PRId64 " does not exist"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTERN char_u e_invalpat[] INIT(= N_(
 | 
					EXTERN char_u e_invalpat[] INIT(= N_(
 | 
				
			||||||
        "E682: Invalid search pattern or delimiter"));
 | 
					        "E682: Invalid search pattern or delimiter"));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -703,17 +703,16 @@ char_u *get_expr_line_src(void)
 | 
				
			|||||||
/// @param writing allow only writable registers
 | 
					/// @param writing allow only writable registers
 | 
				
			||||||
bool valid_yank_reg(int regname, bool writing)
 | 
					bool valid_yank_reg(int regname, bool writing)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (       (regname > 0 && ASCII_ISALNUM(regname))
 | 
					  if ((regname > 0 && ASCII_ISALNUM(regname))
 | 
				
			||||||
             || (!writing && vim_strchr((char_u *)
 | 
					      || (!writing && vim_strchr((char_u *) "/.%:=" , regname) != NULL)
 | 
				
			||||||
                     "/.%#:="
 | 
					      || regname == '#'
 | 
				
			||||||
                     , regname) != NULL)
 | 
					      || regname == '"'
 | 
				
			||||||
             || regname == '"'
 | 
					      || regname == '-'
 | 
				
			||||||
             || regname == '-'
 | 
					      || regname == '_'
 | 
				
			||||||
             || regname == '_'
 | 
					      || regname == '*'
 | 
				
			||||||
             || regname == '*'
 | 
					      || regname == '+') {
 | 
				
			||||||
             || regname == '+'
 | 
					 | 
				
			||||||
             )
 | 
					 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return false;
 | 
					  return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -4658,6 +4657,27 @@ void write_reg_contents_ex(int name,
 | 
				
			|||||||
    return;
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (name == '#') {
 | 
				
			||||||
 | 
					    buf_T *buf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (ascii_isdigit(*str)) {
 | 
				
			||||||
 | 
					      int num = atoi((char *)str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      buf = buflist_findnr(num);
 | 
				
			||||||
 | 
					      if (buf == NULL) {
 | 
				
			||||||
 | 
					        EMSGN(_(e_nobufnr), (long)num);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      buf = buflist_findnr(buflist_findpat(str, str + STRLEN(str),
 | 
				
			||||||
 | 
					                                           true, false, false));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    if (buf == NULL) {
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    curwin->w_alt_fnum = buf->b_fnum;
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (name == '=') {
 | 
					  if (name == '=') {
 | 
				
			||||||
    size_t offset = 0;
 | 
					    size_t offset = 0;
 | 
				
			||||||
    size_t totlen = (size_t) len;
 | 
					    size_t totlen = (size_t) len;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -466,7 +466,7 @@ static int included_patches[] = {
 | 
				
			|||||||
  608,
 | 
					  608,
 | 
				
			||||||
  // 607 NA
 | 
					  // 607 NA
 | 
				
			||||||
  606,
 | 
					  606,
 | 
				
			||||||
  // 605,
 | 
					  605,
 | 
				
			||||||
  604,
 | 
					  604,
 | 
				
			||||||
  // 603,
 | 
					  // 603,
 | 
				
			||||||
  602,
 | 
					  602,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user