aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/ui.c2
-rw-r--r--src/nvim/event/socket.c2
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/normal.c13
-rw-r--r--src/nvim/os/signal.c3
-rw-r--r--src/nvim/path.c2
6 files changed, 11 insertions, 13 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index db8a5d93d0..f6f32a73ed 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -537,7 +537,7 @@ static void prepare_call(RemoteUI *ui, const char *name)
ui_alloc_buf(ui);
}
- // To optimize data transfer(especially for "grid_line"), we bundle adjacent
+ // To optimize data transfer (especially for "grid_line"), we bundle adjacent
// calls to same method together, so only add a new call entry if the last
// method call is different from "name"
diff --git a/src/nvim/event/socket.c b/src/nvim/event/socket.c
index 1214c3e336..c340ef2826 100644
--- a/src/nvim/event/socket.c
+++ b/src/nvim/event/socket.c
@@ -33,7 +33,7 @@ int socket_watcher_init(Loop *loop, SocketWatcher *watcher, const char *endpoint
char *host_end = strrchr(addr, ':');
if (host_end && addr != host_end) {
- // Split user specified address into two strings, addr(hostname) and port.
+ // Split user specified address into two strings, addr (hostname) and port.
// The port part in watcher->addr will be updated later.
*host_end = NUL;
char *port = host_end + 1;
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index b5fa05e5a4..fc20748309 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2593,7 +2593,7 @@ static bool cmdpreview_may_show(CommandLineState *s)
// Place it there in case preview callback flushes it. #30696
cursorcmd();
// Flush now: external cmdline may itself wish to update the screen which is
- // currently disallowed during cmdpreview(no longer needed in case that changes).
+ // currently disallowed during cmdpreview (no longer needed in case that changes).
cmdline_ui_flush();
// Swap invalid command range if needed
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 74f851a097..7d0080622d 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -97,7 +97,7 @@ typedef struct {
bool previous_got_int; // `got_int` was true
bool cmdwin; // command-line window normal mode
bool noexmode; // true if the normal mode was pushed from
- // ex mode(:global or :visual for example)
+ // ex mode (:global or :visual for example)
bool toplevel; // top-level normal mode
oparg_T oa; // operator arguments
cmdarg_T ca; // command arguments
@@ -504,9 +504,9 @@ bool op_pending(void)
/// Normal state entry point. This is called on:
///
/// - Startup, In this case the function never returns.
-/// - The command-line window is opened(`q:`). Returns when `cmdwin_result` != 0.
+/// - The command-line window is opened (`q:`). Returns when `cmdwin_result` != 0.
/// - The :visual command is called from :global in ex mode, `:global/PAT/visual`
-/// for example. Returns when re-entering ex mode(because ex mode recursion is
+/// for example. Returns when re-entering ex mode (because ex mode recursion is
/// not allowed)
///
/// This used to be called main_loop() on main.c
@@ -642,8 +642,7 @@ static bool normal_need_redraw_mode_message(NormalState *s)
return (
// 'showmode' is set and messages can be printed
((p_smd && msg_silent == 0
- // must restart insert mode(ctrl+o or ctrl+l) or we just entered visual
- // mode
+ // must restart insert mode (ctrl+o or ctrl+l) or just entered visual mode
&& (restart_edit != 0 || (VIsual_active
&& s->old_pos.lnum == curwin->w_cursor.lnum
&& s->old_pos.col == curwin->w_cursor.col))
@@ -6625,8 +6624,8 @@ static void nv_event(cmdarg_T *cap)
// `input_get` branch was not executed (!multiqueue_empty(loop.events), which
// could have `may_garbage_collect` set to true in `normal_check`).
//
- // That is because here we may run code that calls `input_get`
- // later(`f_confirm` or `get_keystroke` for example), but in these cases it is
+ // That is because here we may run code that calls `input_get` later
+ // (`f_confirm` or `get_keystroke` for example), but in these cases it is
// not safe to perform garbage collection because there could be unreferenced
// lists or dicts being used.
may_garbage_collect = false;
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c
index ecedf144e5..98d13fc9d1 100644
--- a/src/nvim/os/signal.c
+++ b/src/nvim/os/signal.c
@@ -187,8 +187,7 @@ static void on_signal(SignalWatcher *handle, int signum, void *data)
switch (signum) {
#ifdef SIGPWR
case SIGPWR:
- // Signal of a power failure(eg batteries low), flush the swap files to
- // be safe
+ // Signal of a power failure (eg batteries low), flush the swap files to be safe
ml_sync_all(false, false, true);
break;
#endif
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 08a63eacd0..3df77571a1 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -2073,7 +2073,7 @@ char *path_shorten_fname(char *full_path, char *dir_name)
/// @param[in] flags Flags passed to expand_wildcards().
///
/// @returns OK when *file is set to allocated array of matches
-/// and *num_file(can be zero) to the number of matches.
+/// and *num_file (can be zero) to the number of matches.
/// If FAIL is returned, *num_file and *file are either
/// unchanged or *num_file is set to 0 and *file is set
/// to NULL or points to "".