mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.2368: using old C style comments
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
c667da5185
This commit is contained in:
parent
b4acae2c4a
commit
86f32dfcdd
@ -526,8 +526,8 @@ bool close_buffer(win_T *win, buf_T *buf, int action, bool abort_if_last)
|
|||||||
diff_buf_delete(buf); // Clear 'diff' for hidden buffer.
|
diff_buf_delete(buf); // Clear 'diff' for hidden buffer.
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return when a window is displaying the buffer or when it's not
|
// Return when a window is displaying the buffer or when it's not
|
||||||
* unloaded. */
|
// unloaded.
|
||||||
if (buf->b_nwindows > 0 || !unload_buf) {
|
if (buf->b_nwindows > 0 || !unload_buf) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1591,8 +1591,8 @@ void enter_buffer(buf_T *buf)
|
|||||||
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, false, curbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If autocommands did not change the cursor position, restore cursor lnum
|
// If autocommands did not change the cursor position, restore cursor lnum
|
||||||
* and possibly cursor col. */
|
// and possibly cursor col.
|
||||||
if (curwin->w_cursor.lnum == 1 && inindent(0)) {
|
if (curwin->w_cursor.lnum == 1 && inindent(0)) {
|
||||||
buflist_getfpos();
|
buflist_getfpos();
|
||||||
}
|
}
|
||||||
@ -1754,8 +1754,8 @@ buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int fl
|
|||||||
if ((flags & BLN_CURBUF) && curbuf_reusable()) {
|
if ((flags & BLN_CURBUF) && curbuf_reusable()) {
|
||||||
assert(curbuf != NULL);
|
assert(curbuf != NULL);
|
||||||
buf = curbuf;
|
buf = curbuf;
|
||||||
/* It's like this buffer is deleted. Watch out for autocommands that
|
// It's like this buffer is deleted. Watch out for autocommands that
|
||||||
* change curbuf! If that happens, allocate a new buffer anyway. */
|
// change curbuf! If that happens, allocate a new buffer anyway.
|
||||||
if (curbuf->b_p_bl) {
|
if (curbuf->b_p_bl) {
|
||||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, false, curbuf);
|
||||||
}
|
}
|
||||||
@ -2257,8 +2257,8 @@ int buflist_findpat(const char_u *pattern, const char_u *pattern_end, bool unlis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only search for unlisted buffers if there was no match with
|
// Only search for unlisted buffers if there was no match with
|
||||||
* a listed buffer. */
|
// a listed buffer.
|
||||||
if (!unlisted || !find_listed || match != -1) {
|
if (!unlisted || !find_listed || match != -1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2895,8 +2895,8 @@ void buf_set_name(int fnum, char_u *name)
|
|||||||
xfree(buf->b_ffname);
|
xfree(buf->b_ffname);
|
||||||
buf->b_ffname = vim_strsave(name);
|
buf->b_ffname = vim_strsave(name);
|
||||||
buf->b_sfname = NULL;
|
buf->b_sfname = NULL;
|
||||||
/* Allocate ffname and expand into full path. Also resolves .lnk
|
// Allocate ffname and expand into full path. Also resolves .lnk
|
||||||
* files on Win32. */
|
// files on Win32.
|
||||||
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
||||||
buf->b_fname = buf->b_sfname;
|
buf->b_fname = buf->b_sfname;
|
||||||
}
|
}
|
||||||
@ -3168,8 +3168,8 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate)
|
|||||||
(void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
|
(void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
|
||||||
|
|
||||||
if (dont_truncate) {
|
if (dont_truncate) {
|
||||||
/* Temporarily set msg_scroll to avoid the message being truncated.
|
// Temporarily set msg_scroll to avoid the message being truncated.
|
||||||
* First call msg_start() to get the message in the right place. */
|
// First call msg_start() to get the message in the right place.
|
||||||
msg_start();
|
msg_start();
|
||||||
n = msg_scroll;
|
n = msg_scroll;
|
||||||
msg_scroll = true;
|
msg_scroll = true;
|
||||||
@ -5235,8 +5235,8 @@ void do_modelines(int flags)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disallow recursive entry here. Can happen when executing a modeline
|
// Disallow recursive entry here. Can happen when executing a modeline
|
||||||
* triggers an autocommand, which reloads modelines with a ":do". */
|
// triggers an autocommand, which reloads modelines with a ":do".
|
||||||
if (entered) {
|
if (entered) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user