]>
Commit | Line | Data |
---|---|---|
d02ad552 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.178 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.2.178 | |
11 | Problem: People who don't know how to exit Vim try pressing CTRL-C. | |
12 | Solution: Give a message how to exit Vim when CTRL-C is pressed and it | |
13 | doesn't cancel anything. | |
14 | Files: src/normal.c | |
15 | ||
16 | ||
17 | *** ../vim-6.2.177/src/normal.c Mon Dec 29 20:32:43 2003 | |
18 | --- src/normal.c Thu Jan 8 21:19:53 2004 | |
19 | *************** | |
20 | *** 7760,7767 **** | |
21 | --- 7760,7785 ---- | |
22 | nv_esc(cap) | |
23 | cmdarg_T *cap; | |
24 | { | |
25 | + int no_reason; | |
26 | + | |
27 | + no_reason = (cap->oap->op_type == OP_NOP | |
28 | + && cap->opcount == 0 | |
29 | + && cap->count0 == 0 | |
30 | + && cap->oap->regname == 0 | |
31 | + && !p_im); | |
32 | + | |
33 | if (cap->arg) /* TRUE for CTRL-C */ | |
34 | { | |
35 | + if (restart_edit == 0 | |
36 | + #ifdef FEAT_CMDWIN | |
37 | + && cmdwin_type == 0 | |
38 | + #endif | |
39 | + #ifdef FEAT_VISUAL | |
40 | + && !VIsual_active | |
41 | + #endif | |
42 | + && no_reason) | |
43 | + msg(_("Type :quit<Enter> to exit Vim")); | |
44 | + | |
45 | restart_edit = 0; | |
46 | #ifdef FEAT_CMDWIN | |
47 | if (cmdwin_type != 0) | |
48 | *************** | |
49 | *** 7783,7794 **** | |
50 | } | |
51 | else | |
52 | #endif | |
53 | ! if (cap->oap->op_type == OP_NOP | |
54 | ! && cap->opcount == 0 | |
55 | ! && cap->count0 == 0 | |
56 | ! && cap->oap->regname == 0 | |
57 | ! && !p_im) | |
58 | ! vim_beep(); | |
59 | clearop(cap->oap); | |
60 | ||
61 | /* A CTRL-C is often used at the start of a menu. When 'insertmode' is | |
62 | --- 7801,7808 ---- | |
63 | } | |
64 | else | |
65 | #endif | |
66 | ! if (no_reason) | |
67 | ! vim_beep(); | |
68 | clearop(cap->oap); | |
69 | ||
70 | /* A CTRL-C is often used at the start of a menu. When 'insertmode' is | |
71 | *** ../vim-6.2.177/src/version.c Fri Jan 9 15:10:05 2004 | |
72 | --- src/version.c Fri Jan 9 19:16:24 2004 | |
73 | *************** | |
74 | *** 639,640 **** | |
75 | --- 639,642 ---- | |
76 | { /* Add new patch number below this line */ | |
77 | + /**/ | |
78 | + 178, | |
79 | /**/ | |
80 | ||
81 | -- | |
82 | hundred-and-one symptoms of being an internet addict: | |
83 | 214. Your MCI "Circle of Friends" are all Hayes-compatible. | |
84 | ||
85 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
86 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
87 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
88 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |