mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 14:28:18 +00:00
Merge pull request #1728 from fwalch/small-patches2
vim-patch: Multiple small patches (2)
This commit is contained in:
@@ -1058,6 +1058,9 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he
|
||||
if (col >= (colnr_T)wp->w_width) {
|
||||
col -= wp->w_width;
|
||||
numberextra = wp->w_width - (numberextra - win_col_off2(wp));
|
||||
if (numberextra > 0) {
|
||||
col %= numberextra;
|
||||
}
|
||||
if (*p_sbr != NUL) {
|
||||
colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
|
||||
if (col >= sbrlen)
|
||||
|
@@ -2237,7 +2237,7 @@ void ex_diffgetput(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
buf_empty = FALSE;
|
||||
buf_empty = bufempty();
|
||||
added = 0;
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
|
@@ -15278,7 +15278,7 @@ static void f_winrestview(typval_T *argvars, typval_T *rettv)
|
||||
win_new_width(curwin, curwin->w_width);
|
||||
changed_window_setting();
|
||||
|
||||
if (curwin->w_topline == 0)
|
||||
if (curwin->w_topline <= 0)
|
||||
curwin->w_topline = 1;
|
||||
if (curwin->w_topline > curbuf->b_ml.ml_line_count)
|
||||
curwin->w_topline = curbuf->b_ml.ml_line_count;
|
||||
@@ -19665,6 +19665,7 @@ char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, char_u *flags)
|
||||
regmatch_T regmatch;
|
||||
int do_all;
|
||||
char_u *tail;
|
||||
char_u *end;
|
||||
garray_T ga;
|
||||
char_u *save_cpo;
|
||||
char_u *zero_width = NULL;
|
||||
@@ -19681,6 +19682,7 @@ char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, char_u *flags)
|
||||
regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
if (regmatch.regprog != NULL) {
|
||||
tail = str;
|
||||
end = str + STRLEN(str);
|
||||
while (vim_regexec_nl(®match, str, (colnr_T)(tail - str))) {
|
||||
/* Skip empty match except for first match. */
|
||||
if (regmatch.startp[0] == regmatch.endp[0]) {
|
||||
@@ -19703,7 +19705,7 @@ char_u *do_string_sub(char_u *str, char_u *pat, char_u *sub, char_u *flags)
|
||||
* - The text after the match.
|
||||
*/
|
||||
sublen = vim_regsub(®match, sub, tail, FALSE, TRUE, FALSE);
|
||||
ga_grow(&ga, (int)(STRLEN(tail) + sublen -
|
||||
ga_grow(&ga, (int)((end - tail) + sublen -
|
||||
(regmatch.endp[0] - regmatch.startp[0])));
|
||||
|
||||
/* copy the text up to where the match is */
|
||||
|
@@ -70,6 +70,7 @@
|
||||
#include "nvim/os/input.h"
|
||||
#include "nvim/os/time.h"
|
||||
#include "nvim/ex_cmds_defs.h"
|
||||
#include "nvim/mouse.h"
|
||||
|
||||
static int quitmore = 0;
|
||||
static int ex_pressedreturn = FALSE;
|
||||
@@ -7222,8 +7223,10 @@ static void ex_normal(exarg_T *eap)
|
||||
msg_didout |= save_msg_didout; /* don't reset msg_didout now */
|
||||
|
||||
/* Restore the state (needed when called from a function executed for
|
||||
* 'indentexpr'). */
|
||||
* 'indentexpr'). Update the mouse and cursor, they may have changed. */
|
||||
State = save_State;
|
||||
setmouse();
|
||||
ui_cursor_shape(); /* may show different cursor shape */
|
||||
free(arg);
|
||||
}
|
||||
|
||||
|
@@ -3583,6 +3583,12 @@ restore_backup:
|
||||
&& (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)
|
||||
) {
|
||||
unchanged(buf, TRUE);
|
||||
/* buf->b_changedtick is always incremented in unchanged() but that
|
||||
* should not trigger a TextChanged event. */
|
||||
if (last_changedtick + 1 == buf->b_changedtick
|
||||
&& last_changedtick_buf == buf) {
|
||||
last_changedtick = buf->b_changedtick;
|
||||
}
|
||||
u_unchanged(buf);
|
||||
u_update_save_nr(buf);
|
||||
}
|
||||
|
@@ -3955,7 +3955,6 @@ skip_add:
|
||||
#endif
|
||||
switch (state->c) {
|
||||
case NFA_MATCH:
|
||||
//nfa_match = TRUE;
|
||||
break;
|
||||
|
||||
case NFA_SPLIT:
|
||||
|
@@ -239,17 +239,17 @@ static int included_patches[] = {
|
||||
//502,
|
||||
//501 NA
|
||||
//500,
|
||||
//499,
|
||||
499,
|
||||
//498 NA
|
||||
//497,
|
||||
//496 NA
|
||||
//495 NA
|
||||
//494,
|
||||
//493,
|
||||
494,
|
||||
493,
|
||||
//492,
|
||||
//491,
|
||||
491,
|
||||
//490,
|
||||
//489,
|
||||
489,
|
||||
//488,
|
||||
//487,
|
||||
//486,
|
||||
@@ -261,10 +261,10 @@ static int included_patches[] = {
|
||||
//480 NA
|
||||
//479 NA
|
||||
478,
|
||||
//477,
|
||||
477,
|
||||
//476 NA
|
||||
//475 NA
|
||||
//474,
|
||||
474,
|
||||
473,
|
||||
472,
|
||||
//471 NA
|
||||
|
Reference in New Issue
Block a user