Permalink
Browse files

Merged from the latest developing branch.

git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@1556 2a77ed30-b011-0410-a7ad-c7884a0aa172
  • Loading branch information...
1 parent dcd3322 commit d2bd8040ce05cdbd6147189574ba999e6a7f9b78 edyfox committed Jul 10, 2009
Showing with 145 additions and 88 deletions.
  1. +2 −7 runtime/doc/if_cscop.txt
  2. +11 −0 runtime/doc/various.txt
  3. +8 −1 src/edit.c
  4. +3 −0 src/ex_cmds.c
  5. +2 −0 src/ex_cmds.h
  6. +17 −10 src/ex_docmd.c
  7. +10 −3 src/getchar.c
  8. +62 −54 src/if_cscope.c
  9. +0 −1 src/if_cscope.h
  10. +2 −2 src/if_mzsch.c
  11. +1 −2 src/if_perl.xs
  12. +2 −3 src/if_python.c
  13. +11 −5 src/misc1.c
  14. +2 −0 src/structs.h
  15. +12 −0 src/version.c
View
@@ -355,13 +355,8 @@ cscope version for Win32 see:
The DJGPP-built version from http://cscope.sourceforge.net is known to not
work with Vim.
-There are a couple of hard-coded limitations:
-
- 1. The maximum number of cscope connections allowed is 8. Do you
- really need more?
-
- 2. Doing a |:tjump| when |:cstag| searches the tag files is not
- configurable (e.g., you can't do a tselect instead).
+Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
+is not configurable (e.g., you can't do a tselect instead).
==============================================================================
6. Suggested usage *cscope-suggestions*
View
@@ -508,6 +508,17 @@ N *+X11* Unix only: can restore window title |X11|
messages though. Use ":silent" in the command itself
to avoid that: ":silent menu .... :silent command".
+ *:uns* *:unsilent*
+:uns[ilent] {command} Execute {command} not silently. Only makes a
+ difference when |:silent| was used to get to this
+ command.
+ Use this for giving a message even when |:silent| was
+ used. In this example |:silent| is used to avoid the
+ message about reading the file and |:unsilent| to be
+ able to list the first line of each file. >
+ :silent argdo unsilent echo expand('%') . ": " . getline(1)
+<
+
*:verb* *:verbose*
:[count]verb[ose] {command}
Execute {command} with 'verbose' set to [count]. If
View
@@ -114,6 +114,10 @@ static int compl_restarting = FALSE; /* don't insert match */
* FALSE the word to be completed must be located. */
static int compl_started = FALSE;
+/* Set when doing something for completion that may call edit() recursively,
+ * which is not allowed. */
+static int compl_busy = FALSE;
+
static int compl_matches = 0;
static char_u *compl_pattern = NULL;
static int compl_direction = FORWARD;
@@ -346,7 +350,7 @@ edit(cmdchar, startln, count)
#ifdef FEAT_INS_EXPAND
/* Don't allow recursive insert mode when busy with completion. */
- if (compl_started || pum_visible())
+ if (compl_started || compl_busy || pum_visible())
{
EMSG(_(e_secure));
return FALSE;
@@ -1340,8 +1344,10 @@ edit(cmdchar, startln, count)
goto normalchar;
docomplete:
+ compl_busy = TRUE;
if (ins_complete(c) == FAIL)
compl_cont_status = 0;
+ compl_busy = FALSE;
break;
#endif /* FEAT_INS_EXPAND */
@@ -3172,6 +3178,7 @@ ins_compl_free()
vim_free(match);
} while (compl_curr_match != NULL && compl_curr_match != compl_first_match);
compl_first_match = compl_curr_match = NULL;
+ compl_shown_match = NULL;
}
static void
View
@@ -4013,6 +4013,9 @@ ex_change(eap)
break;
ml_delete(eap->line1, FALSE);
}
+
+ /* make sure the cursor is not beyond the end of the file now */
+ check_cursor_lnum();
deleted_lines_mark(eap->line1, (long)(eap->line2 - lnum));
/* ":append" on the line above the deleted lines. */
View
@@ -991,6 +991,8 @@ EX(CMD_unmap, "unmap", ex_unmap,
BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_unmenu, "unmenu", ex_menu,
BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
+EX(CMD_unsilent, "unsilent", ex_wrongmodifier,
+ NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN),
EX(CMD_update, "update", ex_update,
RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR),
EX(CMD_vglobal, "vglobal", ex_global,
View
@@ -1677,8 +1677,8 @@ do_one_cmd(cmdlinep, sourcing,
char_u *errormsg = NULL; /* error message */
exarg_T ea; /* Ex command arguments */
long verbose_save = -1;
- int save_msg_scroll = 0;
- int did_silent = 0;
+ int save_msg_scroll = msg_scroll;
+ int save_msg_silent = -1;
int did_esilent = 0;
#ifdef HAVE_SANDBOX
int did_sandbox = FALSE;
@@ -1856,9 +1856,9 @@ do_one_cmd(cmdlinep, sourcing,
}
if (!checkforcmd(&ea.cmd, "silent", 3))
break;
- ++did_silent;
+ if (save_msg_silent == -1)
+ save_msg_silent = msg_silent;
++msg_silent;
- save_msg_scroll = msg_scroll;
if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1]))
{
/* ":silent!", but not "silent !cmd" */
@@ -1886,6 +1886,13 @@ do_one_cmd(cmdlinep, sourcing,
#endif
continue;
+ case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3))
+ break;
+ if (save_msg_silent == -1)
+ save_msg_silent = msg_silent;
+ msg_silent = 0;
+ continue;
+
case 'v': if (checkforcmd(&ea.cmd, "vertical", 4))
{
#ifdef FEAT_VERTSPLIT
@@ -2684,13 +2691,12 @@ do_one_cmd(cmdlinep, sourcing,
cmdmod = save_cmdmod;
- if (did_silent > 0)
+ if (save_msg_silent != -1)
{
/* messages could be enabled for a serious error, need to check if the
* counters don't become negative */
- msg_silent -= did_silent;
- if (msg_silent < 0)
- msg_silent = 0;
+ if (!did_emsg)
+ msg_silent = save_msg_silent;
emsg_silent -= did_esilent;
if (emsg_silent < 0)
emsg_silent = 0;
@@ -2987,6 +2993,7 @@ static struct cmdmod
{"silent", 3, FALSE},
{"tab", 3, TRUE},
{"topleft", 2, FALSE},
+ {"unsilent", 3, FALSE},
{"verbose", 4, TRUE},
{"vertical", 4, FALSE},
};
@@ -7838,10 +7845,10 @@ ex_read(eap)
if (*ml_get(lnum) == NUL && u_savedel(lnum, 1L) == OK)
{
ml_delete(lnum, FALSE);
- deleted_lines_mark(lnum, 1L);
if (curwin->w_cursor.lnum > 1
&& curwin->w_cursor.lnum >= lnum)
--curwin->w_cursor.lnum;
+ deleted_lines_mark(lnum, 1L);
}
}
redraw_curbuf_later(VALID);
@@ -7957,7 +7964,7 @@ ex_cd(eap)
shorten_fnames(TRUE);
/* Echo the new current directory if the command was typed. */
- if (KeyTyped)
+ if (KeyTyped || p_verbose >= 5)
ex_pwd(eap);
}
vim_free(tofree);
View
@@ -1309,6 +1309,9 @@ save_typebuf()
return OK;
}
+static int old_char = -1; /* character put back by vungetc() */
+static int old_mod_mask; /* mod_mask for ungotten character */
+
#if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
/*
@@ -1323,6 +1326,10 @@ save_typeahead(tp)
if (!tp->typebuf_valid)
typebuf = tp->save_typebuf;
+ tp->old_char = old_char;
+ tp->old_mod_mask = old_mod_mask;
+ old_char = -1;
+
tp->save_stuffbuff = stuffbuff;
stuffbuff.bh_first.b_next = NULL;
# ifdef USE_INPUT_BUF
@@ -1344,6 +1351,9 @@ restore_typeahead(tp)
typebuf = tp->save_typebuf;
}
+ old_char = tp->old_char;
+ old_mod_mask = tp->old_mod_mask;
+
free_buff(&stuffbuff);
stuffbuff = tp->save_stuffbuff;
# ifdef USE_INPUT_BUF
@@ -1499,9 +1509,6 @@ updatescript(c)
#define KL_PART_KEY -1 /* keylen value for incomplete key-code */
#define KL_PART_MAP -2 /* keylen value for incomplete mapping */
-static int old_char = -1; /* character put back by vungetc() */
-static int old_mod_mask; /* mod_mask for ungotten character */
-
/*
* Get the next input character.
* Can return a special key or a multi-byte character.
Oops, something went wrong.

0 comments on commit d2bd804

Please sign in to comment.