}
if (cmdline_fuzzy_completion_supported(&xpc))
- // when fuzzy matching, don't modify the search string
- pat = vim_strsave(xpc.xp_pattern);
+ // when fuzzy matching, don't modify the search string
+ pat = vim_strsave(xpc.xp_pattern);
else
- pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
+ pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
if (rettv_list_alloc(rettv) == OK && pat != NULL)
{
}
if (SOURCING_LNUM != 0)
- smsg(_("line %ld: %s"), (long)SOURCING_LNUM, cmd);
+ smsg(_("line %ld: %s"), (long)SOURCING_LNUM, cmd);
else
- smsg(_("cmd: %s"), cmd);
+ smsg(_("cmd: %s"), cmd);
}
/*
char_u *ptr;
if (end < 0)
- end = buf->b_ml.ml_line_count;
+ end = buf->b_ml.ml_line_count;
if (buf->b_ml.ml_flags & ML_EMPTY)
{
if (lnum >= wp->w_topline && lnum < wp->w_botline
&& !dp->is_linematched && diff_linematch(dp)
&& diff_check_sanity(curtab, dp))
- run_linematch_algorithm(dp);
+ run_linematch_algorithm(dp);
if (dp->is_linematched)
- return linematched_filler_lines(dp, idx, lnum, linestatus);
+ return linematched_filler_lines(dp, idx, lnum, linestatus);
if (lnum < dp->df_lnum[idx] + dp->df_count[idx])
{
printf("\n\nInstall will do for you:\n");
for (i = 0; i < choice_count; ++i)
- if (choices[i].active)
- printf("%2d %s\n", i + 1, choices[i].text);
+ if (choices[i].active)
+ printf("%2d %s\n", i + 1, choices[i].text);
printf("To change an item, enter its number\n\n");
printf("Enter item number, h (help), d (do it) or q (quit): ");
}
}
#ifdef FEAT_PROP_POPUP
// popup windows are in separate lists
- FOR_ALL_TABPAGES(tp)
- FOR_ALL_POPUPWINS_IN_TAB(tp, wp)
+ FOR_ALL_TABPAGES(tp)
+ FOR_ALL_POPUPWINS_IN_TAB(tp, wp)
if (wp->w_id == id)
{
if (tpp != NULL)
/*
* Check if ffname differs from fnum.
- * fnum is a buffer number. 0 == current buffer, 1-or-more must be a valid buffer ID.
+ * fnum is a buffer number. 0 == current buffer, 1-or-more must be a valid
+ * buffer ID.
* ffname is a full path to where a buffer lives on-disk or would live on-disk.
*
*/
static int
is_other_file(int fnum, char_u *ffname)
{
- if (fnum != 0)
- {
- if (fnum == curbuf->b_fnum)
- return FALSE;
+ if (fnum != 0)
+ {
+ if (fnum == curbuf->b_fnum)
+ return FALSE;
- return TRUE;
- }
+ return TRUE;
+ }
- if (ffname == NULL)
- return TRUE;
+ if (ffname == NULL)
+ return TRUE;
- if (*ffname == NUL)
- return FALSE;
+ if (*ffname == NUL)
+ return FALSE;
- // TODO: Need a reliable way to know whether a buffer is meant to live on-disk
- // !curbuf->b_dev_valid is not always available (example: missing on Windows)
- if (curbuf->b_sfname != NULL
- && *curbuf->b_sfname != NUL)
- // This occurs with unsaved buffers. In which case `ffname`
- // actually corresponds to curbuf->b_sfname
- return fnamecmp(ffname, curbuf->b_sfname) != 0;
+ // TODO: Need a reliable way to know whether a buffer is meant to live
+ // on-disk !curbuf->b_dev_valid is not always available (example: missing
+ // on Windows)
+ if (curbuf->b_sfname != NULL
+ && *curbuf->b_sfname != NUL)
+ // This occurs with unsaved buffers. In which case `ffname` actually
+ // corresponds to curbuf->b_sfname
+ return fnamecmp(ffname, curbuf->b_sfname) != 0;
- return otherfile(ffname);
+ return otherfile(ffname);
}
/*
* Uses a static buffer, only the last error will be kept.
* "msg" will be translated, caller should use N_().
*/
- char *
+ char *
ex_errmsg(char *msg, char_u *arg)
{
vim_snprintf(ex_error_buf, MSG_BUF_LEN, _(msg), arg);
// when called from remote_expr in insert mode, make sure insert mode is
// ended by adding K_NOP to the typeahead buffer
if (vgetc_busy)
- ins_char_typebuf(K_NOP, 0);
+ ins_char_typebuf(K_NOP, 0);
#endif
clearmode();
}
void
set_pressedreturn(int val)
{
- ex_pressedreturn = val;
+ ex_pressedreturn = val;
}
// remove trailing \v and the like
while (len >= 2 && p[len - 2] == '\\'
&& vim_strchr((char_u *)"mMvVcCZ", p[len - 1]) != NULL)
- len -= 2;
+ len -= 2;
// true, if the pattern is empty, or the pattern ends with \| and magic is
// set (or it ends with '|' and very magic is set)
*/
typedef struct ff_search_ctx_T
{
- ff_stack_T *ffsc_stack_ptr;
- ff_visited_list_hdr_T *ffsc_visited_list;
- ff_visited_list_hdr_T *ffsc_dir_visited_list;
- ff_visited_list_hdr_T *ffsc_visited_lists_list;
- ff_visited_list_hdr_T *ffsc_dir_visited_lists_list;
- string_T ffsc_file_to_search;
- string_T ffsc_start_dir;
- string_T ffsc_fix_path;
- string_T ffsc_wc_path;
- int ffsc_level;
- string_T *ffsc_stopdirs_v;
- int ffsc_find_what;
- int ffsc_tagfile;
+ ff_stack_T *ffsc_stack_ptr;
+ ff_visited_list_hdr_T *ffsc_visited_list;
+ ff_visited_list_hdr_T *ffsc_dir_visited_list;
+ ff_visited_list_hdr_T *ffsc_visited_lists_list;
+ ff_visited_list_hdr_T *ffsc_dir_visited_lists_list;
+ string_T ffsc_file_to_search;
+ string_T ffsc_start_dir;
+ string_T ffsc_fix_path;
+ string_T ffsc_wc_path;
+ int ffsc_level;
+ string_T *ffsc_stopdirs_v;
+ int ffsc_find_what;
+ int ffsc_tagfile;
} ff_search_ctx_T;
// locally needed functions
// If memory allocation fails during startup we'll exit but curbuf or
// curwin could be NULL.
if (curbuf == NULL || curwin == NULL)
- return;
+ return;
old_curbuf_fnum = curbuf->b_fnum;
old_curwin_id = curwin->w_id;
// When GUI hasn't started the menus have not been created.
if (!gui.in_use)
- return;
+ return;
while (menu)
{
gui_mch_mousehide(TRUE);
}
- static void
+ static void
im_preedit_window_set_position(void)
{
int x, y, width, height;
Boolean etched_in;
if (!eb->primitive.shadow_thickness)
- return;
+ return;
if ((eb->core.width <= 2 * eb->primitive.highlight_thickness)
|| (eb->core.height <= 2 * eb->primitive.highlight_thickness))
static void
Enter(Widget wid,
- XEvent *event,
- String *params UNUSED,
- Cardinal *num_params UNUSED)
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid;
XmPushButtonCallbackStruct call_value;
static void
Leave(Widget wid,
- XEvent *event,
- String *params UNUSED,
- Cardinal *num_params UNUSED)
+ XEvent *event,
+ String *params UNUSED,
+ Cardinal *num_params UNUSED)
{
XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid;
XmPushButtonCallbackStruct call_value;
if (!global_busy && !did_warn_clipboard)
{
#ifdef FEAT_CLIPBOARD
- msg(_("W23: Clipboard register not available, using register 0"));
+ msg(_("W23: Clipboard register not available, using register 0"));
#else
- msg(_("W24: Clipboard register not available. See :h W24"));
+ msg(_("W24: Clipboard register not available. See :h W24"));
#endif
- did_warn_clipboard = TRUE;
+ did_warn_clipboard = TRUE;
}
}
* Returns the number of columns of overlap with buffer text, excluding the
* extra padding on the ledge.
*/
- int
+ int
sms_marker_overlap(win_T *wp, int extra2)
{
if (extra2 == -1)
#endif
if (!check_can_set_curbuf_disabled())
- return;
+ return;
ptr = grab_file_name(cap->count1, &lnum);
}
# ifdef FEAT_SODIUM
if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
- crypt_sodium_lock_key(args->os_newval.string);
+ crypt_sodium_lock_key(args->os_newval.string);
# endif
return NULL;
if (retval == -1 || ws.ws_col == 0 || ws.ws_row == 0)
{
- cs_out->cs_xpixel = -1;
- cs_out->cs_ypixel = -1;
- return;
+ cs_out->cs_xpixel = -1;
+ cs_out->cs_ypixel = -1;
+ return;
}
// calculate parent tty's pixel per cell.
}
if (shell_style == STYLE_ECHO)
{
- if (strstr((char *)gettail(p_sh), "bash") != NULL)
+ if (strstr((char *)gettail(p_sh), "bash") != NULL)
shell_style = STYLE_GLOBSTAR;
- else if (strstr((char *)gettail(p_sh), "sh") != NULL)
+ else if (strstr((char *)gettail(p_sh), "sh") != NULL)
shell_style = STYLE_VIMGLOB;
}
}
#ifdef DEBUG
- char *tmpbuf = NULL;
- tmpbuf = ALLOC_MULT(char, buflen);
- strcpy(tmpbuf, instring);
+ char *tmpbuf = NULL;
+ tmpbuf = ALLOC_MULT(char, buflen);
+ strcpy(tmpbuf, instring);
#endif
Fspec_Rms = buf; // for decc$to_vms
// About "Inherit handles" being TRUE: this command can be litigious,
// handle inheritance was deactivated for pending temp file, but, if we
// deactivate it, the pipes don't work for some reason.
- vim_create_process(p, TRUE, CREATE_DEFAULT_ERROR_MODE,
- &si, &pi, NULL, NULL);
+ vim_create_process(p, TRUE, CREATE_DEFAULT_ERROR_MODE,
+ &si, &pi, NULL, NULL);
if (p != cmd)
vim_free(p);
* Return the number of the current entry (line number in the quickfix
* window).
*/
- linenr_T
+ linenr_T
qf_current_entry(win_T *wp)
{
qf_info_T *qi = ql_info;
typedef struct
{
- char_u *regparse;
- int prevchr_len;
- int curchr;
- int prevchr;
- int prevprevchr;
- int nextchr;
- int at_start;
- int prev_at_start;
- int regnpar;
+ char_u *regparse;
+ int prevchr_len;
+ int curchr;
+ int prevchr;
+ int prevprevchr;
+ int nextchr;
+ int at_start;
+ int prev_at_start;
+ int regnpar;
} parse_state_T;
static void initchr(char_u *);
{
if (re_multi_type(peekchr()) == MULTI_MULT)
{
- semsg(_(e_nfa_regexp_cannot_repeat_str), what);
- rc_did_emsg = TRUE;
- return FAIL;
+ semsg(_(e_nfa_regexp_cannot_repeat_str), what);
+ rc_did_emsg = TRUE;
+ return FAIL;
}
return OK;
}
}
#endif
- static void
+ static void
screen_start_highlight(int attr)
{
attrentry_T *aep = NULL;
}
}
- void
+ void
screen_stop_highlight(void)
{
int do_ME = FALSE; // output T_ME code
* - redrawing for a callback and there is a modeless selection
* - there is a popup window
*/
- if (!screen_valid(TRUE)
+ if (!screen_valid(TRUE)
|| line_count <= 0 || line_count > p_ttyscroll
|| end > Rows
#ifdef FEAT_CLIPBOARD
(b)[(i) + 3] = (char_u)((n) ); \
}
- void
+ void
sha256_start(context_sha256_T *ctx)
{
ctx->total[0] = 0;
while (len > 0)
{
- i = TOLOWER_ASC(*s1) - TOLOWER_ASC(*s2);
- if (i != 0)
- break; // this character is different
- if (*s1 == NUL)
- break; // strings match until NUL
- ++s1;
- ++s2;
- --len;
+ i = TOLOWER_ASC(*s1) - TOLOWER_ASC(*s2);
+ if (i != 0)
+ break; // this character is different
+ if (*s1 == NUL)
+ break; // strings match until NUL
+ ++s1;
+ ++s2;
+ --len;
}
return i;
}
} tagname_T;
typedef struct {
- UINT32_T total[2];
- UINT32_T state[8];
- char_u buffer[64];
+ UINT32_T total[2];
+ UINT32_T state[8];
+ char_u buffer[64];
} context_sha256_T;
/*
return;
while (p->bt_string != NULL)
{
- if (p->bt_entry == (int)KS_ME)
- p->bt_string = &ksme_str[0];
- else if (p->bt_entry == (int)KS_MR)
- p->bt_string = &ksmr_str[0];
- else if (p->bt_entry == (int)KS_MD)
- p->bt_string = &ksmd_str[0];
- ++p;
+ if (p->bt_entry == (int)KS_ME)
+ p->bt_string = &ksme_str[0];
+ else if (p->bt_entry == (int)KS_MR)
+ p->bt_string = &ksmr_str[0];
+ else if (p->bt_entry == (int)KS_MD)
+ p->bt_string = &ksmd_str[0];
+ ++p;
}
}
char_u *varname;
if (current_funccal == NULL || current_funccal->fc_func->uf_scoped == NULL)
- return NULL;
+ return NULL;
// Search in parent scope, which can be referenced from a lambda.
current_funccal = current_funccal->fc_func->uf_scoped;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1390,
/**/
1389,
/**/
# if defined(USE_GTK3)
msg_puts(_("with GTK3 GUI."));
# elif defined(FEAT_GUI_GNOME)
- msg_puts(_("with GTK2-GNOME GUI."));
+ msg_puts(_("with GTK2-GNOME GUI."));
# else
- msg_puts(_("with GTK2 GUI."));
+ msg_puts(_("with GTK2 GUI."));
# endif
#elif defined(FEAT_GUI_MOTIF)
msg_puts(_("with X11-Motif GUI."));
static void
prepare_viminfo_registers(void)
{
- y_read_regs = ALLOC_CLEAR_MULT(yankreg_T, NUM_REGISTERS);
+ y_read_regs = ALLOC_CLEAR_MULT(yankreg_T, NUM_REGISTERS);
}
static void