summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-05-22 22:02:25 +0000
committerBram Moolenaar <Bram@vim.org>2005-05-22 22:02:25 +0000
commitf95dc3b8234c05116f71aee5a72ddd8d9afd4718 (patch)
treedf270e41db098379fa4c862fb9f6ca2ae76d5968
parentf4630b60f598db3c163182f1920e7308d5b54cbb (diff)
downloadvim-f95dc3b8234c05116f71aee5a72ddd8d9afd4718.zip
updated for version 7.0075
-rw-r--r--runtime/doc/editing.txt6
-rw-r--r--runtime/doc/index.txt3
-rw-r--r--src/ex_docmd.c12
-rw-r--r--src/message.c33
-rw-r--r--src/proto/ops.pro3
5 files changed, 32 insertions, 25 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index c8b694193..fedaba5ed 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.0aa. Last change: 2005 Apr 27
+*editing.txt* For Vim version 7.0aa. Last change: 2005 May 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -563,7 +563,9 @@ list of the current window.
current entry.
This command keeps the currently edited file, also
when it's deleted from the argument list.
- {not in Vi} {not available when compiled without the
+ Example: >
+ :argdel *.obj
+< {not in Vi} {not available when compiled without the
|+listcmds| feature}
:{range}argd[elete] Delete the {range} files from the argument list.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index b7a9db952..01fb14b7c 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
+*index.txt* For Vim version 7.0aa. Last change: 2005 May 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1354,6 +1354,7 @@ The commands are sorted on the non-optional part of their name.
argument list
|:sniff| :sni[ff] send request to sniff
|:snomagic| :sno[magic] :substitute with 'nomagic'
+|:sort| :sor[t] sort lines
|:source| :so[urce] read Vim or Ex commands from a file
|:split| :sp[lit] split current window
|:sprevious| :spr[evious] split window and go to previous file in the
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 9d9062a8e..58905f097 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -304,6 +304,7 @@ static void ex_stopinsert __ARGS((exarg_T *eap));
# define ex_startinsert ex_ni
# define ex_stopinsert ex_ni
# define ex_helptags ex_ni
+# define ex_sort ex_ni
#endif
#ifdef FEAT_FIND_ID
static void ex_checkpath __ARGS((exarg_T *eap));
@@ -9437,6 +9438,7 @@ put_view(fd, wp, add_edit, flagp)
win_T *save_curwin;
int f;
int do_cursor;
+ int did_next = FALSE;
/* Always restore cursor position for ":mksession". For ":mkview" only
* when 'viewoptions' contains "cursor". */
@@ -9459,17 +9461,19 @@ put_view(fd, wp, add_edit, flagp)
return FAIL;
}
- /* Only when part of a session: restore the argument index. */
- if (wp->w_arg_idx != 0 && flagp == &ssop_flags)
+ /* Only when part of a session: restore the argument index. Some
+ * arguments may have been deleted, check if the index is valid. */
+ if (wp->w_arg_idx != 0 && wp->w_arg_idx <= WARGCOUNT(wp)
+ && flagp == &ssop_flags)
{
if (fprintf(fd, "%ldnext", (long)wp->w_arg_idx) < 0
|| put_eol(fd) == FAIL)
return FAIL;
+ did_next = TRUE;
}
/* Edit the file. Skip this when ":next" already did it. */
- if (add_edit && (wp->w_arg_idx == 0 || flagp != &ssop_flags
- || wp->w_arg_idx_invalid))
+ if (add_edit && (!did_next || wp->w_arg_idx_invalid))
{
/*
* Load the file.
diff --git a/src/message.c b/src/message.c
index 7f9a22c2d..85ff3e629 100644
--- a/src/message.c
+++ b/src/message.c
@@ -844,9 +844,7 @@ wait_return(redraw)
int c;
int oldState;
int tmpState;
-#ifndef ORG_HITRETURN
int had_got_int;
-#endif
if (redraw == TRUE)
must_redraw = CLEAR;
@@ -900,22 +898,22 @@ wait_return(redraw)
#endif
hit_return_msg();
-#ifdef ORG_HITRETURN
- do
- {
- c = safe_vgetc();
- } while (vim_strchr((char_u *)"\r\n: ", c) == NULL);
- if (c == ':') /* this can vi too (but not always!) */
- stuffcharReadbuff(c);
-#else
do
{
/* Remember "got_int", if it is set vgetc() probably returns a
* CTRL-C, but we need to loop then. */
had_got_int = got_int;
+
+ /* Don't do mappings here, we put the character back in the
+ * typeahead buffer. */
+ ++no_mapping;
+ ++allow_keys;
c = safe_vgetc();
if (had_got_int && !global_busy)
got_int = FALSE;
+ --no_mapping;
+ --allow_keys;
+
#ifdef FEAT_CLIPBOARD
/* Strange way to allow copying (yanking) a modeless selection at
* the hit-enter prompt. Use CTRL-Y, because the same is used in
@@ -957,11 +955,16 @@ wait_return(redraw)
#endif
if (vim_strchr((char_u *)"\r\n ", c) == NULL && c != Ctrl_C)
{
- stuffcharReadbuff(c);
+ char_u buf[2];
+
+ /* Put the character back in the typeahead buffer. Don't use the
+ * stuff buffer, because lmaps wouldn't work. */
+ buf[0] = c;
+ buf[1] = NUL;
+ ins_typebuf(buf, REMAP_YES, 0, !KeyTyped, FALSE);
do_redraw = TRUE; /* need a redraw even though there is
- something in the stuff buffer */
+ typeahead */
}
-#endif
}
redir_off = FALSE;
@@ -1033,11 +1036,7 @@ hit_return_msg()
if (got_int)
MSG_PUTS(_("Interrupt: "));
-#ifdef ORG_HITRETURN
- MSG_PUTS_ATTR(_("Hit ENTER to continue"), hl_attr(HLF_R));
-#else
MSG_PUTS_ATTR(_("Hit ENTER or type command to continue"), hl_attr(HLF_R));
-#endif
if (!msg_use_printf())
msg_clr_eos();
}
diff --git a/src/proto/ops.pro b/src/proto/ops.pro
index be49f0f10..5952b951e 100644
--- a/src/proto/ops.pro
+++ b/src/proto/ops.pro
@@ -9,6 +9,7 @@ void op_reindent __ARGS((oparg_T *oap, int (*how)(void)));
int get_expr_register __ARGS((void));
void set_expr_line __ARGS((char_u *new_line));
char_u *get_expr_line __ARGS((void));
+char_u *get_expr_line_src __ARGS((void));
int valid_yank_reg __ARGS((int regname, int writing));
void get_yank_register __ARGS((int regname, int writing));
int may_get_selection __ARGS((int regname));
@@ -48,7 +49,7 @@ void clip_yank_selection __ARGS((int type, char_u *str, long len, VimClipboard *
int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd));
void dnd_yank_drag_data __ARGS((char_u *str, long len));
char_u get_reg_type __ARGS((int regname, long *reglen));
-char_u *get_reg_contents __ARGS((int regname, int allowexpr));
+char_u *get_reg_contents __ARGS((int regname, int allowexpr, int expr_src));
void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append));
void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len));
void clear_oparg __ARGS((oparg_T *oap));