mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
Replace int with bool in some files. #654
This commit is contained in:

committed by
Justin M. Keyes

parent
3cf435af36
commit
ef34a0ab13
@@ -1405,7 +1405,7 @@ buflist_new (
|
||||
EMSG(_("W14: Warning: List of file names overflow"));
|
||||
if (emsg_silent == 0) {
|
||||
out_flush();
|
||||
ui_delay(3000L, TRUE); /* make sure it is noticed */
|
||||
ui_delay(3000L, true); /* make sure it is noticed */
|
||||
}
|
||||
top_file_num = 1;
|
||||
}
|
||||
@@ -3734,7 +3734,7 @@ do_arg_all (
|
||||
++autocmd_no_leave;
|
||||
last_curwin = curwin;
|
||||
last_curtab = curtab;
|
||||
win_enter(lastwin, FALSE);
|
||||
win_enter(lastwin, false);
|
||||
/* ":drop all" should re-use an empty window to avoid "--remote-tab"
|
||||
* leaving an empty tab page when executed locally. */
|
||||
if (keep_tabs && bufempty() && curbuf->b_nwindows == 1
|
||||
@@ -3802,13 +3802,13 @@ do_arg_all (
|
||||
if (valid_tabpage(last_curtab))
|
||||
goto_tabpage_tp(last_curtab, TRUE, TRUE);
|
||||
if (win_valid(last_curwin))
|
||||
win_enter(last_curwin, FALSE);
|
||||
win_enter(last_curwin, false);
|
||||
}
|
||||
/* to window with first arg */
|
||||
if (valid_tabpage(new_curtab))
|
||||
goto_tabpage_tp(new_curtab, TRUE, TRUE);
|
||||
if (win_valid(new_curwin))
|
||||
win_enter(new_curwin, FALSE);
|
||||
win_enter(new_curwin, false);
|
||||
|
||||
--autocmd_no_leave;
|
||||
free(opened);
|
||||
@@ -3883,7 +3883,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
*/
|
||||
/* Don't execute Win/Buf Enter/Leave autocommands here. */
|
||||
++autocmd_no_enter;
|
||||
win_enter(lastwin, FALSE);
|
||||
win_enter(lastwin, false);
|
||||
++autocmd_no_leave;
|
||||
for (buf = firstbuf; buf != NULL && open_wins < count; buf = buf->b_next) {
|
||||
/* Check if this buffer needs a window */
|
||||
@@ -3963,7 +3963,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
cmdmod.tab = 9999;
|
||||
}
|
||||
--autocmd_no_enter;
|
||||
win_enter(firstwin, FALSE); /* back to first window */
|
||||
win_enter(firstwin, false); /* back to first window */
|
||||
--autocmd_no_leave;
|
||||
|
||||
/*
|
||||
|
@@ -1762,7 +1762,7 @@ void diff_set_topline(win_T *fromwin, win_T *towin)
|
||||
invalidate_botline_win(towin);
|
||||
changed_line_abv_curs_win(towin);
|
||||
|
||||
check_topfill(towin, FALSE);
|
||||
check_topfill(towin, false);
|
||||
(void)hasFoldingWin(towin, towin->w_topline, &towin->w_topline,
|
||||
NULL, TRUE, NULL);
|
||||
}
|
||||
|
@@ -1752,7 +1752,7 @@ static int has_compl_option(int dict_opt)
|
||||
vim_beep();
|
||||
setcursor();
|
||||
out_flush();
|
||||
ui_delay(2000L, FALSE);
|
||||
ui_delay(2000L, false);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -14667,7 +14667,7 @@ static void f_winrestview(typval_T *argvars, typval_T *rettv)
|
||||
curwin->w_topline = 1;
|
||||
if (curwin->w_topline > curbuf->b_ml.ml_line_count)
|
||||
curwin->w_topline = curbuf->b_ml.ml_line_count;
|
||||
check_topfill(curwin, TRUE);
|
||||
check_topfill(curwin, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -4595,9 +4595,9 @@ void free_old_sub(void)
|
||||
* Set up for a tagpreview.
|
||||
* Return TRUE when it was created.
|
||||
*/
|
||||
int
|
||||
bool
|
||||
prepare_tagpreview (
|
||||
int undo_sync /* sync undo when leaving the window */
|
||||
bool undo_sync /* sync undo when leaving the window */
|
||||
)
|
||||
{
|
||||
win_T *wp;
|
||||
@@ -4618,17 +4618,17 @@ prepare_tagpreview (
|
||||
*/
|
||||
if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0)
|
||||
== FAIL)
|
||||
return FALSE;
|
||||
return false;
|
||||
curwin->w_p_pvw = TRUE;
|
||||
curwin->w_p_wfh = TRUE;
|
||||
RESET_BINDING(curwin); /* don't take over 'scrollbind'
|
||||
and 'cursorbind' */
|
||||
curwin->w_p_diff = FALSE; /* no 'diff' */
|
||||
curwin->w_p_fdc = 0; /* no 'foldcolumn' */
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -4735,7 +4735,7 @@ void ex_help(exarg_T *eap)
|
||||
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
|
||||
break;
|
||||
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
|
||||
win_enter(wp, TRUE);
|
||||
win_enter(wp, true);
|
||||
else {
|
||||
/*
|
||||
* There is no help window yet.
|
||||
|
@@ -6411,7 +6411,7 @@ void do_sleep(long msec)
|
||||
cursor_on();
|
||||
out_flush();
|
||||
for (done = 0; !got_int && done < msec; done += 1000L) {
|
||||
ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE);
|
||||
ui_delay(msec - done > 1000L ? 1000L : msec - done, true);
|
||||
ui_breakcheck();
|
||||
}
|
||||
}
|
||||
@@ -7405,7 +7405,7 @@ static void ex_pedit(exarg_T *eap)
|
||||
win_T *curwin_save = curwin;
|
||||
|
||||
g_do_tagpreview = p_pvh;
|
||||
prepare_tagpreview(TRUE);
|
||||
prepare_tagpreview(true);
|
||||
keep_help_flag = curwin_save->w_buffer->b_help;
|
||||
do_exedit(eap, NULL);
|
||||
keep_help_flag = FALSE;
|
||||
@@ -7413,7 +7413,7 @@ static void ex_pedit(exarg_T *eap)
|
||||
/* Return cursor to where we were */
|
||||
validate_cursor();
|
||||
redraw_later(VALID);
|
||||
win_enter(curwin_save, TRUE);
|
||||
win_enter(curwin_save, true);
|
||||
}
|
||||
g_do_tagpreview = 0;
|
||||
}
|
||||
|
@@ -4966,7 +4966,7 @@ buf_check_timestamp (
|
||||
if (emsg_silent == 0) {
|
||||
out_flush();
|
||||
/* give the user some time to think about it */
|
||||
ui_delay(1000L, TRUE);
|
||||
ui_delay(1000L, true);
|
||||
|
||||
/* don't redraw and erase the message */
|
||||
redraw_cmdline = FALSE;
|
||||
|
@@ -359,8 +359,8 @@ EXTERN buf_T *au_pending_free_buf INIT(= NULL);
|
||||
*/
|
||||
EXTERN int mouse_row;
|
||||
EXTERN int mouse_col;
|
||||
EXTERN int mouse_past_bottom INIT(= FALSE); /* mouse below last line */
|
||||
EXTERN int mouse_past_eol INIT(= FALSE); /* mouse right of line */
|
||||
EXTERN bool mouse_past_bottom INIT(= false); /* mouse below last line */
|
||||
EXTERN bool mouse_past_eol INIT(= false); /* mouse right of line */
|
||||
EXTERN int mouse_dragging INIT(= 0); /* extending Visual area with
|
||||
mouse dragging */
|
||||
/*
|
||||
@@ -720,7 +720,7 @@ EXTERN char_u *exe_name; /* the name of the executable */
|
||||
EXTERN int dont_scroll INIT(= FALSE); /* don't use scrollbars when TRUE */
|
||||
#endif
|
||||
EXTERN int mapped_ctrl_c INIT(= FALSE); /* CTRL-C is mapped */
|
||||
EXTERN int ctrl_c_interrupts INIT(= TRUE); /* CTRL-C sets got_int */
|
||||
EXTERN bool ctrl_c_interrupts INIT(= true); /* CTRL-C sets got_int */
|
||||
|
||||
EXTERN cmdmod_T cmdmod; /* Ex command modifiers */
|
||||
|
||||
|
@@ -1886,7 +1886,7 @@ static void cs_release_csp(int i, int freefnpp)
|
||||
waitpid_errno = errno;
|
||||
if (pid != 0)
|
||||
break; /* break unless the process is still running */
|
||||
os_delay(50L, FALSE); /* sleep 50 ms */
|
||||
os_delay(50L, false); /* sleep 50 ms */
|
||||
}
|
||||
# endif
|
||||
/*
|
||||
@@ -1917,7 +1917,7 @@ static void cs_release_csp(int i, int freefnpp)
|
||||
alive = FALSE; /* cscope process no longer exists */
|
||||
break;
|
||||
}
|
||||
os_delay(50L, FALSE); /* sleep 50ms */
|
||||
os_delay(50L, false); /* sleep 50ms */
|
||||
}
|
||||
}
|
||||
if (alive)
|
||||
|
@@ -1602,7 +1602,7 @@ static void check_tty(mparm_T *parmp)
|
||||
mch_errmsg(_("Vim: Warning: Input is not from a terminal\n"));
|
||||
out_flush();
|
||||
if (scriptin[0] == NULL)
|
||||
ui_delay(2000L, TRUE);
|
||||
ui_delay(2000L, true);
|
||||
TIME_MSG("Warning delay");
|
||||
}
|
||||
}
|
||||
@@ -1793,7 +1793,7 @@ static void edit_buffers(mparm_T *parmp)
|
||||
} else {
|
||||
if (curwin->w_next == NULL) /* just checking */
|
||||
break;
|
||||
win_enter(curwin->w_next, FALSE);
|
||||
win_enter(curwin->w_next, false);
|
||||
}
|
||||
}
|
||||
advance = TRUE;
|
||||
@@ -1847,7 +1847,7 @@ static void edit_buffers(mparm_T *parmp)
|
||||
break;
|
||||
}
|
||||
}
|
||||
win_enter(win, FALSE);
|
||||
win_enter(win, false);
|
||||
|
||||
--autocmd_no_leave;
|
||||
TIME_MSG("editing files in windows");
|
||||
|
@@ -376,13 +376,13 @@ void do_outofmem_msg(size_t size)
|
||||
void free_all_mem(void)
|
||||
{
|
||||
buf_T *buf, *nextbuf;
|
||||
static int entered = FALSE;
|
||||
static bool entered = false;
|
||||
|
||||
/* When we cause a crash here it is caught and Vim tries to exit cleanly.
|
||||
* Don't try freeing everything again. */
|
||||
if (entered)
|
||||
return;
|
||||
entered = TRUE;
|
||||
entered = true;
|
||||
|
||||
block_autocmds(); /* don't want to trigger autocommands here */
|
||||
|
||||
|
@@ -1834,7 +1834,7 @@ void changed(void)
|
||||
* and don't let the emsg() set msg_scroll. */
|
||||
if (need_wait_return && emsg_silent == 0) {
|
||||
out_flush();
|
||||
ui_delay(2000L, TRUE);
|
||||
ui_delay(2000L, true);
|
||||
wait_return(TRUE);
|
||||
msg_scroll = save_msg_scroll;
|
||||
}
|
||||
@@ -2257,7 +2257,7 @@ change_warning (
|
||||
(void)msg_end();
|
||||
if (msg_silent == 0 && !silent_mode) {
|
||||
out_flush();
|
||||
ui_delay(1000L, TRUE); /* give the user time to think about it */
|
||||
ui_delay(1000L, true); /* give the user time to think about it */
|
||||
}
|
||||
curbuf->b_did_warn = TRUE;
|
||||
redraw_cmdline = FALSE; /* don't redraw and erase the message */
|
||||
|
@@ -986,7 +986,7 @@ scrolldown (
|
||||
|
||||
if (curwin->w_cursor.lnum == curwin->w_topline)
|
||||
curwin->w_cline_row = 0;
|
||||
check_topfill(curwin, TRUE);
|
||||
check_topfill(curwin, true);
|
||||
|
||||
/*
|
||||
* Compute the row number of the last row of the cursor line
|
||||
@@ -1064,7 +1064,7 @@ scrollup (
|
||||
if (curwin->w_botline > curbuf->b_ml.ml_line_count + 1)
|
||||
curwin->w_botline = curbuf->b_ml.ml_line_count + 1;
|
||||
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
|
||||
if (hasAnyFolding(curwin))
|
||||
/* Make sure w_topline is at the first of a sequence of folded lines. */
|
||||
@@ -1085,7 +1085,7 @@ scrollup (
|
||||
void
|
||||
check_topfill (
|
||||
win_T *wp,
|
||||
int down /* when TRUE scroll down when not enough space */
|
||||
bool down /* when TRUE scroll down when not enough space */
|
||||
)
|
||||
{
|
||||
int n;
|
||||
@@ -1161,7 +1161,7 @@ void scrolldown_clamp(void)
|
||||
if (end_row < curwin->w_height - p_so) {
|
||||
if (can_fill) {
|
||||
++curwin->w_topfill;
|
||||
check_topfill(curwin, TRUE);
|
||||
check_topfill(curwin, true);
|
||||
} else {
|
||||
--curwin->w_topline;
|
||||
curwin->w_topfill = 0;
|
||||
@@ -1395,7 +1395,7 @@ void scroll_cursor_top(int min_scroll, int always)
|
||||
if (curwin->w_topfill < 0)
|
||||
curwin->w_topfill = 0;
|
||||
}
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
if (curwin->w_topline != old_topline
|
||||
|| curwin->w_topfill != old_topfill
|
||||
)
|
||||
@@ -1658,7 +1658,7 @@ void scroll_cursor_halfway(int atend)
|
||||
curwin->w_topfill = topfill;
|
||||
if (old_topline > curwin->w_topline + curwin->w_height)
|
||||
curwin->w_botfill = FALSE;
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
|
||||
curwin->w_valid |= VALID_TOPLINE;
|
||||
}
|
||||
@@ -1829,7 +1829,7 @@ int onepage(int dir, long count)
|
||||
get_scroll_overlap(&loff, -1);
|
||||
curwin->w_topline = loff.lnum;
|
||||
curwin->w_topfill = loff.fill;
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
curwin->w_cursor.lnum = curwin->w_topline;
|
||||
curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|
|
||||
VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
|
||||
@@ -1916,7 +1916,7 @@ int onepage(int dir, long count)
|
||||
} else {
|
||||
curwin->w_topline = loff.lnum;
|
||||
curwin->w_topfill = loff.fill;
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE);
|
||||
}
|
||||
}
|
||||
@@ -2011,7 +2011,7 @@ static void get_scroll_overlap(lineoff_T *lp, int dir)
|
||||
/*
|
||||
* Scroll 'scroll' lines up or down.
|
||||
*/
|
||||
void halfpage(int flag, linenr_T Prenum)
|
||||
void halfpage(bool flag, linenr_T Prenum)
|
||||
{
|
||||
long scrolled = 0;
|
||||
int i;
|
||||
|
@@ -992,8 +992,8 @@ getcount:
|
||||
cursor_on();
|
||||
out_flush();
|
||||
if (msg_scroll || emsg_on_display)
|
||||
ui_delay(1000L, TRUE); /* wait at least one second */
|
||||
ui_delay(3000L, FALSE); /* wait up to three seconds */
|
||||
ui_delay(1000L, true); /* wait at least one second */
|
||||
ui_delay(3000L, false); /* wait up to three seconds */
|
||||
State = save_State;
|
||||
|
||||
msg_scroll = FALSE;
|
||||
@@ -6709,7 +6709,7 @@ static void nv_bck_word(cmdarg_T *cap)
|
||||
static void nv_wordcmd(cmdarg_T *cap)
|
||||
{
|
||||
int n;
|
||||
int word_end;
|
||||
bool word_end;
|
||||
int flag = FALSE;
|
||||
pos_T startpos = curwin->w_cursor;
|
||||
|
||||
@@ -6717,9 +6717,9 @@ static void nv_wordcmd(cmdarg_T *cap)
|
||||
* Set inclusive for the "E" and "e" command.
|
||||
*/
|
||||
if (cap->cmdchar == 'e' || cap->cmdchar == 'E')
|
||||
word_end = TRUE;
|
||||
word_end = true;
|
||||
else
|
||||
word_end = FALSE;
|
||||
word_end = false;
|
||||
cap->oap->inclusive = word_end;
|
||||
|
||||
/*
|
||||
@@ -6753,7 +6753,7 @@ static void nv_wordcmd(cmdarg_T *cap)
|
||||
* flag.
|
||||
*/
|
||||
cap->oap->inclusive = TRUE;
|
||||
word_end = TRUE;
|
||||
word_end = true;
|
||||
flag = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ void mch_suspend()
|
||||
long wait_time;
|
||||
for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++)
|
||||
/* Loop is not entered most of the time */
|
||||
os_delay(wait_time, FALSE);
|
||||
os_delay(wait_time, false);
|
||||
}
|
||||
# endif
|
||||
|
||||
@@ -1186,7 +1186,7 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file,
|
||||
/* When running in the background, give it some time to create the temp
|
||||
* file, but don't wait for it to finish. */
|
||||
if (ampersent)
|
||||
os_delay(10L, TRUE);
|
||||
os_delay(10L, true);
|
||||
|
||||
free(command);
|
||||
|
||||
|
@@ -536,7 +536,7 @@ static int pum_set_selected(int n, int repeat)
|
||||
if ((p_pvh > 0) && (p_pvh < g_do_tagpreview)) {
|
||||
g_do_tagpreview = p_pvh;
|
||||
}
|
||||
resized = prepare_tagpreview(FALSE);
|
||||
resized = prepare_tagpreview(false);
|
||||
g_do_tagpreview = 0;
|
||||
|
||||
if (curwin->w_p_pvw) {
|
||||
@@ -612,7 +612,7 @@ static int pum_set_selected(int n, int repeat)
|
||||
// the window when needed, otherwise it will always be
|
||||
// redraw.
|
||||
if (resized) {
|
||||
win_enter(curwin_save, TRUE);
|
||||
win_enter(curwin_save, true);
|
||||
update_topline();
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ static int pum_set_selected(int n, int repeat)
|
||||
pum_do_redraw = FALSE;
|
||||
|
||||
if (!resized && win_valid(curwin_save)) {
|
||||
win_enter(curwin_save, TRUE);
|
||||
win_enter(curwin_save, true);
|
||||
}
|
||||
|
||||
// May need to update the screen again when there are
|
||||
|
@@ -1383,7 +1383,7 @@ void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit)
|
||||
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
|
||||
break;
|
||||
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
|
||||
win_enter(wp, TRUE);
|
||||
win_enter(wp, true);
|
||||
else {
|
||||
/*
|
||||
* Split off help window; put it at far top if no position
|
||||
|
@@ -6080,7 +6080,7 @@ void check_for_delay(int check_msg_scroll)
|
||||
&& !did_wait_return
|
||||
&& emsg_silent == 0) {
|
||||
out_flush();
|
||||
ui_delay(1000L, TRUE);
|
||||
ui_delay(1000L, true);
|
||||
emsg_on_display = FALSE;
|
||||
if (check_msg_scroll)
|
||||
msg_scroll = FALSE;
|
||||
|
@@ -2049,9 +2049,9 @@ showmatch (
|
||||
* available.
|
||||
*/
|
||||
if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL)
|
||||
ui_delay(p_mat * 100L, TRUE);
|
||||
ui_delay(p_mat * 100L, true);
|
||||
else if (!char_avail())
|
||||
ui_delay(p_mat * 100L, FALSE);
|
||||
ui_delay(p_mat * 100L, false);
|
||||
curwin->w_cursor = save_cursor; /* restore cursor position */
|
||||
p_so = save_so;
|
||||
p_siso = save_siso;
|
||||
@@ -4389,7 +4389,7 @@ search_line:
|
||||
/* ":psearch" uses the preview window */
|
||||
if (g_do_tagpreview != 0) {
|
||||
curwin_save = curwin;
|
||||
prepare_tagpreview(TRUE);
|
||||
prepare_tagpreview(true);
|
||||
}
|
||||
if (action == ACTION_SPLIT) {
|
||||
if (win_split(0, 0) == FAIL)
|
||||
@@ -4424,7 +4424,7 @@ search_line:
|
||||
/* Return cursor to where we were */
|
||||
validate_cursor();
|
||||
redraw_later(VALID);
|
||||
win_enter(curwin_save, TRUE);
|
||||
win_enter(curwin_save, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -7604,7 +7604,7 @@ static void highlight_list_two(int cnt, int attr)
|
||||
msg_puts_attr((char_u *)&("N \bI \b! \b"[cnt / 11]), attr);
|
||||
msg_clr_eos();
|
||||
out_flush();
|
||||
ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
|
||||
ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, false);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -876,7 +876,7 @@ do_tag (
|
||||
give_warning(IObuff, ic);
|
||||
if (ic && !msg_scrolled && msg_silent == 0) {
|
||||
out_flush();
|
||||
ui_delay(1000L, TRUE);
|
||||
ui_delay(1000L, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2414,7 +2414,7 @@ jumpto_tag (
|
||||
* Make the preview window the current window.
|
||||
* Open a preview window when needed.
|
||||
*/
|
||||
prepare_tagpreview(TRUE);
|
||||
prepare_tagpreview(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2525,7 +2525,7 @@ jumpto_tag (
|
||||
MSG(_("E435: Couldn't find tag, just guessing!"));
|
||||
if (!msg_scrolled && msg_silent == 0) {
|
||||
out_flush();
|
||||
ui_delay(1000L, TRUE);
|
||||
ui_delay(1000L, true);
|
||||
}
|
||||
}
|
||||
retval = OK;
|
||||
@@ -2580,7 +2580,7 @@ jumpto_tag (
|
||||
/* Return cursor to where we were */
|
||||
validate_cursor();
|
||||
redraw_later(VALID);
|
||||
win_enter(curwin_save, TRUE);
|
||||
win_enter(curwin_save, true);
|
||||
}
|
||||
|
||||
--RedrawingDisabled;
|
||||
|
@@ -1455,7 +1455,7 @@ int set_termname(char_u *term)
|
||||
if (emsg_silent == 0) {
|
||||
screen_start(); /* don't know where cursor is now */
|
||||
out_flush();
|
||||
ui_delay(2000L, TRUE);
|
||||
ui_delay(2000L, true);
|
||||
}
|
||||
set_string_option_direct((char_u *)"term", -1, term,
|
||||
OPT_FREE, 0);
|
||||
@@ -2608,7 +2608,7 @@ void stoptermcap(void)
|
||||
if (crv_status == CRV_SENT || u7_status == U7_SENT) {
|
||||
# ifdef UNIX
|
||||
/* Give the terminal a chance to respond. */
|
||||
os_delay(100L, FALSE);
|
||||
os_delay(100L, false);
|
||||
# endif
|
||||
# ifdef TCIFLUSH
|
||||
/* Discard data received but not read. */
|
||||
|
@@ -119,7 +119,7 @@ ui_inchar (
|
||||
/* ... there is no need for CTRL-C to interrupt something, don't let
|
||||
* it set got_int when it was mapped. */
|
||||
if (mapped_ctrl_c)
|
||||
ctrl_c_interrupts = FALSE;
|
||||
ctrl_c_interrupts = false;
|
||||
}
|
||||
|
||||
#ifndef NO_CONSOLE
|
||||
@@ -132,7 +132,7 @@ ui_inchar (
|
||||
/* block SIGHUP et al. */
|
||||
signal_reject_deadly();
|
||||
|
||||
ctrl_c_interrupts = TRUE;
|
||||
ctrl_c_interrupts = true;
|
||||
|
||||
#ifdef NO_CONSOLE_INPUT
|
||||
theend:
|
||||
@@ -162,7 +162,7 @@ int ui_char_avail(void)
|
||||
* Delay for the given number of milliseconds. If ignoreinput is FALSE then we
|
||||
* cancel the delay if a key is hit.
|
||||
*/
|
||||
void ui_delay(long msec, int ignoreinput)
|
||||
void ui_delay(long msec, bool ignoreinput)
|
||||
{
|
||||
os_delay(msec, ignoreinput);
|
||||
}
|
||||
@@ -365,7 +365,7 @@ void trash_input_buf(void)
|
||||
int read_from_input_buf(char_u *buf, long maxlen)
|
||||
{
|
||||
if (inbufcount == 0) /* if the buffer is empty, fill it */
|
||||
fill_input_buf(TRUE);
|
||||
fill_input_buf(true);
|
||||
if (maxlen > inbufcount)
|
||||
maxlen = inbufcount;
|
||||
memmove(buf, inbuf, (size_t)maxlen);
|
||||
@@ -375,7 +375,7 @@ int read_from_input_buf(char_u *buf, long maxlen)
|
||||
return (int)maxlen;
|
||||
}
|
||||
|
||||
void fill_input_buf(int exit_on_error)
|
||||
void fill_input_buf(bool exit_on_error)
|
||||
{
|
||||
#if defined(UNIX) || defined(MACOS_X_UNIX)
|
||||
int len;
|
||||
@@ -560,13 +560,13 @@ jump_to_mouse (
|
||||
win_T *wp, *old_curwin;
|
||||
pos_T old_cursor;
|
||||
int count;
|
||||
int first;
|
||||
bool first;
|
||||
int row = mouse_row;
|
||||
int col = mouse_col;
|
||||
int mouse_char;
|
||||
|
||||
mouse_past_bottom = FALSE;
|
||||
mouse_past_eol = FALSE;
|
||||
mouse_past_bottom = false;
|
||||
mouse_past_eol = false;
|
||||
|
||||
if (flags & MOUSE_RELEASED) {
|
||||
/* On button release we may change window focus if positioned on a
|
||||
@@ -669,7 +669,7 @@ retnomove:
|
||||
* status line. Do change focus when releasing the mouse button
|
||||
* (MOUSE_FOCUS was set above if we dragged first). */
|
||||
if (dragwin == NULL || (flags & MOUSE_RELEASED))
|
||||
win_enter(wp, TRUE); /* can make wp invalid! */
|
||||
win_enter(wp, true); /* can make wp invalid! */
|
||||
# ifdef CHECK_DOUBLE_CLICK
|
||||
/* set topline, to be able to check for double click ourselves */
|
||||
if (curwin != old_curwin)
|
||||
@@ -726,14 +726,14 @@ retnomove:
|
||||
*/
|
||||
if (row < 0) {
|
||||
count = 0;
|
||||
for (first = TRUE; curwin->w_topline > 1; ) {
|
||||
for (first = true; curwin->w_topline > 1; ) {
|
||||
if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
|
||||
++count;
|
||||
else
|
||||
count += plines(curwin->w_topline - 1);
|
||||
if (!first && count > -row)
|
||||
break;
|
||||
first = FALSE;
|
||||
first = false;
|
||||
hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
|
||||
if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
|
||||
++curwin->w_topfill;
|
||||
@@ -742,21 +742,21 @@ retnomove:
|
||||
curwin->w_topfill = 0;
|
||||
}
|
||||
}
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
curwin->w_valid &=
|
||||
~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
|
||||
redraw_later(VALID);
|
||||
row = 0;
|
||||
} else if (row >= curwin->w_height) {
|
||||
count = 0;
|
||||
for (first = TRUE; curwin->w_topline < curbuf->b_ml.ml_line_count; ) {
|
||||
for (first = true; curwin->w_topline < curbuf->b_ml.ml_line_count; ) {
|
||||
if (curwin->w_topfill > 0)
|
||||
++count;
|
||||
else
|
||||
count += plines(curwin->w_topline);
|
||||
if (!first && count > row - curwin->w_height + 1)
|
||||
break;
|
||||
first = FALSE;
|
||||
first = false;
|
||||
if (hasFolding(curwin->w_topline, NULL, &curwin->w_topline)
|
||||
&& curwin->w_topline == curbuf->b_ml.ml_line_count)
|
||||
break;
|
||||
@@ -768,7 +768,7 @@ retnomove:
|
||||
diff_check_fill(curwin, curwin->w_topline);
|
||||
}
|
||||
}
|
||||
check_topfill(curwin, FALSE);
|
||||
check_topfill(curwin, false);
|
||||
redraw_later(VALID);
|
||||
curwin->w_valid &=
|
||||
~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP);
|
||||
@@ -795,7 +795,7 @@ retnomove:
|
||||
|
||||
/* compute the position in the buffer line from the posn on the screen */
|
||||
if (mouse_comp_pos(curwin, &row, &col, &curwin->w_cursor.lnum))
|
||||
mouse_past_bottom = TRUE;
|
||||
mouse_past_bottom = true;
|
||||
|
||||
/* Start Visual mode before coladvance(), for when 'sel' != "old" */
|
||||
if ((flags & MOUSE_MAY_VIS) && !VIsual_active) {
|
||||
@@ -815,7 +815,7 @@ retnomove:
|
||||
if (coladvance(col) == FAIL) { /* Mouse click beyond end of line */
|
||||
if (inclusive != NULL)
|
||||
*inclusive = TRUE;
|
||||
mouse_past_eol = TRUE;
|
||||
mouse_past_eol = true;
|
||||
} else if (inclusive != NULL)
|
||||
*inclusive = FALSE;
|
||||
|
||||
@@ -837,12 +837,12 @@ retnomove:
|
||||
* window "win".
|
||||
* Returns TRUE if the position is below the last line.
|
||||
*/
|
||||
int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)
|
||||
bool mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)
|
||||
{
|
||||
int col = *colp;
|
||||
int row = *rowp;
|
||||
linenr_T lnum;
|
||||
int retval = FALSE;
|
||||
bool retval = false;
|
||||
int off;
|
||||
int count;
|
||||
|
||||
@@ -867,7 +867,7 @@ int mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)
|
||||
break; /* Position is in this buffer line. */
|
||||
(void)hasFoldingWin(win, lnum, NULL, &lnum, TRUE, NULL);
|
||||
if (lnum == win->w_buffer->b_ml.ml_line_count) {
|
||||
retval = TRUE;
|
||||
retval = true;
|
||||
break; /* past end of file */
|
||||
}
|
||||
row -= count;
|
||||
|
@@ -892,7 +892,7 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
|
||||
/*
|
||||
* make the new window the current window
|
||||
*/
|
||||
win_enter(wp, FALSE);
|
||||
win_enter(wp, false);
|
||||
if (flags & WSP_VERT)
|
||||
p_wiw = i;
|
||||
else
|
||||
@@ -1146,7 +1146,7 @@ static void win_exchange(long Prenum)
|
||||
|
||||
(void)win_comp_pos(); /* recompute window positions */
|
||||
|
||||
win_enter(wp, TRUE);
|
||||
win_enter(wp, true);
|
||||
redraw_later(CLEAR);
|
||||
}
|
||||
|
||||
@@ -1302,7 +1302,7 @@ void win_move_after(win_T *win1, win_T *win2)
|
||||
(void)win_comp_pos(); /* recompute w_winrow for all windows */
|
||||
redraw_later(NOT_VALID);
|
||||
}
|
||||
win_enter(win1, FALSE);
|
||||
win_enter(win1, false);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1876,7 +1876,7 @@ int win_close(win_T *win, int free_buf)
|
||||
else
|
||||
win_comp_pos();
|
||||
if (close_curwin) {
|
||||
win_enter_ext(wp, FALSE, TRUE, TRUE, TRUE);
|
||||
win_enter_ext(wp, false, TRUE, TRUE, TRUE);
|
||||
if (other_buffer)
|
||||
/* careful: after this wp and win may be invalid! */
|
||||
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
|
||||
@@ -3022,7 +3022,7 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au
|
||||
/* We would like doing the TabEnter event first, but we don't have a
|
||||
* valid current window yet, which may break some commands.
|
||||
* This triggers autocommands, thus may make "tp" invalid. */
|
||||
win_enter_ext(tp->tp_curwin, FALSE, TRUE,
|
||||
win_enter_ext(tp->tp_curwin, false, TRUE,
|
||||
trigger_enter_autocmds, trigger_leave_autocmds);
|
||||
prevwin = next_prevwin;
|
||||
|
||||
@@ -3143,7 +3143,7 @@ void goto_tabpage_win(tabpage_T *tp, win_T *wp)
|
||||
{
|
||||
goto_tabpage_tp(tp, TRUE, TRUE);
|
||||
if (curtab == tp && win_valid(wp)) {
|
||||
win_enter(wp, TRUE);
|
||||
win_enter(wp, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3210,7 +3210,7 @@ void win_goto(win_T *wp)
|
||||
else if (VIsual_active)
|
||||
wp->w_cursor = curwin->w_cursor;
|
||||
|
||||
win_enter(wp, TRUE);
|
||||
win_enter(wp, true);
|
||||
|
||||
/* Conceal cursor line in previous window, unconceal in current window. */
|
||||
if (win_valid(owp) && owp->w_p_cole > 0 && !msg_scrolled)
|
||||
@@ -3357,7 +3357,7 @@ end:
|
||||
/*
|
||||
* Make window "wp" the current window.
|
||||
*/
|
||||
void win_enter(win_T *wp, int undo_sync)
|
||||
void win_enter(win_T *wp, bool undo_sync)
|
||||
{
|
||||
win_enter_ext(wp, undo_sync, FALSE, TRUE, TRUE);
|
||||
}
|
||||
@@ -3367,7 +3367,7 @@ void win_enter(win_T *wp, int undo_sync)
|
||||
* Can be called with "curwin_invalid" TRUE, which means that curwin has just
|
||||
* been closed and isn't valid.
|
||||
*/
|
||||
static void win_enter_ext(win_T *wp, int undo_sync, int curwin_invalid, int trigger_enter_autocmds, int trigger_leave_autocmds)
|
||||
static void win_enter_ext(win_T *wp, bool undo_sync, int curwin_invalid, int trigger_enter_autocmds, int trigger_leave_autocmds)
|
||||
{
|
||||
int other_buffer = FALSE;
|
||||
|
||||
@@ -3471,7 +3471,7 @@ win_T *buf_jump_open_win(buf_T *buf)
|
||||
if (wp->w_buffer == buf)
|
||||
break;
|
||||
if (wp != NULL)
|
||||
win_enter(wp, FALSE);
|
||||
win_enter(wp, false);
|
||||
return wp;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user