]> granicus.if.org Git - vim/commitdiff
updated for version 7.0071
authorBram Moolenaar <Bram@vim.org>
Sun, 24 Apr 2005 22:08:39 +0000 (22:08 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 24 Apr 2005 22:08:39 +0000 (22:08 +0000)
runtime/doc/todo.txt
runtime/doc/version7.txt
src/misc1.c

index 7052cdf6dff09acc1d396f07c82875ea95a8dcf3..9645fe5b5cef2c9aafad0125b3c2d16283e68077 100644 (file)
@@ -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 @@ be worked on, but only if you sponsor Vim development.  See |sponsor|.
                                                        *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.
 
index e60b54496f02e6760a59b2b3dd8cfc98710ed21f..4de0375fd868f716dbd1e5ade5cfeef2f89c4a09 100644 (file)
@@ -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 @@ reallocating the buffer every time. (Alexei Alexandrov)
 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:
index 50017c49893ac73a963f00560e11efafd097b181..6603c26d96b5597a90161ba1d87174354e65696a 100644 (file)
@@ -2464,7 +2464,8 @@ changed()
     ++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 @@ changed_bytes(lnum, col)
     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 @@ changed_lines(lnum, col, lnume, xtra)
     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