]>
Commit | Line | Data |
---|---|---|
25f687b8 AM |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.124 | |
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 7.1.124 (extra) | |
11 | Problem: Mac: When dropping a file on Vim.app that is already in the buffer | |
12 | list (from .viminfo) results in editing an empty, unnamed buffer. | |
13 | (Axel Kielhorn) Also: warning for unused variable. | |
14 | Solution: Move to the buffer of the first agument. Delete unused variable. | |
15 | Files: src/gui_mac.c | |
16 | ||
17 | ||
18 | *** ../vim-7.1.123/src/gui_mac.c Thu Aug 30 12:50:00 2007 | |
19 | --- src/gui_mac.c Sat Sep 29 13:12:26 2007 | |
20 | *************** | |
21 | *** 1046,1051 **** | |
22 | --- 1046,1052 ---- | |
23 | { | |
24 | int i; | |
25 | char_u *p; | |
26 | + int fnum = -1; | |
27 | ||
28 | /* these are the initial files dropped on the Vim icon */ | |
29 | for (i = 0 ; i < numFiles; i++) | |
30 | *************** | |
31 | *** 1055,1060 **** | |
32 | --- 1056,1073 ---- | |
33 | mch_exit(2); | |
34 | else | |
35 | alist_add(&global_alist, p, 2); | |
36 | + if (fnum == -1) | |
37 | + fnum = GARGLIST[GARGCOUNT - 1].ae_fnum; | |
38 | + } | |
39 | + | |
40 | + /* If the file name was already in the buffer list we need to switch | |
41 | + * to it. */ | |
42 | + if (curbuf->b_fnum != fnum) | |
43 | + { | |
44 | + char_u cmd[30]; | |
45 | + | |
46 | + vim_snprintf((char *)cmd, 30, "silent %dbuffer", fnum); | |
47 | + do_cmdline_cmd(cmd); | |
48 | } | |
49 | ||
50 | /* Change directory to the location of the first file. */ | |
51 | *************** | |
52 | *** 2920,2926 **** | |
53 | /* TODO: Move most of this stuff toward gui_mch_init */ | |
54 | Rect windRect; | |
55 | MenuHandle pomme; | |
56 | - long gestalt_rc; | |
57 | EventTypeSpec eventTypeSpec; | |
58 | EventHandlerRef mouseWheelHandlerRef; | |
59 | #ifdef USE_CARBONKEYHANDLER | |
60 | --- 2933,2938 ---- | |
61 | *** ../vim-7.1.123/src/version.c Wed Sep 26 22:35:06 2007 | |
62 | --- src/version.c Sat Sep 29 13:13:16 2007 | |
63 | *************** | |
64 | *** 668,669 **** | |
65 | --- 668,671 ---- | |
66 | { /* Add new patch number below this line */ | |
67 | + /**/ | |
68 | + 124, | |
69 | /**/ | |
70 | ||
71 | -- | |
72 | ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY | |
73 | KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T | |
74 | HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR | |
75 | LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER), | |
76 | BROTHER MAYNARD | |
77 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
78 | ||
79 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
80 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
81 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
82 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |