updated for version 7.0071
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 7052cdf..9645fe5 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Apr 23
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Apr 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,21 +30,6 @@
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Frame size wrong after ":sp" with this in vimrc (Michael Schaap):
- set cmdheight=2
- set lines=43
-
-Trick to get ...MOUSE_NM not used when there are vertical splits. Can we pass
--col instead of col? (Yegappan Lakshmanan)
-
-Hang in searchpair(). (2005 April 12, John Wellesz)
-
-With this mapping a click on a status line echoes the wrong buffer name:
- :noremap <Leftmouse> <Leftmouse>:echo bufname('%')<CR>
-
-When in diff mode and making a change that causes the "changed" highlighting
-to disappear, it's still highlighted in another window.
-
This doesn't work: "a[var1:var2]". Requires space before/after ':'. Can this
be fixed? Otherwise document it.
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index e60b544..4de0375 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Apr 17
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Apr 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1045,4 +1045,18 @@
When using a Python "atexit" function it was not invoked when Vim exits. Now
call Py_Finalize() for that. (Ugo Di Girolamo)
+GTK GUI: using a .vimrc with "set cmdheight=2 lines=43" and ":split" right
+after startup, the window layout is messed up. (Michael Schaap) Added
+win_new_shellsize() call in gui_init() to fix the topframe size.
+
+Trick to get ...MOUSE_NM not used when there are vertical splits. Now pass
+column -1 for the left most window and add MOUSE_COLOFF for others. Limits
+mouse column to 10000.
+
+searchpair() may hang when the end pattern has "\zs" at the end. Check that
+we find the same position again and advance one character.
+
+When in diff mode and making a change that causes the "changed" highlighting
+to disappear or reappear, it was still highlighted in another window.
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/src/misc1.c b/src/misc1.c
index 50017c4..6603c26 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2464,7 +2464,8 @@
++global_changedtick;
}
-static void changedOneline __ARGS((linenr_T lnum));
+static void changedOneline __ARGS((buf_T *buf, linenr_T lnum));
+static void changed_lines_buf __ARGS((buf_T *buf, linenr_T lnum, linenr_T lnume, long xtra));
static void changed_common __ARGS((linenr_T lnum, colnr_T col, linenr_T lnume, long xtra));
/*
@@ -2478,29 +2479,48 @@
linenr_T lnum;
colnr_T col;
{
- changedOneline(lnum);
+ changedOneline(curbuf, lnum);
changed_common(lnum, col, lnum + 1, 0L);
+
+#ifdef FEAT_DIFF
+ /* Diff highlighting in other diff windows may need to be updated too. */
+ if (curwin->w_p_diff)
+ {
+ win_T *wp;
+ linenr_T wlnum;
+
+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_p_diff && wp != curwin)
+ {
+ redraw_win_later(wp, VALID);
+ wlnum = diff_lnum_win(lnum, wp);
+ if (wlnum > 0)
+ changedOneline(wp->w_buffer, wlnum);
+ }
+ }
+#endif
}
static void
-changedOneline(lnum)
+changedOneline(buf, lnum)
+ buf_T *buf;
linenr_T lnum;
{
- if (curbuf->b_mod_set)
+ if (buf->b_mod_set)
{
/* find the maximum area that must be redisplayed */
- if (lnum < curbuf->b_mod_top)
- curbuf->b_mod_top = lnum;
- else if (lnum >= curbuf->b_mod_bot)
- curbuf->b_mod_bot = lnum + 1;
+ if (lnum < buf->b_mod_top)
+ buf->b_mod_top = lnum;
+ else if (lnum >= buf->b_mod_bot)
+ buf->b_mod_bot = lnum + 1;
}
else
{
/* set the area that must be redisplayed to one line */
- curbuf->b_mod_set = TRUE;
- curbuf->b_mod_top = lnum;
- curbuf->b_mod_bot = lnum + 1;
- curbuf->b_mod_xlines = 0;
+ buf->b_mod_set = TRUE;
+ buf->b_mod_top = lnum;
+ buf->b_mod_bot = lnum + 1;
+ buf->b_mod_xlines = 0;
}
}
@@ -2572,32 +2592,63 @@
linenr_T lnume; /* line below last changed line */
long xtra; /* number of extra lines (negative when deleting) */
{
- if (curbuf->b_mod_set)
+ changed_lines_buf(curbuf, lnum, lnume, xtra);
+
+#ifdef FEAT_DIFF
+ if (xtra == 0 && curwin->w_p_diff)
+ {
+ /* When the number of lines doesn't change then mark_adjust() isn't
+ * called and other diff buffers still need to be marked for
+ * displaying. */
+ win_T *wp;
+ linenr_T wlnum;
+
+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ if (wp->w_p_diff && wp != curwin)
+ {
+ redraw_win_later(wp, VALID);
+ wlnum = diff_lnum_win(lnum, wp);
+ if (wlnum > 0)
+ changed_lines_buf(wp->w_buffer, wlnum,
+ lnume - lnum + wlnum, 0L);
+ }
+ }
+#endif
+
+ changed_common(lnum, col, lnume, xtra);
+}
+
+ static void
+changed_lines_buf(buf, lnum, lnume, xtra)
+ buf_T *buf;
+ linenr_T lnum; /* first line with change */
+ linenr_T lnume; /* line below last changed line */
+ long xtra; /* number of extra lines (negative when deleting) */
+{
+ if (buf->b_mod_set)
{
/* find the maximum area that must be redisplayed */
- if (lnum < curbuf->b_mod_top)
- curbuf->b_mod_top = lnum;
- if (lnum < curbuf->b_mod_bot)
+ if (lnum < buf->b_mod_top)
+ buf->b_mod_top = lnum;
+ if (lnum < buf->b_mod_bot)
{
/* adjust old bot position for xtra lines */
- curbuf->b_mod_bot += xtra;
- if (curbuf->b_mod_bot < lnum)
- curbuf->b_mod_bot = lnum;
+ buf->b_mod_bot += xtra;
+ if (buf->b_mod_bot < lnum)
+ buf->b_mod_bot = lnum;
}
- if (lnume + xtra > curbuf->b_mod_bot)
- curbuf->b_mod_bot = lnume + xtra;
- curbuf->b_mod_xlines += xtra;
+ if (lnume + xtra > buf->b_mod_bot)
+ buf->b_mod_bot = lnume + xtra;
+ buf->b_mod_xlines += xtra;
}
else
{
/* set the area that must be redisplayed */
- curbuf->b_mod_set = TRUE;
- curbuf->b_mod_top = lnum;
- curbuf->b_mod_bot = lnume + xtra;
- curbuf->b_mod_xlines = xtra;
+ buf->b_mod_set = TRUE;
+ buf->b_mod_top = lnum;
+ buf->b_mod_bot = lnume + xtra;
+ buf->b_mod_xlines = xtra;
}
-
- changed_common(lnum, col, lnume, xtra);
}
static void