aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-08-08 02:22:34 +0200
committerGitHub <noreply@github.com>2018-08-08 02:22:34 +0200
commitb7a417c5e6b510a0023e544463edd6feef30f9d2 (patch)
treeee335ecbd0542a81a3cae584a4165dc0620131d6 /src/nvim/ex_cmds.c
parentc06613d2f6c3f3a864c43e03b95d12efb3e0f4a6 (diff)
parentd5e8b3f451120d7b40d72b54d749fbe7b54ca90f (diff)
downloadrneovim-b7a417c5e6b510a0023e544463edd6feef30f9d2.tar.gz
rneovim-b7a417c5e6b510a0023e544463edd6feef30f9d2.tar.bz2
rneovim-b7a417c5e6b510a0023e544463edd6feef30f9d2.zip
Merge #8744 from janlazo/vim-8.0.0890
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index e99de1ad41..1420a9aae4 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -716,11 +716,13 @@ void ex_retab(exarg_T *eap)
memmove(new_line + start_col + len,
ptr + col, (size_t)(old_len - col + 1));
ptr = new_line + start_col;
- for (col = 0; col < len; col++)
+ for (col = 0; col < len; col++) {
ptr[col] = (col < num_tabs) ? '\t' : ' ';
- ml_replace(lnum, new_line, FALSE);
- if (first_line == 0)
+ }
+ ml_replace(lnum, new_line, false);
+ if (first_line == 0) {
first_line = lnum;
+ }
last_line = lnum;
ptr = new_line;
col = start_col + len;
@@ -1598,6 +1600,7 @@ void ex_file(exarg_T *eap)
// print full file name if :cd used
fileinfo(false, false, eap->forceit);
}
+ redraw_tabline = true;
}
/*
@@ -3624,7 +3627,7 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
// before the cursor.
len_change = (int)STRLEN(new_line) - (int)STRLEN(orig_line);
curwin->w_cursor.col += len_change;
- ml_replace(lnum, new_line, FALSE);
+ ml_replace(lnum, new_line, false);
}
search_match_lines = regmatch.endpos[0].lnum
@@ -3666,9 +3669,10 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout,
msg_col = 0;
gotocmdline(TRUE);
- /* restore the line */
- if (orig_line != NULL)
- ml_replace(lnum, orig_line, FALSE);
+ // restore the line
+ if (orig_line != NULL) {
+ ml_replace(lnum, orig_line, false);
+ }
}
need_wait_return = FALSE; /* no hit-return prompt */
@@ -3925,9 +3929,10 @@ skip:
prev_matchcol = (colnr_T)STRLEN(sub_firstline)
- prev_matchcol;
- if (u_savesub(lnum) != OK)
+ if (u_savesub(lnum) != OK) {
break;
- ml_replace(lnum, new_start, TRUE);
+ }
+ ml_replace(lnum, new_start, true);
if (nmatch_tl > 0) {
/*