# HG changeset patch # User vimboss # Date 1116799345 0 # Node ID 453b78cb488172eebc93a3bc6db120f0da283998 # Parent 946f0cbdd535d6fb8915ccc87b837edb15287663 updated for version 7.0075 diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt --- 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 --- 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-optio 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 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -304,6 +304,7 @@ static void ex_stopinsert __ARGS((exarg_ # 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 --- 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 --- a/src/proto/ops.pro +++ b/src/proto/ops.pro @@ -9,6 +9,7 @@ void op_reindent __ARGS((oparg_T *oap, i 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 typ 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));