vim-patch:8.1.2378: using old C style comments

Problem:    Using old C style comments.
Solution:   Use // comments where appropriate.
5d18efecfd
This commit is contained in:
Dundar Göc
2021-10-20 16:10:23 +02:00
parent d5894ada70
commit 122c0dfb5d
2 changed files with 21 additions and 21 deletions

View File

@@ -523,7 +523,7 @@ static int insert_check(VimState *state)
did_cursorhold = false; did_cursorhold = false;
} }
// If the cursor was moved we didn't just insert a space */ // If the cursor was moved we didn't just insert a space
if (arrow_used) { if (arrow_used) {
s->inserted_space = false; s->inserted_space = false;
} }
@@ -835,7 +835,7 @@ static int insert_handle_key(InsertState *s)
case Ctrl_C: // End input mode case Ctrl_C: // End input mode
if (s->c == Ctrl_C && cmdwin_type != 0) { if (s->c == Ctrl_C && cmdwin_type != 0) {
// Close the cmdline window. */ // Close the cmdline window.
cmdwin_result = K_IGNORE; cmdwin_result = K_IGNORE;
got_int = false; // don't stop executing autocommands et al got_int = false; // don't stop executing autocommands et al
s->nomove = true; s->nomove = true;
@@ -6346,8 +6346,8 @@ void auto_format(bool trailblank, bool prev_line)
curwin->w_cursor = pos; curwin->w_cursor = pos;
} }
/* With the 'c' flag in 'formatoptions' and 't' missing: only format // With the 'c' flag in 'formatoptions' and 't' missing: only format
* comments. */ // comments.
if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP) if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP)
&& get_leader_len(old, NULL, false, true) == 0) { && get_leader_len(old, NULL, false, true) == 0) {
return; return;

View File

@@ -2026,9 +2026,9 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, lval_T *const lp, co
p); p);
lp->ll_name = lp->ll_exp_name; lp->ll_name = lp->ll_exp_name;
if (lp->ll_exp_name == NULL) { if (lp->ll_exp_name == NULL) {
/* Report an invalid expression in braces, unless the // Report an invalid expression in braces, unless the
* expression evaluation has been cancelled due to an // expression evaluation has been cancelled due to an
* aborting error, an interrupt, or an exception. */ // aborting error, an interrupt, or an exception.
if (!aborting() && !quiet) { if (!aborting() && !quiet) {
emsg_severe = true; emsg_severe = true;
EMSG2(_(e_invarg2), name); EMSG2(_(e_invarg2), name);
@@ -2173,9 +2173,9 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, lval_T *const lp, co
lp->ll_dict = lp->ll_tv->vval.v_dict; lp->ll_dict = lp->ll_tv->vval.v_dict;
lp->ll_di = tv_dict_find(lp->ll_dict, (const char *)key, len); lp->ll_di = tv_dict_find(lp->ll_dict, (const char *)key, len);
/* When assigning to a scope dictionary check that a function and // When assigning to a scope dictionary check that a function and
* variable name is valid (only variable name unless it is l: or // variable name is valid (only variable name unless it is l: or
* g: dictionary). Disallow overwriting a builtin function. */ // g: dictionary). Disallow overwriting a builtin function.
if (rettv != NULL && lp->ll_dict->dv_scope != 0) { if (rettv != NULL && lp->ll_dict->dv_scope != 0) {
int prevval; int prevval;
int wrong; int wrong;
@@ -2758,8 +2758,8 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx)
xp->xp_context = EXPAND_EXPRESSION; xp->xp_context = EXPAND_EXPRESSION;
} }
} else { } else {
/* Doesn't look like something valid, expand as an expression // Doesn't look like something valid, expand as an expression
* anyway. */ // anyway.
xp->xp_context = EXPAND_EXPRESSION; xp->xp_context = EXPAND_EXPRESSION;
} }
arg = xp->xp_pattern; arg = xp->xp_pattern;
@@ -4927,9 +4927,9 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
++p; ++p;
nr = (nr << 4) + hex2nr(*p); nr = (nr << 4) + hex2nr(*p);
} }
++p; p++;
/* For "\u" store the number according to // For "\u" store the number according to
* 'encoding'. */ // 'encoding'.
if (c != 'X') { if (c != 'X') {
name += utf_char2bytes(nr, name); name += utf_char2bytes(nr, name);
} else { } else {
@@ -8452,7 +8452,7 @@ const char_u *find_name_end(const char_u *arg, const char_u **expr_start, const
} }
} else if (br_nest == 0 && mb_nest == 0 && *p == ':') { } else if (br_nest == 0 && mb_nest == 0 && *p == ':') {
// "s:" is start of "s:var", but "n:" is not and can be used in // "s:" is start of "s:var", but "n:" is not and can be used in
// slice "[n:]". Also "xx:" is not a namespace. But {ns}: is. */ // slice "[n:]". Also "xx:" is not a namespace. But {ns}: is.
len = (int)(p - arg); len = (int)(p - arg);
if ((len > 1 && p[-1] != '}') if ((len > 1 && p[-1] != '}')
|| (len == 1 && vim_strchr(namespace_char, *arg) == NULL)) { || (len == 1 && vim_strchr(namespace_char, *arg) == NULL)) {
@@ -9825,12 +9825,12 @@ void ex_echo(exarg_T *eap)
if (!eap->skip) { if (!eap->skip) {
if (atstart) { if (atstart) {
atstart = false; atstart = false;
/* Call msg_start() after eval1(), evaluating the expression // Call msg_start() after eval1(), evaluating the expression
* may cause a message to appear. */ // may cause a message to appear.
if (eap->cmdidx == CMD_echo) { if (eap->cmdidx == CMD_echo) {
/* Mark the saved text as finishing the line, so that what // Mark the saved text as finishing the line, so that what
* follows is displayed on a new line when scrolling back // follows is displayed on a new line when scrolling back
* at the more prompt. */ // at the more prompt.
msg_sb_eol(); msg_sb_eol();
msg_start(); msg_start();
} }