1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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,
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
21 Remove the previously placed sign {id} from file {fname}.
22 See remark above about {fname} |:sign-fname|.
24 :sign unplace {id} buffer={nr}
25 ! Same, but use buffer {nr}.
28 Remove the previously placed sign {id} from all files it
30 Remove the previously placed sign {id} from file {fname}.
31 See remark above about {fname} |:sign-fname|.
33 + :sign unplace * file={fname}
34 + Remove all placed signs in file {fname}.
36 :sign unplace {id} buffer={nr}
37 ! Remove the previously placed sign {id} from buffer {nr}.
39 ! :sign unplace * buffer={nr}
40 ! Remove all placed signs in buffer {nr}.
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
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));
54 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
59 * Delete signs in buffer "buf".
67 * Delete signs in buffer "buf".
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
78 lnum = atoi((char *)arg);
79 arg = skiptowhite(arg);
81 + else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE)
89 + arg = skiptowhite(arg + 1);
91 else if (STRNCMP(arg, "name=", 5) == 0)
97 EMSG2(_("E158: Invalid buffer name: %s"), arg);
101 if (lnum >= 0 || sign_name != NULL)
105 EMSG2(_("E158: Invalid buffer name: %s"), arg);
107 ! else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
109 if (lnum >= 0 || sign_name != NULL)
114 else if (idx == SIGNCMD_UNPLACE)
116 - /* ":sign unplace {id} file={fname}" */
117 if (lnum >= 0 || sign_name != NULL)
121 lnum = buf_delsign(buf, id);
122 update_debug_sign(buf, lnum);
126 else if (idx == SIGNCMD_UNPLACE)
128 if (lnum >= 0 || sign_name != NULL)
132 + /* ":sign unplace * file={fname}" */
133 + redraw_buf_later(buf, NOT_VALID);
134 + buf_delete_signs(buf);
138 + /* ":sign unplace {id} file={fname}" */
139 lnum = buf_delsign(buf, id);
140 update_debug_sign(buf, lnum);
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
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
159 { /* Add new patch number below this line */
165 hundred-and-one symptoms of being an internet addict:
166 105. When someone asks you for your address, you tell them your URL.
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 ///