aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-04-13 22:49:00 +0200
committerGitHub <noreply@github.com>2020-04-13 22:49:00 +0200
commit93b2cb7a3824f91ee24ddf57406d5682699f684b (patch)
tree4ea7bb4aca7520a26a749b0958046ba52b450d4f /src/nvim/window.c
parent13b4a6fd4fa67794e76892cb362121a33a756f58 (diff)
parentcf223e7d78df5e8a63b84d423be55a29eefd8883 (diff)
downloadrneovim-93b2cb7a3824f91ee24ddf57406d5682699f684b.tar.gz
rneovim-93b2cb7a3824f91ee24ddf57406d5682699f684b.tar.bz2
rneovim-93b2cb7a3824f91ee24ddf57406d5682699f684b.zip
Merge pull request #11997 from janlazo/vim-8.1.2389
[RDY]vim-patch:8.1.{1745,2147,2280,2282,},8.2.{41,134,365,366,381,387,389,397,398,406,415,457,464,473,474,507,544,549}
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 9ec47f8e89..a89715ff79 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -6544,10 +6544,12 @@ void restore_buffer(bufref_T *save_curbuf)
/// @param[in] id a desired ID 'id' can be specified
/// (greater than or equal to 1). -1 must be specified if no
/// particular ID is desired
+/// @param[in] conceal_char pointer to conceal replacement char
/// @return ID of added match, -1 on failure.
int match_add(win_T *wp, const char *const grp, const char *const pat,
int prio, int id, list_T *pos_list,
const char *const conceal_char)
+ FUNC_ATTR_NONNULL_ARG(1, 2)
{
matchitem_T *cur;
matchitem_T *prev;
@@ -6584,7 +6586,7 @@ int match_add(win_T *wp, const char *const grp, const char *const pat,
return -1;
}
- /* Find available match ID. */
+ // Find available match ID.
while (id == -1) {
cur = wp->w_match_head;
while (cur != NULL && cur->id != wp->w_next_match_id)
@@ -6594,7 +6596,7 @@ int match_add(win_T *wp, const char *const grp, const char *const pat,
wp->w_next_match_id++;
}
- /* Build new match. */
+ // Build new match.
m = xcalloc(1, sizeof(matchitem_T));
m->id = id;
m->priority = prio;
@@ -6702,9 +6704,9 @@ int match_add(win_T *wp, const char *const grp, const char *const pat,
rtype = VALID;
}
}
-
- /* Insert new match. The match list is in ascending order with regard to
- * the match priorities. */
+
+ // Insert new match. The match list is in ascending order with regard to
+ // the match priorities.
cur = wp->w_match_head;
prev = cur;
while (cur != NULL && prio >= cur->priority) {