To: vim-dev@vim.org Subject: Patch 6.2.178 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.178 Problem: People who don't know how to exit Vim try pressing CTRL-C. Solution: Give a message how to exit Vim when CTRL-C is pressed and it doesn't cancel anything. Files: src/normal.c *** ../vim-6.2.177/src/normal.c Mon Dec 29 20:32:43 2003 --- src/normal.c Thu Jan 8 21:19:53 2004 *************** *** 7760,7767 **** --- 7760,7785 ---- nv_esc(cap) cmdarg_T *cap; { + int no_reason; + + no_reason = (cap->oap->op_type == OP_NOP + && cap->opcount == 0 + && cap->count0 == 0 + && cap->oap->regname == 0 + && !p_im); + if (cap->arg) /* TRUE for CTRL-C */ { + if (restart_edit == 0 + #ifdef FEAT_CMDWIN + && cmdwin_type == 0 + #endif + #ifdef FEAT_VISUAL + && !VIsual_active + #endif + && no_reason) + msg(_("Type :quit to exit Vim")); + restart_edit = 0; #ifdef FEAT_CMDWIN if (cmdwin_type != 0) *************** *** 7783,7794 **** } else #endif ! if (cap->oap->op_type == OP_NOP ! && cap->opcount == 0 ! && cap->count0 == 0 ! && cap->oap->regname == 0 ! && !p_im) ! vim_beep(); clearop(cap->oap); /* A CTRL-C is often used at the start of a menu. When 'insertmode' is --- 7801,7808 ---- } else #endif ! if (no_reason) ! vim_beep(); clearop(cap->oap); /* A CTRL-C is often used at the start of a menu. When 'insertmode' is *** ../vim-6.2.177/src/version.c Fri Jan 9 15:10:05 2004 --- src/version.c Fri Jan 9 19:16:24 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 178, /**/ -- hundred-and-one symptoms of being an internet addict: 214. Your MCI "Circle of Friends" are all Hayes-compatible. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///