aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2018-01-26 20:25:53 +0100
committerKillTheMule <KillTheMule@users.noreply.github.com>2018-05-23 22:07:27 +0200
commit37b8e95fd69ba4991454f79802bfe1bccf7c827a (patch)
treeb75965914390d1a13478ec244eee898bc49b6214 /src
parent8bcc01195968b84d1a74ecb82598bdf538004404 (diff)
downloadrneovim-37b8e95fd69ba4991454f79802bfe1bccf7c827a.tar.gz
rneovim-37b8e95fd69ba4991454f79802bfe1bccf7c827a.tar.bz2
rneovim-37b8e95fd69ba4991454f79802bfe1bccf7c827a.zip
Lint
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/buffer.c11
-rw-r--r--src/nvim/buffer.c6
-rw-r--r--src/nvim/ex_cmds.c3
-rw-r--r--src/nvim/misc1.c14
-rw-r--r--src/nvim/ops.c8
-rw-r--r--src/nvim/undo.c2
6 files changed, 23 insertions, 21 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 2c7480a16b..6778227a27 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -85,9 +85,9 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
/// @return False when live updates couldn't be enabled because the buffer isn't
/// loaded; otherwise True.
Boolean nvim_buf_live_updates_start(uint64_t channel_id,
- Buffer buffer,
- Boolean send_buffer,
- Error *err)
+ Buffer buffer,
+ Boolean send_buffer,
+ Error *err)
FUNC_API_SINCE(4) FUNC_API_REMOTE_ONLY
{
buf_T *buf = find_buffer_by_handle(buffer, err);
@@ -97,7 +97,6 @@ Boolean nvim_buf_live_updates_start(uint64_t channel_id,
}
return liveupdate_register(buf, channel_id, send_buffer);
-
}
//
/// Deactivate live updates from this buffer to the current channel.
@@ -107,8 +106,8 @@ Boolean nvim_buf_live_updates_start(uint64_t channel_id,
/// @return False when live updates couldn't be disabled because the buffer
/// isn't loaded; otherwise True.
Boolean nvim_buf_live_updates_stop(uint64_t channel_id,
- Buffer buffer,
- Error *err)
+ Buffer buffer,
+ Error *err)
FUNC_API_SINCE(4) FUNC_API_REMOTE_ONLY
{
buf_T *buf = find_buffer_by_handle(buffer, err);
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 124e479686..e7ff25ce6b 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1738,9 +1738,9 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags)
if (flags & BLN_DUMMY)
buf->b_flags |= BF_DUMMY;
buf_clear_file(buf);
- clrallmarks(buf); /* clear marks */
- fmarks_check_names(buf); /* check file marks for this file */
- buf->b_p_bl = (flags & BLN_LISTED) ? TRUE : FALSE; /* init 'buflisted' */
+ clrallmarks(buf); // clear marks
+ fmarks_check_names(buf); // check file marks for this file
+ buf->b_p_bl = (flags & BLN_LISTED) ? true : false; // init 'buflisted'
kv_destroy(buf->liveupdate_channels);
kv_init(buf->liveupdate_channels);
if (!(flags & BLN_DUMMY)) {
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index d68dbc8676..e418e0c20e 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -745,8 +745,9 @@ void ex_retab(exarg_T *eap)
if (curbuf->b_p_ts != new_ts)
redraw_curbuf_later(NOT_VALID);
- if (first_line != 0)
+ if (first_line != 0) {
changed_lines(first_line, 0, last_line + 1, 0L, true);
+ }
curwin->w_p_list = save_list; /* restore 'list' */
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index a3b2d5e7a4..e2094d7293 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -837,7 +837,7 @@ open_line (
if (did_append) {
changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col,
curwin->w_cursor.lnum + 1, 1L, true);
- did_append = FALSE;
+ did_append = false;
/* Move marks after the line break to the new line. */
if (flags & OPENLINE_MARKFIX)
@@ -1914,12 +1914,12 @@ void deleted_lines_mark(linenr_T lnum, long count)
* Takes care of calling changed() and updating b_mod_*.
* Careful: may trigger autocommands that reload the buffer.
*/
-void
-changed_lines (
- linenr_T lnum, /* first line with change */
- colnr_T col, /* column in first line with change */
- linenr_T lnume, /* line below last changed line */
- long xtra, /* number of extra lines (negative when deleting) */
+void
+changed_lines(
+ linenr_T lnum, // first line with change
+ colnr_T col, // column in first line with change
+ linenr_T lnume, // line below last changed line
+ long xtra, // number of extra lines (negative when deleting)
bool send_liveupdate // some callers like undo/redo call changed_lines()
// and then increment b_changedtick *again*. This flag
// allows these callers to send the LiveUpdate events
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 692713af73..c9e8344ac1 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -632,12 +632,13 @@ void op_reindent(oparg_T *oap, Indenter how)
/* Mark changed lines so that they will be redrawn. When Visual
* highlighting was present, need to continue until the last line. When
* there is no change still need to remove the Visual highlighting. */
- if (last_changed != 0)
+ if (last_changed != 0) {
changed_lines(first_changed, 0,
oap->is_VIsual ? start_lnum + oap->line_count :
last_changed + 1, 0L, true);
- else if (oap->is_VIsual)
+ } else if (oap->is_VIsual) {
redraw_curbuf_later(INVERTED);
+ }
if (oap->line_count > p_report) {
i = oap->line_count - (i + 1);
@@ -1856,8 +1857,9 @@ void op_tilde(oparg_T *oap)
did_change |= one_change;
}
- if (did_change)
+ if (did_change) {
changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L, true);
+ }
} else { // not block mode
if (oap->motion_type == kMTLineWise) {
oap->start.col = 0;
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 27d745a254..1c14e93211 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2030,7 +2030,7 @@ void undo_time(long step, int sec, int file, int absolute)
break;
curbuf->b_u_curhead = uhp;
u_undoredo(true, true);
- uhp->uh_walk = nomark; /* don't go back down here */
+ uhp->uh_walk = nomark; // don't go back down here
}
/*