|
Karsten Hopp |
4d0841 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
4d0841 |
Subject: Patch 7.3.596
|
|
Karsten Hopp |
4d0841 |
Fcc: outbox
|
|
Karsten Hopp |
4d0841 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
4d0841 |
Mime-Version: 1.0
|
|
Karsten Hopp |
4d0841 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
4d0841 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
4d0841 |
------------
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
Patch 7.3.596
|
|
Karsten Hopp |
4d0841 |
Problem: Can't remove all signs for a file or buffer.
|
|
Karsten Hopp |
4d0841 |
Solution: Support "*" for the sign id. (Christian Brabandt)
|
|
Karsten Hopp |
4d0841 |
Files: runtime/doc/sign.txt, src/buffer.c, src/ex_cmds.c,
|
|
Karsten Hopp |
4d0841 |
src/proto/buffer.pro
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
*** ../vim-7.3.595/runtime/doc/sign.txt 2010-08-15 21:57:17.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
--- runtime/doc/sign.txt 2012-07-10 15:05:19.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 150,157 ****
|
|
Karsten Hopp |
4d0841 |
Remove the previously placed sign {id} from file {fname}.
|
|
Karsten Hopp |
4d0841 |
See remark above about {fname} |:sign-fname|.
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
:sign unplace {id} buffer={nr}
|
|
Karsten Hopp |
4d0841 |
! Same, but use buffer {nr}.
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
:sign unplace {id}
|
|
Karsten Hopp |
4d0841 |
Remove the previously placed sign {id} from all files it
|
|
Karsten Hopp |
4d0841 |
--- 153,166 ----
|
|
Karsten Hopp |
4d0841 |
Remove the previously placed sign {id} from file {fname}.
|
|
Karsten Hopp |
4d0841 |
See remark above about {fname} |:sign-fname|.
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
+ :sign unplace * file={fname}
|
|
Karsten Hopp |
4d0841 |
+ Remove all placed signs in file {fname}.
|
|
Karsten Hopp |
4d0841 |
+
|
|
Karsten Hopp |
4d0841 |
:sign unplace {id} buffer={nr}
|
|
Karsten Hopp |
4d0841 |
! Remove the previously placed sign {id} from buffer {nr}.
|
|
Karsten Hopp |
4d0841 |
!
|
|
Karsten Hopp |
4d0841 |
! :sign unplace * buffer={nr}
|
|
Karsten Hopp |
4d0841 |
! Remove all placed signs in buffer {nr}.
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
:sign unplace {id}
|
|
Karsten Hopp |
4d0841 |
Remove the previously placed sign {id} from all files it
|
|
Karsten Hopp |
4d0841 |
*** ../vim-7.3.595/src/buffer.c 2012-07-06 16:21:58.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
--- src/buffer.c 2012-07-10 15:06:05.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 57,63 ****
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
#if defined(FEAT_SIGNS)
|
|
Karsten Hopp |
4d0841 |
static void insert_sign __ARGS((buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr));
|
|
Karsten Hopp |
4d0841 |
- static void buf_delete_signs __ARGS((buf_T *buf));
|
|
Karsten Hopp |
4d0841 |
#endif
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
|
Karsten Hopp |
4d0841 |
--- 57,62 ----
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 5537,5543 ****
|
|
Karsten Hopp |
4d0841 |
/*
|
|
Karsten Hopp |
4d0841 |
* Delete signs in buffer "buf".
|
|
Karsten Hopp |
4d0841 |
*/
|
|
Karsten Hopp |
4d0841 |
! static void
|
|
Karsten Hopp |
4d0841 |
buf_delete_signs(buf)
|
|
Karsten Hopp |
4d0841 |
buf_T *buf;
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
--- 5536,5542 ----
|
|
Karsten Hopp |
4d0841 |
/*
|
|
Karsten Hopp |
4d0841 |
* Delete signs in buffer "buf".
|
|
Karsten Hopp |
4d0841 |
*/
|
|
Karsten Hopp |
4d0841 |
! void
|
|
Karsten Hopp |
4d0841 |
buf_delete_signs(buf)
|
|
Karsten Hopp |
4d0841 |
buf_T *buf;
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
*** ../vim-7.3.595/src/ex_cmds.c 2012-05-18 16:24:06.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
--- src/ex_cmds.c 2012-07-10 15:14:22.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 6997,7002 ****
|
|
Karsten Hopp |
4d0841 |
--- 6997,7012 ----
|
|
Karsten Hopp |
4d0841 |
lnum = atoi((char *)arg);
|
|
Karsten Hopp |
4d0841 |
arg = skiptowhite(arg);
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
+ else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE)
|
|
Karsten Hopp |
4d0841 |
+ {
|
|
Karsten Hopp |
4d0841 |
+ if (id != -1)
|
|
Karsten Hopp |
4d0841 |
+ {
|
|
Karsten Hopp |
4d0841 |
+ EMSG(_(e_invarg));
|
|
Karsten Hopp |
4d0841 |
+ return;
|
|
Karsten Hopp |
4d0841 |
+ }
|
|
Karsten Hopp |
4d0841 |
+ id = -2;
|
|
Karsten Hopp |
4d0841 |
+ arg = skiptowhite(arg + 1);
|
|
Karsten Hopp |
4d0841 |
+ }
|
|
Karsten Hopp |
4d0841 |
else if (STRNCMP(arg, "name=", 5) == 0)
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
arg += 5;
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 7033,7039 ****
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
EMSG2(_("E158: Invalid buffer name: %s"), arg);
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
! else if (id <= 0)
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
if (lnum >= 0 || sign_name != NULL)
|
|
Karsten Hopp |
4d0841 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
4d0841 |
--- 7043,7049 ----
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
EMSG2(_("E158: Invalid buffer name: %s"), arg);
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
! else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2))
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
if (lnum >= 0 || sign_name != NULL)
|
|
Karsten Hopp |
4d0841 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 7074,7084 ****
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
else if (idx == SIGNCMD_UNPLACE)
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
- /* ":sign unplace {id} file={fname}" */
|
|
Karsten Hopp |
4d0841 |
if (lnum >= 0 || sign_name != NULL)
|
|
Karsten Hopp |
4d0841 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
4d0841 |
else
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
lnum = buf_delsign(buf, id);
|
|
Karsten Hopp |
4d0841 |
update_debug_sign(buf, lnum);
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
--- 7084,7100 ----
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
else if (idx == SIGNCMD_UNPLACE)
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
if (lnum >= 0 || sign_name != NULL)
|
|
Karsten Hopp |
4d0841 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
4d0841 |
+ else if (id == -2)
|
|
Karsten Hopp |
4d0841 |
+ {
|
|
Karsten Hopp |
4d0841 |
+ /* ":sign unplace * file={fname}" */
|
|
Karsten Hopp |
4d0841 |
+ redraw_buf_later(buf, NOT_VALID);
|
|
Karsten Hopp |
4d0841 |
+ buf_delete_signs(buf);
|
|
Karsten Hopp |
4d0841 |
+ }
|
|
Karsten Hopp |
4d0841 |
else
|
|
Karsten Hopp |
4d0841 |
{
|
|
Karsten Hopp |
4d0841 |
+ /* ":sign unplace {id} file={fname}" */
|
|
Karsten Hopp |
4d0841 |
lnum = buf_delsign(buf, id);
|
|
Karsten Hopp |
4d0841 |
update_debug_sign(buf, lnum);
|
|
Karsten Hopp |
4d0841 |
}
|
|
Karsten Hopp |
4d0841 |
*** ../vim-7.3.595/src/proto/buffer.pro 2012-02-22 14:58:24.000000000 +0100
|
|
Karsten Hopp |
4d0841 |
--- src/proto/buffer.pro 2012-07-10 15:06:10.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 60,65 ****
|
|
Karsten Hopp |
4d0841 |
--- 60,66 ----
|
|
Karsten Hopp |
4d0841 |
int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
|
|
Karsten Hopp |
4d0841 |
int buf_findsigntype_id __ARGS((buf_T *buf, linenr_T lnum, int typenr));
|
|
Karsten Hopp |
4d0841 |
int buf_signcount __ARGS((buf_T *buf, linenr_T lnum));
|
|
Karsten Hopp |
4d0841 |
+ void buf_delete_signs __ARGS((buf_T *buf));
|
|
Karsten Hopp |
4d0841 |
void buf_delete_all_signs __ARGS((void));
|
|
Karsten Hopp |
4d0841 |
void sign_list_placed __ARGS((buf_T *rbuf));
|
|
Karsten Hopp |
4d0841 |
void sign_mark_adjust __ARGS((linenr_T line1, linenr_T line2, long amount, long amount_after));
|
|
Karsten Hopp |
4d0841 |
*** ../vim-7.3.595/src/version.c 2012-07-10 14:56:42.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
--- src/version.c 2012-07-10 15:16:40.000000000 +0200
|
|
Karsten Hopp |
4d0841 |
***************
|
|
Karsten Hopp |
4d0841 |
*** 716,717 ****
|
|
Karsten Hopp |
4d0841 |
--- 716,719 ----
|
|
Karsten Hopp |
4d0841 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
4d0841 |
+ /**/
|
|
Karsten Hopp |
4d0841 |
+ 596,
|
|
Karsten Hopp |
4d0841 |
/**/
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
--
|
|
Karsten Hopp |
4d0841 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
4d0841 |
105. When someone asks you for your address, you tell them your URL.
|
|
Karsten Hopp |
4d0841 |
|
|
Karsten Hopp |
4d0841 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
4d0841 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
4d0841 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
4d0841 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|