Mercurial > vim
comparison src/gui.c @ 15525:3ef31ce9d9f9 v8.1.0770
patch 8.1.0770: inconsistent use of ELAPSED_FUNC
commit https://github.com/vim/vim/commit/1ac56c2d11da5ffa44db23e1fd0c533d02ab2f66
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 17 22:28:22 2019 +0100
patch 8.1.0770: inconsistent use of ELAPSED_FUNC
Problem: Inconsistent use of ELAPSED_FUNC.
Solution: Consistently use ELAPSED_FUNC. Also turn ELAPSED_TYPE into a
typedef. (Ozaki Kiichi, closes #3815)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 17 Jan 2019 22:30:06 +0100 |
parents | 41fbbcea0f1b |
children | dd725a8ab112 |
comparison
equal
deleted
inserted
replaced
15524:c51e8d9f4384 | 15525:3ef31ce9d9f9 |
---|---|
2949 * or FAIL otherwise. | 2949 * or FAIL otherwise. |
2950 */ | 2950 */ |
2951 int | 2951 int |
2952 gui_wait_for_chars(long wtime, int tb_change_cnt) | 2952 gui_wait_for_chars(long wtime, int tb_change_cnt) |
2953 { | 2953 { |
2954 int retval; | 2954 int retval; |
2955 #if defined(ELAPSED_FUNC) | 2955 #if defined(ELAPSED_FUNC) |
2956 ELAPSED_TYPE start_tv; | 2956 elapsed_T start_tv; |
2957 #endif | 2957 #endif |
2958 | 2958 |
2959 #ifdef FEAT_MENU | 2959 #ifdef FEAT_MENU |
2960 /* | 2960 /* |
2961 * If we're going to wait a bit, update the menus and mouse shape for the | 2961 * If we're going to wait a bit, update the menus and mouse shape for the |
3000 * wasn't used, put the K_CURSORHOLD key in the input buffer. | 3000 * wasn't used, put the K_CURSORHOLD key in the input buffer. |
3001 */ | 3001 */ |
3002 if (gui_wait_for_chars_or_timer(p_ut) == OK) | 3002 if (gui_wait_for_chars_or_timer(p_ut) == OK) |
3003 retval = OK; | 3003 retval = OK; |
3004 else if (trigger_cursorhold() | 3004 else if (trigger_cursorhold() |
3005 #ifdef ELAPSED_FUNC | 3005 #if defined(ELAPSED_FUNC) |
3006 && ELAPSED_FUNC(start_tv) >= p_ut | 3006 && ELAPSED_FUNC(start_tv) >= p_ut |
3007 #endif | 3007 #endif |
3008 && typebuf.tb_change_cnt == tb_change_cnt) | 3008 && typebuf.tb_change_cnt == tb_change_cnt) |
3009 { | 3009 { |
3010 char_u buf[3]; | 3010 char_u buf[3]; |