aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c2
-rw-r--r--src/nvim/change.c4
-rw-r--r--src/nvim/edit.c2
-rw-r--r--src/nvim/fileio.c8
-rw-r--r--src/nvim/normal.c4
-rw-r--r--src/nvim/os/time.c1
-rw-r--r--src/nvim/screen.c2
-rw-r--r--src/nvim/search.c9
-rw-r--r--src/nvim/tag.c4
-rw-r--r--src/nvim/testdir/test_autocmd.vim14
-rw-r--r--src/nvim/testdir/test_backspace_opt.vim20
-rw-r--r--src/nvim/testdir/test_filetype.vim2
12 files changed, 33 insertions, 39 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index c98f2786c2..ce4163fccf 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1844,7 +1844,7 @@ buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum,
EMSG(_("W14: Warning: List of file names overflow"));
if (emsg_silent == 0) {
ui_flush();
- os_delay(3000L, true); // make sure it is noticed
+ os_delay(3001L, true); // make sure it is noticed
}
top_file_num = 1;
}
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 38bd591eca..74e27ca880 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -68,7 +68,7 @@ void change_warning(int col)
(void)msg_end();
if (msg_silent == 0 && !silent_mode && ui_active()) {
ui_flush();
- os_delay(1000L, true); // give the user time to think about it
+ os_delay(1002L, true); // give the user time to think about it
}
curbuf->b_did_warn = true;
redraw_cmdline = false; // don't redraw and erase the message
@@ -109,7 +109,7 @@ void changed(void)
// and don't let the emsg() set msg_scroll.
if (need_wait_return && emsg_silent == 0) {
ui_flush();
- os_delay(2000L, true);
+ os_delay(2002L, true);
wait_return(true);
msg_scroll = save_msg_scroll;
} else {
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index ea13052f25..f2fddc89fe 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -2058,7 +2058,7 @@ static bool check_compl_option(bool dict_opt)
vim_beep(BO_COMPL);
setcursor();
ui_flush();
- os_delay(2000L, false);
+ os_delay(2004L, false);
}
return false;
}
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 65bd809436..792ef81665 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -4947,11 +4947,11 @@ int buf_check_timestamp(buf_T *buf)
(void)msg_end();
if (emsg_silent == 0) {
ui_flush();
- /* give the user some time to think about it */
- os_delay(1000L, true);
+ // give the user some time to think about it
+ os_delay(1004L, true);
- /* don't redraw and erase the message */
- redraw_cmdline = FALSE;
+ // don't redraw and erase the message
+ redraw_cmdline = false;
}
}
already_warned = TRUE;
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index f016ef6813..c948881eca 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -630,9 +630,9 @@ static void normal_redraw_mode_message(NormalState *s)
ui_cursor_shape(); // show different cursor shape
ui_flush();
if (msg_scroll || emsg_on_display) {
- os_delay(1000L, true); // wait at least one second
+ os_delay(1003L, true); // wait at least one second
}
- os_delay(3000L, false); // wait up to three seconds
+ os_delay(3003L, false); // wait up to three seconds
State = save_State;
msg_scroll = false;
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index e7e0dc4013..9ea74716aa 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -62,6 +62,7 @@ uint64_t os_now(void)
/// @param ignoreinput If true, only SIGINT (CTRL-C) can interrupt.
void os_delay(uint64_t ms, bool ignoreinput)
{
+ DLOG("%" PRIu64 " ms", ms);
if (ignoreinput) {
if (ms > INT_MAX) {
ms = INT_MAX;
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 9f11bae16c..6be3b6fb60 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -6227,7 +6227,7 @@ void check_for_delay(int check_msg_scroll)
&& !did_wait_return
&& emsg_silent == 0) {
ui_flush();
- os_delay(1000L, true);
+ os_delay(1006L, true);
emsg_on_display = false;
if (check_msg_scroll) {
msg_scroll = false;
diff --git a/src/nvim/search.c b/src/nvim/search.c
index c4479a077e..abe05bbd12 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -2373,10 +2373,11 @@ showmatch(
* brief pause, unless 'm' is present in 'cpo' and a character is
* available.
*/
- if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL)
- os_delay(p_mat * 100L, true);
- else if (!char_avail())
- os_delay(p_mat * 100L, false);
+ if (vim_strchr(p_cpo, CPO_SHOWMATCH) != NULL) {
+ os_delay(p_mat * 100L + 8, true);
+ } else if (!char_avail()) {
+ os_delay(p_mat * 100L + 9, false);
+ }
curwin->w_cursor = save_cursor; // restore cursor position
*so = save_so;
*siso = save_siso;
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index 588821f260..a6310344e9 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -625,7 +625,7 @@ do_tag(
}
if (ic && !msg_scrolled && msg_silent == 0) {
ui_flush();
- os_delay(1000L, true);
+ os_delay(1007L, true);
}
}
@@ -2853,7 +2853,7 @@ static int jumpto_tag(
MSG(_("E435: Couldn't find tag, just guessing!"));
if (!msg_scrolled && msg_silent == 0) {
ui_flush();
- os_delay(1000L, true);
+ os_delay(1010L, true);
}
}
retval = OK;
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 5e99edf233..5611560b1b 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -276,28 +276,28 @@ func Test_augroup_warning()
augroup TheWarning
au VimEnter * echo 'entering'
augroup END
- call assert_true(match(execute('au VimEnter'), "TheWarning.*VimEnter") >= 0)
+ call assert_match("TheWarning.*VimEnter", execute('au VimEnter'))
redir => res
augroup! TheWarning
redir END
- call assert_true(match(res, "W19:") >= 0)
- call assert_true(match(execute('au VimEnter'), "-Deleted-.*VimEnter") >= 0)
+ call assert_match("W19:", res)
+ call assert_match("-Deleted-.*VimEnter", execute('au VimEnter'))
" check "Another" does not take the pace of the deleted entry
augroup Another
augroup END
- call assert_true(match(execute('au VimEnter'), "-Deleted-.*VimEnter") >= 0)
+ call assert_match("-Deleted-.*VimEnter", execute('au VimEnter'))
augroup! Another
" no warning for postpone aucmd delete
augroup StartOK
au VimEnter * call RemoveGroup()
augroup END
- call assert_true(match(execute('au VimEnter'), "StartOK.*VimEnter") >= 0)
+ call assert_match("StartOK.*VimEnter", execute('au VimEnter'))
redir => res
doautocmd VimEnter
redir END
- call assert_true(match(res, "W19:") < 0)
+ call assert_notmatch("W19:", res)
au! VimEnter
endfunc
@@ -325,7 +325,7 @@ func Test_augroup_deleted()
au VimEnter * echo
augroup end
augroup! x
- call assert_true(match(execute('au VimEnter'), "-Deleted-.*VimEnter") >= 0)
+ call assert_match("-Deleted-.*VimEnter", execute('au VimEnter'))
au! VimEnter
endfunc
diff --git a/src/nvim/testdir/test_backspace_opt.vim b/src/nvim/testdir/test_backspace_opt.vim
index d680b442db..11459991ea 100644
--- a/src/nvim/testdir/test_backspace_opt.vim
+++ b/src/nvim/testdir/test_backspace_opt.vim
@@ -1,15 +1,5 @@
" Tests for 'backspace' settings
-func Exec(expr)
- let str=''
- try
- exec a:expr
- catch /.*/
- let str=v:exception
- endtry
- return str
-endfunc
-
func Test_backspace_option()
set backspace=
call assert_equal('', &backspace)
@@ -41,10 +31,10 @@ func Test_backspace_option()
set backspace-=eol
call assert_equal('', &backspace)
" Check the error
- call assert_equal(0, match(Exec('set backspace=ABC'), '.*E474'))
- call assert_equal(0, match(Exec('set backspace+=def'), '.*E474'))
+ call assert_fails('set backspace=ABC', 'E474:')
+ call assert_fails('set backspace+=def', 'E474:')
" NOTE: Vim doesn't check following error...
- "call assert_equal(0, match(Exec('set backspace-=ghi'), '.*E474'))
+ "call assert_fails('set backspace-=ghi', 'E474:')
" Check backwards compatibility with version 5.4 and earlier
set backspace=0
@@ -55,8 +45,8 @@ func Test_backspace_option()
call assert_equal('2', &backspace)
set backspace=3
call assert_equal('3', &backspace)
- call assert_false(match(Exec('set backspace=4'), '.*E474'))
- call assert_false(match(Exec('set backspace=10'), '.*E474'))
+ call assert_fails('set backspace=4', 'E474:')
+ call assert_fails('set backspace=10', 'E474:')
" Cleared when 'compatible' is set
" set compatible
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 1a98dc6451..bd2e673570 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -275,6 +275,8 @@ let s:filename_checks = {
\ 'lss': ['file.lss'],
\ 'lua': ['file.lua', 'file.rockspec', 'file.nse'],
\ 'lynx': ['lynx.cfg'],
+ \ 'm3build': ['m3makefile', 'm3overrides'],
+ \ 'm3quake': ['file.quake', 'cm3.cfg'],
\ 'm4': ['file.at'],
\ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml'],
\ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases'],