diff options
Diffstat (limited to '')
-rw-r--r-- | src/os_win32.c | 71 |
1 files changed, 13 insertions, 58 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index 9947150..6384ac8 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -34,52 +34,14 @@ #ifndef PROTO # include <process.h> # include <winternl.h> -#endif - -#undef chdir -#ifdef __GNUC__ -# ifndef __MINGW32__ -# include <dirent.h> -# endif -#else # include <direct.h> -#endif -#ifndef PROTO # if !defined(FEAT_GUI_MSWIN) # include <shellapi.h> # endif -#endif - -#ifdef FEAT_JOB_CHANNEL -# include <tlhelp32.h> -#endif -#ifdef __MINGW32__ -# ifndef FROM_LEFT_1ST_BUTTON_PRESSED -# define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001 -# endif -# ifndef RIGHTMOST_BUTTON_PRESSED -# define RIGHTMOST_BUTTON_PRESSED 0x0002 -# endif -# ifndef FROM_LEFT_2ND_BUTTON_PRESSED -# define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004 -# endif -# ifndef FROM_LEFT_3RD_BUTTON_PRESSED -# define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008 -# endif -# ifndef FROM_LEFT_4TH_BUTTON_PRESSED -# define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010 -# endif - -/* - * EventFlags - */ -# ifndef MOUSE_MOVED -# define MOUSE_MOVED 0x0001 -# endif -# ifndef DOUBLE_CLICK -# define DOUBLE_CLICK 0x0002 +# ifdef FEAT_JOB_CHANNEL +# include <tlhelp32.h> # endif #endif @@ -1302,6 +1264,13 @@ decode_key_event( } } } + else if (pker->wVirtualKeyCode == VK_INSERT + && (nModifs & SHIFT) != 0 + && (nModifs & ~SHIFT) == 0) + { + *pmodifiers = 0; + *pch2 = VirtKeyMap[i].chShift; + } else { *pch2 = VirtKeyMap[i].chAlone; @@ -2762,12 +2731,6 @@ theend: #endif // FEAT_GUI_MSWIN } -#ifndef PROTO -# ifndef __MINGW32__ -# include <shellapi.h> // required for FindExecutable() -# endif -#endif - /* * Return TRUE if "name" is an executable file, FALSE if not or it doesn't exist. * When returning TRUE and "path" is not NULL save the path and set "*path" to @@ -3598,6 +3561,10 @@ mch_exit_c(int r) vtp_exit(); stoptermcap(); + // Switch back to main screen buffer. + if (use_alternate_screen_buffer) + vtp_printf("\033[?1049l"); + if (g_fWindInitCalled) settmode(TMODE_COOK); @@ -5529,11 +5496,7 @@ mch_call_shell( * CTRL-C, Ctrl-Break or illegal instruction might otherwise kill us. */ mch_signal(SIGINT, SIG_IGN); -#if defined(__GNUC__) && !defined(__MINGW32__) - mch_signal(SIGKILL, SIG_IGN); -#else mch_signal(SIGBREAK, SIG_IGN); -#endif mch_signal(SIGILL, SIG_IGN); mch_signal(SIGFPE, SIG_IGN); mch_signal(SIGSEGV, SIG_IGN); @@ -5768,11 +5731,7 @@ mch_call_shell( resettitle(); mch_signal(SIGINT, SIG_DFL); -#if defined(__GNUC__) && !defined(__MINGW32__) - mch_signal(SIGKILL, SIG_DFL); -#else mch_signal(SIGBREAK, SIG_DFL); -#endif mch_signal(SIGILL, SIG_DFL); mch_signal(SIGFPE, SIG_DFL); mch_signal(SIGSEGV, SIG_DFL); @@ -6379,10 +6338,6 @@ termcap_mode_end(void) RestoreConsoleBuffer(cb, p_rs); restore_console_color_rgb(); - // Switch back to main screen buffer. - if (exiting && use_alternate_screen_buffer) - vtp_printf("\033[?1049l"); - if (!USE_WT && (p_rs || exiting)) { /* |