docs: misc (#29622)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
dundargoc
2024-07-15 00:54:45 +02:00
committed by GitHub
parent da9e938793
commit 04c158fbec
14 changed files with 13 additions and 34 deletions

View File

@@ -213,9 +213,7 @@ void diff_buf_add(buf_T *buf)
semsg(_("E96: Cannot diff more than %" PRId64 " buffers"), (int64_t)DB_COUNT);
}
///
/// Remove all buffers to make diffs for.
///
static void diff_buf_clear(void)
{
for (int i = 0; i < DB_COUNT; i++) {
@@ -367,7 +365,6 @@ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T
break;
}
//
// Check for these situations:
// 1 2 3
// 1 2 3
@@ -835,7 +832,6 @@ static int diff_write(buf_T *buf, diffin_T *din)
return r;
}
///
/// Update the diffs for all buffers involved.
///
/// @param dio
@@ -909,20 +905,16 @@ theend:
xfree(dio->dio_diff.dout_fname);
}
///
/// Return true if the options are set to use the internal diff library.
/// Note that if the internal diff failed for one of the buffers, the external
/// diff will be used anyway.
///
int diff_internal(void)
FUNC_ATTR_PURE
{
return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
}
///
/// Return true if the internal diff failed for one of the diff buffers.
///
static int diff_internal_failed(void)
{
// Only need to do something when there is another buffer.
@@ -1003,11 +995,9 @@ theend:
}
}
///
/// Do a quick test if "diff" really works. Otherwise it looks like there
/// are no differences. Can't use the return value, it's non-zero when
/// there are differences.
///
static int check_external_diff(diffio_T *diffio)
{
// May try twice, first with "-a" and then without.
@@ -1091,9 +1081,7 @@ static int check_external_diff(diffio_T *diffio)
return OK;
}
///
/// Invoke the xdiff function.
///
static int diff_file_internal(diffio_T *diffio)
{
xpparam_t param;
@@ -1813,9 +1801,7 @@ void diff_clear(tabpage_T *tp)
tp->tp_first_diff = NULL;
}
///
/// return true if the options are set to use diff linematch
///
/// Return true if the options are set to use diff linematch.
bool diff_linematch(diff_T *dp)
{
if (!(diff_flags & DIFF_LINEMATCH)) {

View File

@@ -2027,7 +2027,6 @@ static void insert_special(int c, int allow_modmask, int ctrlv)
// '0' and '^' are special, because they can be followed by CTRL-D.
#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
///
/// "flags": INSCHAR_FORMAT - force formatting
/// INSCHAR_CTRLV - char typed just after CTRL-V
/// INSCHAR_NO_FEX - don't use 'formatexpr'

View File

@@ -5293,7 +5293,7 @@ M.funcs = {
Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and
`v:_null_blob` have the same `id()` with different types
because they are internally represented as NULL pointers.
`id()` returns a hexadecimal representanion of the pointers to
`id()` returns a hexadecimal representation of the pointers to
the containers (i.e. like `0x994a40`), same as `printf("%p",
{expr})`, but it is advised against counting on the exact
format of the return value.

View File

@@ -1678,8 +1678,8 @@ int vgetc(void)
vgetc_char = c;
}
// a keypad or special function key was not mapped, use it like
// its ASCII equivalent
// A keypad or special function key was not mapped, use it like
// its ASCII equivalent.
switch (c) {
case K_KPLUS:
c = '+'; break;

View File

@@ -106,7 +106,8 @@ EXTERN int Columns INIT( = DFLT_COLS); // nr of columns in the screen
// held down based on the MOD_MASK_* symbols that are read first.
EXTERN int mod_mask INIT( = 0); // current key modifiers
// The value of "mod_mask" and the unmodified character before calling merge_modifiers().
// The value of "mod_mask" and the unmodified character in vgetc() after it has
// called vgetorpeek() enough times.
EXTERN int vgetc_mod_mask INIT( = 0);
EXTERN int vgetc_char INIT( = 0);

View File

@@ -2273,7 +2273,6 @@ void highlight_changed(void)
// sentinel value. used when no highlight namespace is active
highlight_attr[HLF_COUNT] = 0;
//
// Setup the user highlights
//
// Temporarily utilize 10 more hl entries:

View File

@@ -3419,9 +3419,7 @@ term_again:
break;
}
//
// Skip preprocessor directives and blank lines.
//
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)) {
continue;
}

View File

@@ -545,10 +545,8 @@ int main(int argc, char **argv)
no_wait_return = true;
//
// Create the requested number of windows and edit buffers in them.
// Also does recovery if "recoverymode" set.
//
create_windows(&params);
TIME_MSG("opening buffers");

View File

@@ -1660,7 +1660,6 @@ size_t find_ident_at_pos(win_T *wp, linenr_T lnum, colnr_T startcol, char **text
// When starting on a ']' count it, so that we include the '['.
bn = ptr[col] == ']';
//
// 2. Back up to start of identifier/text.
//
// Remember class of character under cursor.