vim-patch:9.0.1479: small source file problems; outdated list of distrib. files (#23272)

Problem:    Small source file problems; outdated list of distributed files.
Solution:   Small updates to source files and list of distributed files.

f39d9e9dca

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2023-04-23 08:12:44 +08:00 committed by GitHub
parent 540d6c595b
commit 431b152726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -1328,8 +1328,8 @@ char *addstar(char *fname, size_t len, int context)
/// EXPAND_FILES After command with EX_XFILE set, or after setting
/// with P_EXPAND set. eg :e ^I, :w>>^I
/// EXPAND_DIRECTORIES In some cases this is used instead of the latter
/// when we know only directories are of interest. eg
/// :set dir=^I
/// when we know only directories are of interest.
/// E.g. :set dir=^I and :cd ^I
/// EXPAND_SHELLCMD After ":!cmd", ":r !cmd" or ":w !cmd".
/// EXPAND_SETTINGS Complete variable names. eg :set d^I
/// EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I

View File

@ -161,7 +161,7 @@ static char *get_buffcont(buffheader_T *buffer, int dozero)
count += strlen(bp->b_str);
}
if (count || dozero) {
if (count > 0 || dozero) {
p = xmalloc(count + 1);
char *p2 = p;
for (const buffblock_T *bp = buffer->bh_first.b_next;

View File

@ -2651,7 +2651,7 @@ static void ins_compl_update_sequence_numbers(void)
compl_T *match;
if (compl_dir_forward()) {
// search backwards for the first valid (!= -1) number.
// Search backwards for the first valid (!= -1) number.
// This should normally succeed already at the first loop
// cycle, so it's fast!
for (match = compl_curr_match->cp_prev;
@ -2671,7 +2671,7 @@ static void ins_compl_update_sequence_numbers(void)
}
} else { // BACKWARD
assert(compl_direction == BACKWARD);
// search forwards (upwards) for the first valid (!= -1)
// Search forwards (upwards) for the first valid (!= -1)
// number. This should normally succeed already at the
// first loop cycle, so it's fast!
for (match = compl_curr_match->cp_next;
@ -2682,8 +2682,7 @@ static void ins_compl_update_sequence_numbers(void)
}
}
if (match != NULL) {
// go down and assign all numbers which are not
// assigned yet
// go down and assign all numbers which are not assigned yet
for (match = match->cp_prev;
match && match->cp_number == -1;
match = match->cp_prev) {

View File

@ -1450,7 +1450,8 @@ void show_popupmenu(void)
/// Execute "menu". Use by ":emenu" and the window toolbar.
/// @param eap NULL for the window toolbar.
/// @param mode_idx specify a MENU_INDEX_ value, use -1 to depend on the current state
/// @param mode_idx specify a MENU_INDEX_ value,
/// use MENU_INDEX_INVALID to depend on the current state
void execute_menu(const exarg_T *eap, vimmenu_T *menu, int mode_idx)
FUNC_ATTR_NONNULL_ARG(2)
{
@ -1458,7 +1459,7 @@ void execute_menu(const exarg_T *eap, vimmenu_T *menu, int mode_idx)
if (idx < 0) {
// Use the Insert mode entry when returning to Insert mode.
if (((State & MODE_INSERT) || restart_edit) && !current_sctx.sc_sid) {
if (((State & MODE_INSERT) || restart_edit) && current_sctx.sc_sid == 0) {
idx = MENU_INDEX_INSERT;
} else if (State & MODE_CMDLINE) {
idx = MENU_INDEX_CMDLINE;
@ -1612,7 +1613,7 @@ static vimmenu_T *menu_getbyname(char *name_arg)
void ex_emenu(exarg_T *eap)
{
char *arg = eap->arg;
int mode_idx = -1;
int mode_idx = MENU_INDEX_INVALID;
if (arg[0] && ascii_iswhite(arg[1])) {
switch (arg[0]) {