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