|
Karsten Hopp |
5a04c1 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
5a04c1 |
Subject: patch 7.0.194
|
|
Karsten Hopp |
5a04c1 |
Fcc: outbox
|
|
Karsten Hopp |
5a04c1 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
5a04c1 |
Mime-Version: 1.0
|
|
Karsten Hopp |
5a04c1 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
5a04c1 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
5a04c1 |
------------
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
Patch 7.0.194
|
|
Karsten Hopp |
5a04c1 |
Problem: Once an ml_get error is given redrawing part of the screen may
|
|
Karsten Hopp |
5a04c1 |
cause it again, resulting in an endless loop.
|
|
Karsten Hopp |
5a04c1 |
Solution: Don't give the error message for a recursive call.
|
|
Karsten Hopp |
5a04c1 |
Files: src/memline.c
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
*** ../vim-7.0.193/src/memline.c Wed Feb 7 03:42:37 2007
|
|
Karsten Hopp |
5a04c1 |
--- src/memline.c Tue Feb 13 03:56:00 2007
|
|
Karsten Hopp |
5a04c1 |
***************
|
|
Karsten Hopp |
5a04c1 |
*** 2054,2066 ****
|
|
Karsten Hopp |
5a04c1 |
linenr_T lnum;
|
|
Karsten Hopp |
5a04c1 |
int will_change; /* line will be changed */
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! bhdr_T *hp;
|
|
Karsten Hopp |
5a04c1 |
! DATA_BL *dp;
|
|
Karsten Hopp |
5a04c1 |
! char_u *ptr;
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
if (lnum > buf->b_ml.ml_line_count) /* invalid line number */
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
|
Karsten Hopp |
5a04c1 |
errorret:
|
|
Karsten Hopp |
5a04c1 |
STRCPY(IObuff, "???");
|
|
Karsten Hopp |
5a04c1 |
return IObuff;
|
|
Karsten Hopp |
5a04c1 |
--- 2054,2074 ----
|
|
Karsten Hopp |
5a04c1 |
linenr_T lnum;
|
|
Karsten Hopp |
5a04c1 |
int will_change; /* line will be changed */
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! bhdr_T *hp;
|
|
Karsten Hopp |
5a04c1 |
! DATA_BL *dp;
|
|
Karsten Hopp |
5a04c1 |
! char_u *ptr;
|
|
Karsten Hopp |
5a04c1 |
! static int recursive = 0;
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
if (lnum > buf->b_ml.ml_line_count) /* invalid line number */
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! if (recursive == 0)
|
|
Karsten Hopp |
5a04c1 |
! {
|
|
Karsten Hopp |
5a04c1 |
! /* Avoid giving this message for a recursive call, may happen when
|
|
Karsten Hopp |
5a04c1 |
! * the GUI redraws part of the text. */
|
|
Karsten Hopp |
5a04c1 |
! ++recursive;
|
|
Karsten Hopp |
5a04c1 |
! EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
|
Karsten Hopp |
5a04c1 |
! --recursive;
|
|
Karsten Hopp |
5a04c1 |
! }
|
|
Karsten Hopp |
5a04c1 |
errorret:
|
|
Karsten Hopp |
5a04c1 |
STRCPY(IObuff, "???");
|
|
Karsten Hopp |
5a04c1 |
return IObuff;
|
|
Karsten Hopp |
5a04c1 |
***************
|
|
Karsten Hopp |
5a04c1 |
*** 2088,2094 ****
|
|
Karsten Hopp |
5a04c1 |
*/
|
|
Karsten Hopp |
5a04c1 |
if ((hp = ml_find_line(buf, lnum, ML_FIND)) == NULL)
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
|
Karsten Hopp |
5a04c1 |
goto errorret;
|
|
Karsten Hopp |
5a04c1 |
}
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
--- 2096,2109 ----
|
|
Karsten Hopp |
5a04c1 |
*/
|
|
Karsten Hopp |
5a04c1 |
if ((hp = ml_find_line(buf, lnum, ML_FIND)) == NULL)
|
|
Karsten Hopp |
5a04c1 |
{
|
|
Karsten Hopp |
5a04c1 |
! if (recursive == 0)
|
|
Karsten Hopp |
5a04c1 |
! {
|
|
Karsten Hopp |
5a04c1 |
! /* Avoid giving this message for a recursive call, may happen
|
|
Karsten Hopp |
5a04c1 |
! * when the GUI redraws part of the text. */
|
|
Karsten Hopp |
5a04c1 |
! ++recursive;
|
|
Karsten Hopp |
5a04c1 |
! EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
|
Karsten Hopp |
5a04c1 |
! --recursive;
|
|
Karsten Hopp |
5a04c1 |
! }
|
|
Karsten Hopp |
5a04c1 |
goto errorret;
|
|
Karsten Hopp |
5a04c1 |
}
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
*** ../vim-7.0.193/src/version.c Tue Feb 13 03:49:01 2007
|
|
Karsten Hopp |
5a04c1 |
--- src/version.c Tue Feb 13 03:59:22 2007
|
|
Karsten Hopp |
5a04c1 |
***************
|
|
Karsten Hopp |
5a04c1 |
*** 668,669 ****
|
|
Karsten Hopp |
5a04c1 |
--- 668,671 ----
|
|
Karsten Hopp |
5a04c1 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
5a04c1 |
+ /**/
|
|
Karsten Hopp |
5a04c1 |
+ 194,
|
|
Karsten Hopp |
5a04c1 |
/**/
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
--
|
|
Karsten Hopp |
5a04c1 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
5a04c1 |
114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".
|
|
Karsten Hopp |
5a04c1 |
|
|
Karsten Hopp |
5a04c1 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
5a04c1 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
5a04c1 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
5a04c1 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|