mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #8498 from janlazo/vim-8.0.0523
This commit is contained in:
commit
c500f22f3c
@ -130,8 +130,8 @@ typedef struct SearchedFile {
|
|||||||
*
|
*
|
||||||
* returns FAIL if failed, OK otherwise.
|
* returns FAIL if failed, OK otherwise.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
search_regcomp (
|
search_regcomp(
|
||||||
char_u *pat,
|
char_u *pat,
|
||||||
int pat_save,
|
int pat_save,
|
||||||
int pat_use,
|
int pat_use,
|
||||||
@ -2121,9 +2121,9 @@ static int check_linecomment(char_u *line)
|
|||||||
* Show the match only if it is visible on the screen.
|
* Show the match only if it is visible on the screen.
|
||||||
* If there isn't a match, then beep.
|
* If there isn't a match, then beep.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
showmatch (
|
showmatch(
|
||||||
int c /* char to show match for */
|
int c // char to show match for
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pos_T *lpos, save_cursor;
|
pos_T *lpos, save_cursor;
|
||||||
@ -2377,8 +2377,14 @@ findpar (
|
|||||||
++curr;
|
++curr;
|
||||||
curwin->w_cursor.lnum = curr;
|
curwin->w_cursor.lnum = curr;
|
||||||
if (curr == curbuf->b_ml.ml_line_count && what != '}') {
|
if (curr == curbuf->b_ml.ml_line_count && what != '}') {
|
||||||
if ((curwin->w_cursor.col = (colnr_T)STRLEN(ml_get(curr))) != 0) {
|
char_u *line = ml_get(curr);
|
||||||
--curwin->w_cursor.col;
|
|
||||||
|
// Put the cursor on the last character in the last line and make the
|
||||||
|
// motion inclusive.
|
||||||
|
if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0) {
|
||||||
|
curwin->w_cursor.col--;
|
||||||
|
curwin->w_cursor.col -=
|
||||||
|
(*mb_head_off)(line, line + curwin->w_cursor.col);
|
||||||
*pincl = true;
|
*pincl = true;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -2483,8 +2489,8 @@ static int cls(void)
|
|||||||
* Returns FAIL if the cursor was already at the end of the file.
|
* Returns FAIL if the cursor was already at the end of the file.
|
||||||
* If eol is TRUE, last word stops at end of line (for operators).
|
* If eol is TRUE, last word stops at end of line (for operators).
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
fwd_word (
|
fwd_word(
|
||||||
long count,
|
long count,
|
||||||
int bigword, /* "W", "E" or "B" */
|
int bigword, /* "W", "E" or "B" */
|
||||||
int eol
|
int eol
|
||||||
@ -2666,8 +2672,8 @@ finished:
|
|||||||
*
|
*
|
||||||
* Returns FAIL if start of the file was reached.
|
* Returns FAIL if start of the file was reached.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bckend_word (
|
bckend_word(
|
||||||
long count,
|
long count,
|
||||||
int bigword, /* TRUE for "B" */
|
int bigword, /* TRUE for "B" */
|
||||||
int eol /* TRUE: stop at end of line. */
|
int eol /* TRUE: stop at end of line. */
|
||||||
@ -2756,8 +2762,8 @@ static void find_first_blank(pos_T *posp)
|
|||||||
/*
|
/*
|
||||||
* Skip count/2 sentences and count/2 separating white spaces.
|
* Skip count/2 sentences and count/2 separating white spaces.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
findsent_forward (
|
findsent_forward(
|
||||||
long count,
|
long count,
|
||||||
int at_start_sent /* cursor is at start of sentence */
|
int at_start_sent /* cursor is at start of sentence */
|
||||||
)
|
)
|
||||||
@ -2776,8 +2782,8 @@ findsent_forward (
|
|||||||
* Find word under cursor, cursor at end.
|
* Find word under cursor, cursor at end.
|
||||||
* Used while an operator is pending, and in Visual mode.
|
* Used while an operator is pending, and in Visual mode.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
current_word (
|
current_word(
|
||||||
oparg_T *oap,
|
oparg_T *oap,
|
||||||
long count,
|
long count,
|
||||||
int include, /* TRUE: include word and white space */
|
int include, /* TRUE: include word and white space */
|
||||||
@ -3084,8 +3090,8 @@ extend:
|
|||||||
* Find block under the cursor, cursor at end.
|
* Find block under the cursor, cursor at end.
|
||||||
* "what" and "other" are two matching parenthesis/brace/etc.
|
* "what" and "other" are two matching parenthesis/brace/etc.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
current_block (
|
current_block(
|
||||||
oparg_T *oap,
|
oparg_T *oap,
|
||||||
long count,
|
long count,
|
||||||
int include, /* TRUE == include white space */
|
int include, /* TRUE == include white space */
|
||||||
@ -3282,8 +3288,8 @@ static int in_html_tag(int end_tag)
|
|||||||
/*
|
/*
|
||||||
* Find tag block under the cursor, cursor at end.
|
* Find tag block under the cursor, cursor at end.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
current_tagblock (
|
current_tagblock(
|
||||||
oparg_T *oap,
|
oparg_T *oap,
|
||||||
long count_arg,
|
long count_arg,
|
||||||
int include /* TRUE == include white space */
|
int include /* TRUE == include white space */
|
||||||
@ -3465,8 +3471,8 @@ theend:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
current_par (
|
current_par(
|
||||||
oparg_T *oap,
|
oparg_T *oap,
|
||||||
long count,
|
long count,
|
||||||
int include, /* TRUE == include white space */
|
int include, /* TRUE == include white space */
|
||||||
@ -3632,8 +3638,8 @@ extend:
|
|||||||
* as a quote.
|
* as a quote.
|
||||||
* Returns column number of "quotechar" or -1 when not found.
|
* Returns column number of "quotechar" or -1 when not found.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
find_next_quote (
|
find_next_quote(
|
||||||
char_u *line,
|
char_u *line,
|
||||||
int col,
|
int col,
|
||||||
int quotechar,
|
int quotechar,
|
||||||
@ -3664,8 +3670,8 @@ find_next_quote (
|
|||||||
* as a quote.
|
* as a quote.
|
||||||
* Return the found column or zero.
|
* Return the found column or zero.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
find_prev_quote (
|
find_prev_quote(
|
||||||
char_u *line,
|
char_u *line,
|
||||||
int col_start,
|
int col_start,
|
||||||
int quotechar,
|
int quotechar,
|
||||||
@ -3694,8 +3700,8 @@ find_prev_quote (
|
|||||||
* Find quote under the cursor, cursor at end.
|
* Find quote under the cursor, cursor at end.
|
||||||
* Returns TRUE if found, else FALSE.
|
* Returns TRUE if found, else FALSE.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
current_quote (
|
current_quote(
|
||||||
oparg_T *oap,
|
oparg_T *oap,
|
||||||
long count,
|
long count,
|
||||||
int include, /* TRUE == include quote char */
|
int include, /* TRUE == include quote char */
|
||||||
@ -3920,8 +3926,8 @@ current_quote (
|
|||||||
* Find next search match under cursor, cursor at end.
|
* Find next search match under cursor, cursor at end.
|
||||||
* Used while an operator is pending, and in Visual mode.
|
* Used while an operator is pending, and in Visual mode.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
current_search (
|
current_search(
|
||||||
long count,
|
long count,
|
||||||
int forward /* move forward or backwards */
|
int forward /* move forward or backwards */
|
||||||
)
|
)
|
||||||
@ -4116,19 +4122,19 @@ int linewhite(linenr_T lnum)
|
|||||||
* Find identifiers or defines in included files.
|
* Find identifiers or defines in included files.
|
||||||
* If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
|
* If p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
find_pattern_in_path (
|
find_pattern_in_path(
|
||||||
char_u *ptr, /* pointer to search pattern */
|
char_u *ptr, // pointer to search pattern
|
||||||
int dir, /* direction of expansion */
|
int dir, // direction of expansion
|
||||||
size_t len, /* length of search pattern */
|
size_t len, // length of search pattern
|
||||||
int whole, /* match whole words only */
|
int whole, // match whole words only
|
||||||
int skip_comments, /* don't match inside comments */
|
int skip_comments, // don't match inside comments
|
||||||
int type, /* Type of search; are we looking for a type?
|
int type, // Type of search; are we looking for a type?
|
||||||
a macro? */
|
// a macro?
|
||||||
long count,
|
long count,
|
||||||
int action, /* What to do when we find it */
|
int action, // What to do when we find it
|
||||||
linenr_T start_lnum, /* first line to start searching */
|
linenr_T start_lnum, // first line to start searching
|
||||||
linenr_T end_lnum /* last line for searching */
|
linenr_T end_lnum // last line for searching
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SearchedFile *files; /* Stack of included files */
|
SearchedFile *files; /* Stack of included files */
|
||||||
|
@ -2387,3 +2387,15 @@ func Test_changelist()
|
|||||||
%bwipe!
|
%bwipe!
|
||||||
let &ul = save_ul
|
let &ul = save_ul
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_delete_until_paragraph()
|
||||||
|
if !has('multi_byte')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
new
|
||||||
|
normal grádv}
|
||||||
|
call assert_equal('á', getline(1))
|
||||||
|
normal grád}
|
||||||
|
call assert_equal('', getline(1))
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
Loading…
Reference in New Issue
Block a user