|
Karsten Hopp |
0815f7 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
0815f7 |
Subject: Patch 7.3.610
|
|
Karsten Hopp |
0815f7 |
Fcc: outbox
|
|
Karsten Hopp |
0815f7 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
0815f7 |
Mime-Version: 1.0
|
|
Karsten Hopp |
0815f7 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
0815f7 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
0815f7 |
------------
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
Patch 7.3.610
|
|
Karsten Hopp |
0815f7 |
Problem: Cannot operate on the text that a search pattern matches.
|
|
Karsten Hopp |
0815f7 |
Solution: Add the "gn" and "gN" commands. (Christian Brabandt)
|
|
Karsten Hopp |
0815f7 |
Files: runtime/doc/index.txt, runtime/doc/visual.txt, src/normal.c,
|
|
Karsten Hopp |
0815f7 |
src/proto/search.pro, src/search.c, src/testdir/test53.in,
|
|
Karsten Hopp |
0815f7 |
src/testdir/test53.ok
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/runtime/doc/index.txt 2010-08-15 21:57:18.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- runtime/doc/index.txt 2012-07-25 14:27:20.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 719,726 ****
|
|
Karsten Hopp |
0815f7 |
--- 719,729 ----
|
|
Karsten Hopp |
0815f7 |
|gH| gH start Select line mode
|
|
Karsten Hopp |
0815f7 |
|gI| gI 2 like "I", but always start in column 1
|
|
Karsten Hopp |
0815f7 |
|gJ| gJ 2 join lines without inserting space
|
|
Karsten Hopp |
0815f7 |
+ |gN| gN 1,2 find the previous match with the last used
|
|
Karsten Hopp |
0815f7 |
+ search pattern and Visually select it
|
|
Karsten Hopp |
0815f7 |
|gP| ["x]gP 2 put the text [from register x] before the
|
|
Karsten Hopp |
0815f7 |
cursor N times, leave the cursor after it
|
|
Karsten Hopp |
0815f7 |
+ |gQ| gQ switch to "Ex" mode with Vim editing
|
|
Karsten Hopp |
0815f7 |
|gR| gR 2 enter Virtual Replace mode
|
|
Karsten Hopp |
0815f7 |
|gU| gU{motion} 2 make Nmove text uppercase
|
|
Karsten Hopp |
0815f7 |
|gV| gV don't reselect the previous Visual area
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 750,755 ****
|
|
Karsten Hopp |
0815f7 |
--- 753,760 ----
|
|
Karsten Hopp |
0815f7 |
lines down
|
|
Karsten Hopp |
0815f7 |
|gk| gk 1 like "k", but when 'wrap' on go N screen
|
|
Karsten Hopp |
0815f7 |
lines up
|
|
Karsten Hopp |
0815f7 |
+ |gn| gn 1,2 find the next match with the last used
|
|
Karsten Hopp |
0815f7 |
+ search pattern and Visually select it
|
|
Karsten Hopp |
0815f7 |
|gm| gm 1 go to character at middle of the screenline
|
|
Karsten Hopp |
0815f7 |
|go| go 1 cursor to byte N in the buffer
|
|
Karsten Hopp |
0815f7 |
|gp| ["x]gp 2 put the text [from register x] after the
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/runtime/doc/visual.txt 2010-08-15 21:57:16.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- runtime/doc/visual.txt 2012-07-25 14:42:22.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 94,99 ****
|
|
Karsten Hopp |
0815f7 |
--- 99,116 ----
|
|
Karsten Hopp |
0815f7 |
After using "p" or "P" in Visual mode the text that
|
|
Karsten Hopp |
0815f7 |
was put will be selected.
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
+ *gn* *v_gn*
|
|
Karsten Hopp |
0815f7 |
+ gn Search forward for the last used search pattern, like
|
|
Karsten Hopp |
0815f7 |
+ with `n`, and start Visual mode to select the match.
|
|
Karsten Hopp |
0815f7 |
+ If the cursor is on the match, visually selects it.
|
|
Karsten Hopp |
0815f7 |
+ If an operator is pending, operates on the match.
|
|
Karsten Hopp |
0815f7 |
+ E.g., "dgn" deletes the text of the next match.
|
|
Karsten Hopp |
0815f7 |
+ If Visual mode is active, extends the selection
|
|
Karsten Hopp |
0815f7 |
+ until the end of the next match.
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ *gN* *v_gN*
|
|
Karsten Hopp |
0815f7 |
+ gN Like |gn| but searches backward, like with `N`.
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
*<LeftMouse>*
|
|
Karsten Hopp |
0815f7 |
<LeftMouse> Set the current cursor position. If Visual mode is
|
|
Karsten Hopp |
0815f7 |
active it is stopped. Only when 'mouse' option is
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/normal.c 2012-07-10 16:49:08.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/normal.c 2012-07-25 14:31:40.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 1780,1789 ****
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
/* Prepare for redoing. Only use the nchar field for "r",
|
|
Karsten Hopp |
0815f7 |
* otherwise it might be the second char of the operator. */
|
|
Karsten Hopp |
0815f7 |
! prep_redo(oap->regname, 0L, NUL, 'v',
|
|
Karsten Hopp |
0815f7 |
! get_op_char(oap->op_type),
|
|
Karsten Hopp |
0815f7 |
! get_extra_op_char(oap->op_type),
|
|
Karsten Hopp |
0815f7 |
! oap->op_type == OP_REPLACE ? cap->nchar : NUL);
|
|
Karsten Hopp |
0815f7 |
if (!redo_VIsual_busy)
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
redo_VIsual_mode = resel_VIsual_mode;
|
|
Karsten Hopp |
0815f7 |
--- 1780,1797 ----
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
/* Prepare for redoing. Only use the nchar field for "r",
|
|
Karsten Hopp |
0815f7 |
* otherwise it might be the second char of the operator. */
|
|
Karsten Hopp |
0815f7 |
! if (cap->cmdchar == 'g' && (cap->nchar == 'n'
|
|
Karsten Hopp |
0815f7 |
! || cap->nchar == 'N'))
|
|
Karsten Hopp |
0815f7 |
! /* "gn" and "gN" are a bit different */
|
|
Karsten Hopp |
0815f7 |
! prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
|
|
Karsten Hopp |
0815f7 |
! get_op_char(oap->op_type),
|
|
Karsten Hopp |
0815f7 |
! get_extra_op_char(oap->op_type));
|
|
Karsten Hopp |
0815f7 |
! else
|
|
Karsten Hopp |
0815f7 |
! prep_redo(oap->regname, 0L, NUL, 'v',
|
|
Karsten Hopp |
0815f7 |
! get_op_char(oap->op_type),
|
|
Karsten Hopp |
0815f7 |
! get_extra_op_char(oap->op_type),
|
|
Karsten Hopp |
0815f7 |
! oap->op_type == OP_REPLACE
|
|
Karsten Hopp |
0815f7 |
! ? cap->nchar : NUL);
|
|
Karsten Hopp |
0815f7 |
if (!redo_VIsual_busy)
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
redo_VIsual_mode = resel_VIsual_mode;
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 7987,7992 ****
|
|
Karsten Hopp |
0815f7 |
--- 7995,8011 ----
|
|
Karsten Hopp |
0815f7 |
cap->arg = TRUE;
|
|
Karsten Hopp |
0815f7 |
nv_visual(cap);
|
|
Karsten Hopp |
0815f7 |
break;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* "gn", "gN" visually select next/previous search match
|
|
Karsten Hopp |
0815f7 |
+ * "gn" selects next match
|
|
Karsten Hopp |
0815f7 |
+ * "gN" selects previous match
|
|
Karsten Hopp |
0815f7 |
+ */
|
|
Karsten Hopp |
0815f7 |
+ case 'N':
|
|
Karsten Hopp |
0815f7 |
+ case 'n':
|
|
Karsten Hopp |
0815f7 |
+ if (!current_search(cap->count1, cap->nchar == 'n'))
|
|
Karsten Hopp |
0815f7 |
+ beep_flush();
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ break;
|
|
Karsten Hopp |
0815f7 |
#endif /* FEAT_VISUAL */
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/proto/search.pro 2010-08-15 21:57:28.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/proto/search.pro 2012-07-25 14:24:01.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 27,32 ****
|
|
Karsten Hopp |
0815f7 |
--- 27,33 ----
|
|
Karsten Hopp |
0815f7 |
int end_word __ARGS((long count, int bigword, int stop, int empty));
|
|
Karsten Hopp |
0815f7 |
int bckend_word __ARGS((long count, int bigword, int eol));
|
|
Karsten Hopp |
0815f7 |
int current_word __ARGS((oparg_T *oap, long count, int include, int bigword));
|
|
Karsten Hopp |
0815f7 |
+ int current_search __ARGS((long count, int forward));
|
|
Karsten Hopp |
0815f7 |
int current_sent __ARGS((oparg_T *oap, long count, int include));
|
|
Karsten Hopp |
0815f7 |
int current_block __ARGS((oparg_T *oap, long count, int include, int what, int other));
|
|
Karsten Hopp |
0815f7 |
int current_tagblock __ARGS((oparg_T *oap, long count_arg, int include));
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/search.c 2012-07-25 13:46:25.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/search.c 2012-07-25 14:54:28.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 3397,3402 ****
|
|
Karsten Hopp |
0815f7 |
--- 3397,3547 ----
|
|
Karsten Hopp |
0815f7 |
return OK;
|
|
Karsten Hopp |
0815f7 |
}
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
+ #if defined(FEAT_VISUAL) || defined(PROTO)
|
|
Karsten Hopp |
0815f7 |
+ /*
|
|
Karsten Hopp |
0815f7 |
+ * Find next search match under cursor, cursor at end.
|
|
Karsten Hopp |
0815f7 |
+ * Used while an operator is pending, and in Visual mode.
|
|
Karsten Hopp |
0815f7 |
+ * TODO: redo only works when used in operator pending mode
|
|
Karsten Hopp |
0815f7 |
+ */
|
|
Karsten Hopp |
0815f7 |
+ int
|
|
Karsten Hopp |
0815f7 |
+ current_search(count, forward)
|
|
Karsten Hopp |
0815f7 |
+ long count;
|
|
Karsten Hopp |
0815f7 |
+ int forward; /* move forward or backwards */
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ pos_T start_pos; /* position before the pattern */
|
|
Karsten Hopp |
0815f7 |
+ pos_T orig_pos; /* position of the cursor at beginning */
|
|
Karsten Hopp |
0815f7 |
+ pos_T pos; /* position after the pattern */
|
|
Karsten Hopp |
0815f7 |
+ int i;
|
|
Karsten Hopp |
0815f7 |
+ int dir;
|
|
Karsten Hopp |
0815f7 |
+ int result; /* result of various function calls */
|
|
Karsten Hopp |
0815f7 |
+ char_u old_p_ws = p_ws;
|
|
Karsten Hopp |
0815f7 |
+ int visual_active = FALSE;
|
|
Karsten Hopp |
0815f7 |
+ int flags = 0;
|
|
Karsten Hopp |
0815f7 |
+ pos_T save_VIsual;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* wrapping should not occur */
|
|
Karsten Hopp |
0815f7 |
+ p_ws = FALSE;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* Correct cursor when 'selection' is exclusive */
|
|
Karsten Hopp |
0815f7 |
+ if (VIsual_active && *p_sel == 'e' && lt(VIsual, curwin->w_cursor))
|
|
Karsten Hopp |
0815f7 |
+ dec_cursor();
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ orig_pos = curwin->w_cursor;
|
|
Karsten Hopp |
0815f7 |
+ save_VIsual = VIsual;
|
|
Karsten Hopp |
0815f7 |
+ visual_active = TRUE;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* just started visual selection, only one character */
|
|
Karsten Hopp |
0815f7 |
+ if (equalpos(VIsual, curwin->w_cursor))
|
|
Karsten Hopp |
0815f7 |
+ visual_active = FALSE;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ pos = curwin->w_cursor;
|
|
Karsten Hopp |
0815f7 |
+ start_pos = VIsual;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* make sure, searching further will extend the match */
|
|
Karsten Hopp |
0815f7 |
+ if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ if (forward)
|
|
Karsten Hopp |
0815f7 |
+ incl(&pos;;
|
|
Karsten Hopp |
0815f7 |
+ else
|
|
Karsten Hopp |
0815f7 |
+ decl(&pos;;
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ else
|
|
Karsten Hopp |
0815f7 |
+ orig_pos = pos = start_pos = curwin->w_cursor;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /*
|
|
Karsten Hopp |
0815f7 |
+ * The trick is to first search backwards and then search forward again,
|
|
Karsten Hopp |
0815f7 |
+ * so that a match at the current cursor position will be correctly
|
|
Karsten Hopp |
0815f7 |
+ * captured.
|
|
Karsten Hopp |
0815f7 |
+ */
|
|
Karsten Hopp |
0815f7 |
+ for (i = 0; i < 2; i++)
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ if (i && count == 1)
|
|
Karsten Hopp |
0815f7 |
+ flags = SEARCH_START;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ if (forward)
|
|
Karsten Hopp |
0815f7 |
+ dir = i;
|
|
Karsten Hopp |
0815f7 |
+ else
|
|
Karsten Hopp |
0815f7 |
+ dir = !i;
|
|
Karsten Hopp |
0815f7 |
+ result = searchit(curwin, curbuf, &pos, (dir ? FORWARD : BACKWARD),
|
|
Karsten Hopp |
0815f7 |
+ spats[last_idx].pat, (long) (i ? count : 1),
|
|
Karsten Hopp |
0815f7 |
+ SEARCH_KEEP | flags | (dir ? 0 : SEARCH_END),
|
|
Karsten Hopp |
0815f7 |
+ RE_SEARCH, 0, NULL);
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* First search may fail, but then start searching from the
|
|
Karsten Hopp |
0815f7 |
+ * beginning of the file (cursor might be on the search match)
|
|
Karsten Hopp |
0815f7 |
+ * except when Visual mode is active, so that extending the visual
|
|
Karsten Hopp |
0815f7 |
+ * selection works. */
|
|
Karsten Hopp |
0815f7 |
+ if (!result && i) /* not found, abort */
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ curwin->w_cursor = orig_pos;
|
|
Karsten Hopp |
0815f7 |
+ if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
+ VIsual = save_VIsual;
|
|
Karsten Hopp |
0815f7 |
+ p_ws = old_p_ws;
|
|
Karsten Hopp |
0815f7 |
+ return FAIL;
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ else if (!i && !result && !visual_active)
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ if (forward) /* try again from start of buffer */
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ clearpos(&pos;;
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ else /* try again from end of buffer */
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ /* searching backwards, so set pos to last line and col */
|
|
Karsten Hopp |
0815f7 |
+ pos.lnum = curwin->w_buffer->b_ml.ml_line_count;
|
|
Karsten Hopp |
0815f7 |
+ pos.col = STRLEN(ml_get(curwin->w_buffer->b_ml.ml_line_count));
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ start_pos = pos;
|
|
Karsten Hopp |
0815f7 |
+ flags = (forward ? SEARCH_END : 0);
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ /* move to match */
|
|
Karsten Hopp |
0815f7 |
+ result = searchit(curwin, curbuf, &pos, (forward ? FORWARD : BACKWARD),
|
|
Karsten Hopp |
0815f7 |
+ spats[last_idx].pat, 0L, flags | SEARCH_KEEP, RE_SEARCH, 0, NULL);
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ if (!VIsual_active)
|
|
Karsten Hopp |
0815f7 |
+ VIsual = start_pos;
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ p_ws = old_p_ws;
|
|
Karsten Hopp |
0815f7 |
+ curwin->w_cursor = pos;
|
|
Karsten Hopp |
0815f7 |
+ VIsual_active = TRUE;
|
|
Karsten Hopp |
0815f7 |
+ VIsual_mode = 'v';
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
+ {
|
|
Karsten Hopp |
0815f7 |
+ redraw_curbuf_later(INVERTED); /* update the inversion */
|
|
Karsten Hopp |
0815f7 |
+ if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
|
|
Karsten Hopp |
0815f7 |
+ inc_cursor();
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ #ifdef FEAT_FOLDING
|
|
Karsten Hopp |
0815f7 |
+ if (fdo_flags & FDO_SEARCH && KeyTyped)
|
|
Karsten Hopp |
0815f7 |
+ foldOpenCursor();
|
|
Karsten Hopp |
0815f7 |
+ #endif
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ may_start_select('c');
|
|
Karsten Hopp |
0815f7 |
+ #ifdef FEAT_MOUSE
|
|
Karsten Hopp |
0815f7 |
+ setmouse();
|
|
Karsten Hopp |
0815f7 |
+ #endif
|
|
Karsten Hopp |
0815f7 |
+ #ifdef FEAT_CLIPBOARD
|
|
Karsten Hopp |
0815f7 |
+ /* Make sure the clipboard gets updated. Needed because start and
|
|
Karsten Hopp |
0815f7 |
+ * end are still the same, and the selection needs to be owned */
|
|
Karsten Hopp |
0815f7 |
+ clip_star.vmode = NUL;
|
|
Karsten Hopp |
0815f7 |
+ #endif
|
|
Karsten Hopp |
0815f7 |
+ redraw_curbuf_later(INVERTED);
|
|
Karsten Hopp |
0815f7 |
+ showmode();
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
+ return OK;
|
|
Karsten Hopp |
0815f7 |
+ }
|
|
Karsten Hopp |
0815f7 |
+ #endif /* FEAT_VISUAL */
|
|
Karsten Hopp |
0815f7 |
+
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
* Find sentence(s) under the cursor, cursor at end.
|
|
Karsten Hopp |
0815f7 |
* When Visual active, extend it by one or more sentences.
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 3420,3426 ****
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
#ifdef FEAT_VISUAL
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
! * When visual area is bigger than one character: Extend it.
|
|
Karsten Hopp |
0815f7 |
*/
|
|
Karsten Hopp |
0815f7 |
if (VIsual_active && !equalpos(start_pos, VIsual))
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
--- 3565,3571 ----
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
#ifdef FEAT_VISUAL
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
! * When the Visual area is bigger than one character: Extend it.
|
|
Karsten Hopp |
0815f7 |
*/
|
|
Karsten Hopp |
0815f7 |
if (VIsual_active && !equalpos(start_pos, VIsual))
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 3508,3515 ****
|
|
Karsten Hopp |
0815f7 |
#endif
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
! * If cursor started on blank, check if it is just before the start of the
|
|
Karsten Hopp |
0815f7 |
! * next sentence.
|
|
Karsten Hopp |
0815f7 |
*/
|
|
Karsten Hopp |
0815f7 |
while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */
|
|
Karsten Hopp |
0815f7 |
incl(&pos;;
|
|
Karsten Hopp |
0815f7 |
--- 3653,3660 ----
|
|
Karsten Hopp |
0815f7 |
#endif
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
/*
|
|
Karsten Hopp |
0815f7 |
! * If the cursor started on a blank, check if it is just before the start
|
|
Karsten Hopp |
0815f7 |
! * of the next sentence.
|
|
Karsten Hopp |
0815f7 |
*/
|
|
Karsten Hopp |
0815f7 |
while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */
|
|
Karsten Hopp |
0815f7 |
incl(&pos;;
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 3558,3564 ****
|
|
Karsten Hopp |
0815f7 |
#ifdef FEAT_VISUAL
|
|
Karsten Hopp |
0815f7 |
if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
! /* avoid getting stuck with "is" on a single space before a sent. */
|
|
Karsten Hopp |
0815f7 |
if (equalpos(start_pos, curwin->w_cursor))
|
|
Karsten Hopp |
0815f7 |
goto extend;
|
|
Karsten Hopp |
0815f7 |
if (*p_sel == 'e')
|
|
Karsten Hopp |
0815f7 |
--- 3703,3709 ----
|
|
Karsten Hopp |
0815f7 |
#ifdef FEAT_VISUAL
|
|
Karsten Hopp |
0815f7 |
if (VIsual_active)
|
|
Karsten Hopp |
0815f7 |
{
|
|
Karsten Hopp |
0815f7 |
! /* Avoid getting stuck with "is" on a single space before a sentence. */
|
|
Karsten Hopp |
0815f7 |
if (equalpos(start_pos, curwin->w_cursor))
|
|
Karsten Hopp |
0815f7 |
goto extend;
|
|
Karsten Hopp |
0815f7 |
if (*p_sel == 'e')
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/testdir/test53.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/testdir/test53.in 2012-07-25 15:01:34.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 28,33 ****
|
|
Karsten Hopp |
0815f7 |
--- 28,40 ----
|
|
Karsten Hopp |
0815f7 |
:put =matchstr(\"abcd\", \".\", 0, -1) " a
|
|
Karsten Hopp |
0815f7 |
:put =match(\"abcd\", \".\", 0, 5) " -1
|
|
Karsten Hopp |
0815f7 |
:put =match(\"abcd\", \".\", 0, -1) " 0
|
|
Karsten Hopp |
0815f7 |
+ /^foobar
|
|
Karsten Hopp |
0815f7 |
+ gncsearchmatch?/one\_s*two\_s
|
|
Karsten Hopp |
0815f7 |
+ :1
|
|
Karsten Hopp |
0815f7 |
+ gnd
|
|
Karsten Hopp |
0815f7 |
+ /[a]bcdx
|
|
Karsten Hopp |
0815f7 |
+ :1
|
|
Karsten Hopp |
0815f7 |
+ 2gnd
|
|
Karsten Hopp |
0815f7 |
:/^start:/,/^end:/wq! test.out
|
|
Karsten Hopp |
0815f7 |
ENDTEST
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 45,48 ****
|
|
Karsten Hopp |
0815f7 |
--- 52,60 ----
|
|
Karsten Hopp |
0815f7 |
-asdfXasdfasdf-
|
|
Karsten Hopp |
0815f7 |
-asdXasdfasdf-
|
|
Karsten Hopp |
0815f7 |
</begin>
|
|
Karsten Hopp |
0815f7 |
+ SEARCH:
|
|
Karsten Hopp |
0815f7 |
+ foobar
|
|
Karsten Hopp |
0815f7 |
+ one
|
|
Karsten Hopp |
0815f7 |
+ two
|
|
Karsten Hopp |
0815f7 |
+ abcdx | abcdx | abcdx
|
|
Karsten Hopp |
0815f7 |
end:
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/testdir/test53.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/testdir/test53.ok 2012-07-25 14:24:01.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 18,21 ****
|
|
Karsten Hopp |
0815f7 |
--- 18,24 ----
|
|
Karsten Hopp |
0815f7 |
a
|
|
Karsten Hopp |
0815f7 |
-1
|
|
Karsten Hopp |
0815f7 |
0
|
|
Karsten Hopp |
0815f7 |
+ SEARCH:
|
|
Karsten Hopp |
0815f7 |
+ searchmatch
|
|
Karsten Hopp |
0815f7 |
+ abcdx | | abcdx
|
|
Karsten Hopp |
0815f7 |
end:
|
|
Karsten Hopp |
0815f7 |
*** ../vim-7.3.609/src/version.c 2012-07-25 13:46:25.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
--- src/version.c 2012-07-25 15:03:43.000000000 +0200
|
|
Karsten Hopp |
0815f7 |
***************
|
|
Karsten Hopp |
0815f7 |
*** 716,717 ****
|
|
Karsten Hopp |
0815f7 |
--- 716,719 ----
|
|
Karsten Hopp |
0815f7 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
0815f7 |
+ /**/
|
|
Karsten Hopp |
0815f7 |
+ 610,
|
|
Karsten Hopp |
0815f7 |
/**/
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
--
|
|
Karsten Hopp |
0815f7 |
Did you ever see a "Hit any key to continue" message in a music piece?
|
|
Karsten Hopp |
0815f7 |
|
|
Karsten Hopp |
0815f7 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
0815f7 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
0815f7 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
0815f7 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|