|
Karsten Hopp |
00e0e8 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
00e0e8 |
Subject: Patch 7.1.322
|
|
Karsten Hopp |
00e0e8 |
Fcc: outbox
|
|
Karsten Hopp |
00e0e8 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
00e0e8 |
Mime-Version: 1.0
|
|
Karsten Hopp |
00e0e8 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
00e0e8 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
00e0e8 |
------------
|
|
Karsten Hopp |
00e0e8 |
|
|
Karsten Hopp |
00e0e8 |
Patch 7.1.322
|
|
Karsten Hopp |
00e0e8 |
Problem: Can't get start of Visual area in an <expr> mapping.
|
|
Karsten Hopp |
00e0e8 |
Solution: Add the 'v' argument to getpos().
|
|
Karsten Hopp |
00e0e8 |
Files: runtime/doc/eval.txt, src/eval.c
|
|
Karsten Hopp |
00e0e8 |
|
|
Karsten Hopp |
00e0e8 |
|
|
Karsten Hopp |
00e0e8 |
*** ../vim-7.1.321/runtime/doc/eval.txt Wed May 28 16:48:00 2008
|
|
Karsten Hopp |
00e0e8 |
--- runtime/doc/eval.txt Thu Jun 19 22:46:23 2008
|
|
Karsten Hopp |
00e0e8 |
***************
|
|
Karsten Hopp |
00e0e8 |
*** 3515,3520 ****
|
|
Karsten Hopp |
00e0e8 |
--- 3635,3644 ----
|
|
Karsten Hopp |
00e0e8 |
returned)
|
|
Karsten Hopp |
00e0e8 |
w0 first line visible in current window
|
|
Karsten Hopp |
00e0e8 |
w$ last line visible in current window
|
|
Karsten Hopp |
00e0e8 |
+ v In Visual mode: the start of the Visual area (the
|
|
Karsten Hopp |
00e0e8 |
+ cursor is the end). When not in Visual mode
|
|
Karsten Hopp |
00e0e8 |
+ returns the cursor position. Differs from |'<| in
|
|
Karsten Hopp |
00e0e8 |
+ that it's updated right away.
|
|
Karsten Hopp |
00e0e8 |
Note that a mark in another file can be used. The line number
|
|
Karsten Hopp |
00e0e8 |
then applies to another buffer.
|
|
Karsten Hopp |
00e0e8 |
To get the column number use |col()|. To get both use
|
|
Karsten Hopp |
00e0e8 |
*** ../vim-7.1.321/src/eval.c Thu May 29 21:46:10 2008
|
|
Karsten Hopp |
00e0e8 |
--- src/eval.c Fri Jun 20 17:20:52 2008
|
|
Karsten Hopp |
00e0e8 |
***************
|
|
Karsten Hopp |
00e0e8 |
*** 16907,16915 ****
|
|
Karsten Hopp |
00e0e8 |
name = get_tv_string_chk(varp);
|
|
Karsten Hopp |
00e0e8 |
if (name == NULL)
|
|
Karsten Hopp |
00e0e8 |
return NULL;
|
|
Karsten Hopp |
00e0e8 |
! if (name[0] == '.') /* cursor */
|
|
Karsten Hopp |
00e0e8 |
return &curwin->w_cursor;
|
|
Karsten Hopp |
00e0e8 |
! if (name[0] == '\'') /* mark */
|
|
Karsten Hopp |
00e0e8 |
{
|
|
Karsten Hopp |
00e0e8 |
pp = getmark_fnum(name[1], FALSE, fnum);
|
|
Karsten Hopp |
00e0e8 |
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
|
|
Karsten Hopp |
00e0e8 |
--- 17478,17494 ----
|
|
Karsten Hopp |
00e0e8 |
name = get_tv_string_chk(varp);
|
|
Karsten Hopp |
00e0e8 |
if (name == NULL)
|
|
Karsten Hopp |
00e0e8 |
return NULL;
|
|
Karsten Hopp |
00e0e8 |
! if (name[0] == '.') /* cursor */
|
|
Karsten Hopp |
00e0e8 |
return &curwin->w_cursor;
|
|
Karsten Hopp |
00e0e8 |
! #ifdef FEAT_VISUAL
|
|
Karsten Hopp |
00e0e8 |
! if (name[0] == 'v' && name[1] == NUL) /* Visual start */
|
|
Karsten Hopp |
00e0e8 |
! {
|
|
Karsten Hopp |
00e0e8 |
! if (VIsual_active)
|
|
Karsten Hopp |
00e0e8 |
! return &VIsual;
|
|
Karsten Hopp |
00e0e8 |
! return &curwin->w_cursor;
|
|
Karsten Hopp |
00e0e8 |
! }
|
|
Karsten Hopp |
00e0e8 |
! #endif
|
|
Karsten Hopp |
00e0e8 |
! if (name[0] == '\'') /* mark */
|
|
Karsten Hopp |
00e0e8 |
{
|
|
Karsten Hopp |
00e0e8 |
pp = getmark_fnum(name[1], FALSE, fnum);
|
|
Karsten Hopp |
00e0e8 |
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
|
|
Karsten Hopp |
00e0e8 |
*** ../vim-7.1.321/src/version.c Fri Jun 20 16:51:54 2008
|
|
Karsten Hopp |
00e0e8 |
--- src/version.c Fri Jun 20 17:27:30 2008
|
|
Karsten Hopp |
00e0e8 |
***************
|
|
Karsten Hopp |
00e0e8 |
*** 668,669 ****
|
|
Karsten Hopp |
00e0e8 |
--- 673,676 ----
|
|
Karsten Hopp |
00e0e8 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
00e0e8 |
+ /**/
|
|
Karsten Hopp |
00e0e8 |
+ 322,
|
|
Karsten Hopp |
00e0e8 |
/**/
|
|
Karsten Hopp |
00e0e8 |
|
|
Karsten Hopp |
00e0e8 |
--
|
|
Karsten Hopp |
00e0e8 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
00e0e8 |
52. You ask a plumber how much it would cost to replace the chair in front of
|
|
Karsten Hopp |
00e0e8 |
your computer with a toilet.
|
|
Karsten Hopp |
00e0e8 |
|
|
Karsten Hopp |
00e0e8 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
00e0e8 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
00e0e8 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
00e0e8 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|