]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.596
- add patches 7.3.619-743
[packages/vim.git] / 7.3.596
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.596
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.596
11 Problem:    Can't remove all signs for a file or buffer.
12 Solution:   Support "*" for the sign id. (Christian Brabandt)
13 Files:      runtime/doc/sign.txt, src/buffer.c, src/ex_cmds.c,
14             src/proto/buffer.pro
15
16
17 *** ../vim-7.3.595/runtime/doc/sign.txt 2010-08-15 21:57:17.000000000 +0200
18 --- runtime/doc/sign.txt        2012-07-10 15:05:19.000000000 +0200
19 ***************
20 *** 150,157 ****
21                 Remove the previously placed sign {id} from file {fname}.
22                 See remark above about {fname} |:sign-fname|.
23   
24   :sign unplace {id} buffer={nr}
25 !               Same, but use buffer {nr}.
26   
27   :sign unplace {id}
28                 Remove the previously placed sign {id} from all files it
29 --- 153,166 ----
30                 Remove the previously placed sign {id} from file {fname}.
31                 See remark above about {fname} |:sign-fname|.
32   
33 + :sign unplace * file={fname}
34 +               Remove all placed signs in file {fname}.
35
36   :sign unplace {id} buffer={nr}
37 !               Remove the previously placed sign {id} from buffer {nr}.
38
39 ! :sign unplace * buffer={nr}
40 !               Remove all placed signs in buffer {nr}.
41   
42   :sign unplace {id}
43                 Remove the previously placed sign {id} from all files it
44 *** ../vim-7.3.595/src/buffer.c 2012-07-06 16:21:58.000000000 +0200
45 --- src/buffer.c        2012-07-10 15:06:05.000000000 +0200
46 ***************
47 *** 57,63 ****
48   
49   #if defined(FEAT_SIGNS)
50   static void insert_sign __ARGS((buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr));
51 - static void buf_delete_signs __ARGS((buf_T *buf));
52   #endif
53   
54   #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
55 --- 57,62 ----
56 ***************
57 *** 5537,5543 ****
58   /*
59    * Delete signs in buffer "buf".
60    */
61 !     static void
62   buf_delete_signs(buf)
63       buf_T     *buf;
64   {
65 --- 5536,5542 ----
66   /*
67    * Delete signs in buffer "buf".
68    */
69 !     void
70   buf_delete_signs(buf)
71       buf_T     *buf;
72   {
73 *** ../vim-7.3.595/src/ex_cmds.c        2012-05-18 16:24:06.000000000 +0200
74 --- src/ex_cmds.c       2012-07-10 15:14:22.000000000 +0200
75 ***************
76 *** 6997,7002 ****
77 --- 6997,7012 ----
78                 lnum = atoi((char *)arg);
79                 arg = skiptowhite(arg);
80             }
81 +           else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE)
82 +           {
83 +               if (id != -1)
84 +               {
85 +                   EMSG(_(e_invarg));
86 +                   return;
87 +               }
88 +               id = -2;
89 +               arg = skiptowhite(arg + 1);
90 +           }
91             else if (STRNCMP(arg, "name=", 5) == 0)
92             {
93                 arg += 5;
94 ***************
95 *** 7033,7039 ****
96         {
97             EMSG2(_("E158: Invalid buffer name: %s"), arg);
98         }
99 !       else if (id <= 0)
100         {
101             if (lnum >= 0 || sign_name != NULL)
102                 EMSG(_(e_invarg));
103 --- 7043,7049 ----
104         {
105             EMSG2(_("E158: Invalid buffer name: %s"), arg);
106         }
107 !       else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
108         {
109             if (lnum >= 0 || sign_name != NULL)
110                 EMSG(_(e_invarg));
111 ***************
112 *** 7074,7084 ****
113         }
114         else if (idx == SIGNCMD_UNPLACE)
115         {
116 -           /* ":sign unplace {id} file={fname}" */
117             if (lnum >= 0 || sign_name != NULL)
118                 EMSG(_(e_invarg));
119             else
120             {
121                 lnum = buf_delsign(buf, id);
122                 update_debug_sign(buf, lnum);
123             }
124 --- 7084,7100 ----
125         }
126         else if (idx == SIGNCMD_UNPLACE)
127         {
128             if (lnum >= 0 || sign_name != NULL)
129                 EMSG(_(e_invarg));
130 +           else if (id == -2)
131 +           {
132 +               /* ":sign unplace * file={fname}" */
133 +               redraw_buf_later(buf, NOT_VALID);
134 +               buf_delete_signs(buf);
135 +           }
136             else
137             {
138 +               /* ":sign unplace {id} file={fname}" */
139                 lnum = buf_delsign(buf, id);
140                 update_debug_sign(buf, lnum);
141             }
142 *** ../vim-7.3.595/src/proto/buffer.pro 2012-02-22 14:58:24.000000000 +0100
143 --- src/proto/buffer.pro        2012-07-10 15:06:10.000000000 +0200
144 ***************
145 *** 60,65 ****
146 --- 60,66 ----
147   int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
148   int buf_findsigntype_id __ARGS((buf_T *buf, linenr_T lnum, int typenr));
149   int buf_signcount __ARGS((buf_T *buf, linenr_T lnum));
150 + void buf_delete_signs __ARGS((buf_T *buf));
151   void buf_delete_all_signs __ARGS((void));
152   void sign_list_placed __ARGS((buf_T *rbuf));
153   void sign_mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount, long amount_after));
154 *** ../vim-7.3.595/src/version.c        2012-07-10 14:56:42.000000000 +0200
155 --- src/version.c       2012-07-10 15:16:40.000000000 +0200
156 ***************
157 *** 716,717 ****
158 --- 716,719 ----
159   {   /* Add new patch number below this line */
160 + /**/
161 +     596,
162   /**/
163
164 -- 
165 hundred-and-one symptoms of being an internet addict:
166 105. When someone asks you for your address, you tell them your URL.
167
168  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
169 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
170 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
171  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.054359 seconds and 3 git commands to generate.