mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
d5894ada70
commit
122c0dfb5d
@ -523,7 +523,7 @@ static int insert_check(VimState *state)
|
||||
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) {
|
||||
s->inserted_space = false;
|
||||
}
|
||||
@ -835,7 +835,7 @@ static int insert_handle_key(InsertState *s)
|
||||
|
||||
case Ctrl_C: // End input mode
|
||||
if (s->c == Ctrl_C && cmdwin_type != 0) {
|
||||
// Close the cmdline window. */
|
||||
// Close the cmdline window.
|
||||
cmdwin_result = K_IGNORE;
|
||||
got_int = false; // don't stop executing autocommands et al
|
||||
s->nomove = true;
|
||||
@ -6346,8 +6346,8 @@ void auto_format(bool trailblank, bool prev_line)
|
||||
curwin->w_cursor = pos;
|
||||
}
|
||||
|
||||
/* With the 'c' flag in 'formatoptions' and 't' missing: only format
|
||||
* comments. */
|
||||
// With the 'c' flag in 'formatoptions' and 't' missing: only format
|
||||
// comments.
|
||||
if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP)
|
||||
&& get_leader_len(old, NULL, false, true) == 0) {
|
||||
return;
|
||||
|
@ -2026,9 +2026,9 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, lval_T *const lp, co
|
||||
p);
|
||||
lp->ll_name = lp->ll_exp_name;
|
||||
if (lp->ll_exp_name == NULL) {
|
||||
/* Report an invalid expression in braces, unless the
|
||||
* expression evaluation has been cancelled due to an
|
||||
* aborting error, an interrupt, or an exception. */
|
||||
// Report an invalid expression in braces, unless the
|
||||
// expression evaluation has been cancelled due to an
|
||||
// aborting error, an interrupt, or an exception.
|
||||
if (!aborting() && !quiet) {
|
||||
emsg_severe = true;
|
||||
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_di = tv_dict_find(lp->ll_dict, (const char *)key, len);
|
||||
|
||||
/* When assigning to a scope dictionary check that a function and
|
||||
* variable name is valid (only variable name unless it is l: or
|
||||
* g: dictionary). Disallow overwriting a builtin function. */
|
||||
// When assigning to a scope dictionary check that a function and
|
||||
// variable name is valid (only variable name unless it is l: or
|
||||
// g: dictionary). Disallow overwriting a builtin function.
|
||||
if (rettv != NULL && lp->ll_dict->dv_scope != 0) {
|
||||
int prevval;
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
/* Doesn't look like something valid, expand as an expression
|
||||
* anyway. */
|
||||
// Doesn't look like something valid, expand as an expression
|
||||
// anyway.
|
||||
xp->xp_context = EXPAND_EXPRESSION;
|
||||
}
|
||||
arg = xp->xp_pattern;
|
||||
@ -4927,9 +4927,9 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
|
||||
++p;
|
||||
nr = (nr << 4) + hex2nr(*p);
|
||||
}
|
||||
++p;
|
||||
/* For "\u" store the number according to
|
||||
* 'encoding'. */
|
||||
p++;
|
||||
// For "\u" store the number according to
|
||||
// 'encoding'.
|
||||
if (c != 'X') {
|
||||
name += utf_char2bytes(nr, name);
|
||||
} 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 == ':') {
|
||||
// "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);
|
||||
if ((len > 1 && p[-1] != '}')
|
||||
|| (len == 1 && vim_strchr(namespace_char, *arg) == NULL)) {
|
||||
@ -9825,12 +9825,12 @@ void ex_echo(exarg_T *eap)
|
||||
if (!eap->skip) {
|
||||
if (atstart) {
|
||||
atstart = false;
|
||||
/* Call msg_start() after eval1(), evaluating the expression
|
||||
* may cause a message to appear. */
|
||||
// Call msg_start() after eval1(), evaluating the expression
|
||||
// may cause a message to appear.
|
||||
if (eap->cmdidx == CMD_echo) {
|
||||
/* Mark the saved text as finishing the line, so that what
|
||||
* follows is displayed on a new line when scrolling back
|
||||
* at the more prompt. */
|
||||
// Mark the saved text as finishing the line, so that what
|
||||
// follows is displayed on a new line when scrolling back
|
||||
// at the more prompt.
|
||||
msg_sb_eol();
|
||||
msg_start();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user