mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0027: still some /* */ comments
Problem: Still some /* */ comments. Solution: Convert to // comments.
This commit is contained in:
36
src/indent.c
36
src/indent.c
@@ -1534,25 +1534,25 @@ ex_retab(exarg_T *eap)
|
||||
long len;
|
||||
long col;
|
||||
long vcol;
|
||||
long start_col = 0; /* For start of white-space string */
|
||||
long start_vcol = 0; /* For start of white-space string */
|
||||
long start_col = 0; // For start of white-space string
|
||||
long start_vcol = 0; // For start of white-space string
|
||||
long old_len;
|
||||
char_u *ptr;
|
||||
char_u *new_line = (char_u *)1; /* init to non-NULL */
|
||||
int did_undo; /* called u_save for current line */
|
||||
char_u *new_line = (char_u *)1; // init to non-NULL
|
||||
int did_undo; // called u_save for current line
|
||||
#ifdef FEAT_VARTABS
|
||||
int *new_vts_array = NULL;
|
||||
char_u *new_ts_str; /* string value of tab argument */
|
||||
char_u *new_ts_str; // string value of tab argument
|
||||
#else
|
||||
int temp;
|
||||
int new_ts;
|
||||
#endif
|
||||
int save_list;
|
||||
linenr_T first_line = 0; /* first changed line */
|
||||
linenr_T last_line = 0; /* last changed line */
|
||||
linenr_T first_line = 0; // first changed line
|
||||
linenr_T last_line = 0; // last changed line
|
||||
|
||||
save_list = curwin->w_p_list;
|
||||
curwin->w_p_list = 0; /* don't want list mode here */
|
||||
curwin->w_p_list = 0; // don't want list mode here
|
||||
|
||||
#ifdef FEAT_VARTABS
|
||||
new_ts_str = eap->arg;
|
||||
@@ -1593,7 +1593,7 @@ ex_retab(exarg_T *eap)
|
||||
{
|
||||
if (!got_tab && num_spaces == 0)
|
||||
{
|
||||
/* First consecutive white-space */
|
||||
// First consecutive white-space
|
||||
start_vcol = vcol;
|
||||
start_col = col;
|
||||
}
|
||||
@@ -1606,9 +1606,9 @@ ex_retab(exarg_T *eap)
|
||||
{
|
||||
if (got_tab || (eap->forceit && num_spaces > 1))
|
||||
{
|
||||
/* Retabulate this string of white-space */
|
||||
// Retabulate this string of white-space
|
||||
|
||||
/* len is virtual length of white string */
|
||||
// len is virtual length of white string
|
||||
len = num_spaces = vcol - start_vcol;
|
||||
num_tabs = 0;
|
||||
if (!curbuf->b_p_et)
|
||||
@@ -1640,12 +1640,12 @@ ex_retab(exarg_T *eap)
|
||||
if (u_save((linenr_T)(lnum - 1),
|
||||
(linenr_T)(lnum + 1)) == FAIL)
|
||||
{
|
||||
new_line = NULL; /* flag out-of-memory */
|
||||
new_line = NULL; // flag out-of-memory
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* len is actual number of white characters used */
|
||||
// len is actual number of white characters used
|
||||
len = num_spaces + num_tabs;
|
||||
old_len = (long)STRLEN(ptr);
|
||||
new_line = alloc(old_len - col + start_col + len + 1);
|
||||
@@ -1677,7 +1677,7 @@ ex_retab(exarg_T *eap)
|
||||
else
|
||||
++col;
|
||||
}
|
||||
if (new_line == NULL) /* out of memory */
|
||||
if (new_line == NULL) // out of memory
|
||||
break;
|
||||
line_breakcheck();
|
||||
}
|
||||
@@ -1690,10 +1690,10 @@ ex_retab(exarg_T *eap)
|
||||
if (tabstop_count(curbuf->b_p_vts_array) == 0
|
||||
&& tabstop_count(new_vts_array) == 1
|
||||
&& curbuf->b_p_ts == tabstop_first(new_vts_array))
|
||||
; /* not changed */
|
||||
; // not changed
|
||||
else if (tabstop_count(curbuf->b_p_vts_array) > 0
|
||||
&& tabstop_eq(curbuf->b_p_vts_array, new_vts_array))
|
||||
; /* not changed */
|
||||
; // not changed
|
||||
else
|
||||
redraw_curbuf_later(NOT_VALID);
|
||||
#else
|
||||
@@ -1703,10 +1703,10 @@ ex_retab(exarg_T *eap)
|
||||
if (first_line != 0)
|
||||
changed_lines(first_line, 0, last_line + 1, 0L);
|
||||
|
||||
curwin->w_p_list = save_list; /* restore 'list' */
|
||||
curwin->w_p_list = save_list; // restore 'list'
|
||||
|
||||
#ifdef FEAT_VARTABS
|
||||
if (new_ts_str != NULL) /* set the new tabstop */
|
||||
if (new_ts_str != NULL) // set the new tabstop
|
||||
{
|
||||
// If 'vartabstop' is in use or if the value given to retab has more
|
||||
// than one tabstop then update 'vartabstop'.
|
||||
|
Reference in New Issue
Block a user