On 19-Dec.-2017 04:15, Bram Moolenaar wrote:
Patch 8.0.1405
Problem: Duplicated code for getting a typed character. CursorHold is
called too often in the GUI. (lilydjwg)
Solution: Refactor code to move code up from mch_inchar(). Don't fire
CursorHold if feedkeys() was used. (closes #2451)
Files: src/gui.c, src/proto/gui.pro, src/main.c, src/ui.c,
src/proto/ui.pro, src/os_unix.c
*** ../vim-8.0.1404/src/gui.c 2017-12-17 21:54:51.240060608 +0100
--- src/gui.c 2017-12-18 18:09:53.489250690 +0100
***************
*** 2886,2891 ****
--- 2886,2903 ----
}
After this patch, mingw64 throws this warning if FEAT_TIMERS is not defined:
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_DIRECTX
-DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -DFEAT_MBYTE -pipe -march=native -Wall -O3
-fomit-frame-pointer -freg-struct-return -s gui.c -o gobjnative/gui.o
gui.c:2892:1: warning: 'gui_wait_for_chars_3' defined but not used
[-Wunused-function]
gui_wait_for_chars_3(
^~~~~~~~~~~~~~~~~~~~
This patch tries to fix it. Please check.
Cheers
John
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- gui.c.orig 2017-12-20 04:33:51.476002800 +1100
+++ gui.c 2017-12-20 05:08:57.705416100 +1100
@@ -2885,6 +2885,7 @@
}
}
+#ifdef FEAT_TIMERS
/*
* Passed to ui_wait_for_chars_or_timer(), ignoring extra arguments.
*/
@@ -2896,6 +2897,7 @@
{
return gui_mch_wait_for_chars(wtime);
}
+#endif
/*
* Returns OK if a character was found to be available within the given time,