diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-03-16 09:52:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-03-16 09:52:38 +0000 |
commit | 916b7afcbb6f3cf7ae9e4699c47a5ec885a56af2 (patch) | |
tree | 973380b49df014a3d4f47a44d23c23425ae49bb2 /src/os_msdos.c | |
parent | da5d740e92cf643317cbeb65ad92ed215c6a740d (diff) | |
download | vim-git-916b7afcbb6f3cf7ae9e4699c47a5ec885a56af2.tar.gz |
updated for version 7.0060
Diffstat (limited to 'src/os_msdos.c')
-rw-r--r-- | src/os_msdos.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/src/os_msdos.c b/src/os_msdos.c index 41d587763..963de38b9 100644 --- a/src/os_msdos.c +++ b/src/os_msdos.c @@ -989,9 +989,6 @@ mch_inchar( int c; int tmp_c; static int nextchar = 0; /* may keep character when maxlen == 1 */ -#ifdef FEAT_AUTOCMD - static int once_already = 0; -#endif /* * if we got a ctrl-C when we were busy, there will be a "^C" somewhere @@ -1027,38 +1024,26 @@ mch_inchar( #ifdef FEAT_MOUSE show_mouse(FALSE); #endif -#ifdef FEAT_AUTOCMD - once_already = 0; -#endif return 0; } } else /* time == -1 */ { -#ifdef FEAT_AUTOCMD - if (once_already == 2) - updatescript(0); - else if (once_already == 1) - { - setcursor(); - once_already = 2; - return 0; - } - else -#endif /* * If there is no character available within 2 seconds (default) - * write the autoscript file to disk + * write the autoscript file to disk. Or cause the CursorHold event + * to be triggered. */ - if (WaitForChar(p_ut) == 0) + if (WaitForChar(p_ut) == 0) { #ifdef FEAT_AUTOCMD - if (has_cursorhold() && get_real_state() == NORMAL_BUSY) + if (!did_cursorhold && has_cursorhold() + && get_real_state() == NORMAL_BUSY && maxlen >= 3) { - apply_autocmds(EVENT_CURSORHOLD, NULL, NULL, FALSE, curbuf); - update_screen(VALID); - once_already = 1; - return 0; + buf[0] = K_SPECIAL; + buf[1] = KS_EXTRA; + buf[2] = (int)KE_CURSORHOLD; + return 3; } else #endif @@ -1194,9 +1179,6 @@ mch_inchar( #endif beep_count = 0; /* may beep again now that we got some chars */ -#ifdef FEAT_AUTOCMD - once_already = 0; -#endif return len; } |