To: Will Day Cc: VIM Development Mailing List Subject: patch 5.4.30 (was: patch: BeOS subshell) In-Reply-To: <19990813005146.A16107@rom.oit.gatech.edu> Fcc: outbox From: Bram Moolenaar ------------ Will Day wrote: > There was another problem with vim54 under R4.5 that I've been trying to > track down: when opening a child shell with ":sh", the first character > typed appears to be caught and interpreted by the parent vim process. [more explanations and patch removed] Since nobody said this doesn't work, I'll make an official patch out of this. Although it is for BeOS, it doesn't require the extra archive, thus it goes in the normal series of numbered patches. Patch 5.4.30 Problem: BeOS: Suspending Vim with CTRL-Z didn't work (killed Vim). The first character typed after ":sh" goes to Vim, instead of the started shell. Solution: Don't suspend Vim, start a new shell. Kill the async read thread when starting a new shell. It will be restarted later. (Will Day) Files: src/os_unix.c, src/ui.c *** ../vim-5.4.29/src/os_unix.c Sun Jul 18 13:09:30 1999 --- src/os_unix.c Mon Aug 16 21:36:28 1999 *************** *** 580,586 **** void mch_suspend() { ! #ifdef SIGTSTP out_flush(); /* needed to make cursor visible on some systems */ settmode(TMODE_COOK); out_flush(); /* needed to disable mouse on some systems */ --- 580,587 ---- void mch_suspend() { ! /* BeOS does have SIGTSTP, but it doesn't work. */ ! #if defined(SIGTSTP) && !defined(__BEOS__) out_flush(); /* needed to make cursor visible on some systems */ settmode(TMODE_COOK); out_flush(); /* needed to disable mouse on some systems */ *************** *** 2235,2240 **** --- 2237,2245 ---- #endif { + #ifdef __BEOS__ + beos_cleanup_read_thread(); + #endif if ((pid = fork()) == -1) /* maybe we should use vfork() */ { MSG_PUTS("\nCannot fork\n"); *** ../vim-5.4.29/src/ui.c Tue Aug 10 16:12:03 1999 --- src/ui.c Mon Aug 16 21:30:46 1999 *************** *** 184,190 **** mch_suspend(); } ! #if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) /* * When the OS can't really suspend, call this function to start a shell. */ --- 184,190 ---- mch_suspend(); } ! #if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) || defined(__BEOS__) /* * When the OS can't really suspend, call this function to start a shell. */ *** ../vim-5.4.29/src/version.h Mon Aug 16 21:33:53 1999 --- src/version.h Mon Aug 16 21:30:37 1999 *************** *** 19,26 **** #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 29 ! #define VIM_VERSION_PATCHLEVEL_STR "29" /* * VIM_VERSION_NODOT is used for the runtime directory name. --- 19,26 ---- #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 30 ! #define VIM_VERSION_PATCHLEVEL_STR "30" /* * VIM_VERSION_NODOT is used for the runtime directory name. *************** *** 30,35 **** */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.29" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.29 (1999 Aug 16)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.29 (1999 Aug 16, compiled " --- 30,35 ---- */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.30" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.30 (1999 Aug 16)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.30 (1999 Aug 16, compiled " -- hundred-and-one symptoms of being an internet addict: 105. When someone asks you for your address, you tell them your URL. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /