]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.280
- removed conflict with 6.2.259
[packages/vim.git] / 6.2.280
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.280
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.280
11 Problem:    "do" and ":diffget" don't work in the first line and the last line
12             of a buffer. (Aron Griffis)
13 Solution:   Find a difference above the first line and below the last line.
14             Also fix a few display updating bugs.
15 Files:      src/diff.c, src/fold.c, src/move.c
16
17
18 *** ../vim-6.2.279/src/diff.c   Tue Feb 17 21:36:55 2004
19 --- src/diff.c  Thu Feb 19 21:35:17 2004
20 ***************
21 *** 411,416 ****
22 --- 411,420 ----
23   
24       }
25       diff_redraw(TRUE);
26
27 +     /* Recompute the scroll binding, may remove or add filler lines (e.g.,
28 +      * when adding lines above w_topline). */
29 +     check_scrollbind((linenr_T)0, 0L);
30   }
31   
32   /*
33 ***************
34 *** 538,543 ****
35 --- 542,548 ----
36       int               dofold;     /* also recompute the folds */
37   {
38       win_T     *wp;
39 +     int               n;
40   
41       for (wp = firstwin; wp != NULL; wp = wp->w_next)
42         if (wp->w_p_diff)
43 ***************
44 *** 547,552 ****
45 --- 552,565 ----
46             if (dofold && foldmethodIsDiff(wp))
47                 foldUpdateAll(wp);
48   #endif
49 +           /* A change may have made filler lines invalid, need to take care
50 +            * of that for other windows. */
51 +           if (wp != curwin && wp->w_topfill > 0)
52 +           {
53 +               n = diff_check(wp, wp->w_topline);
54 +               if (wp->w_topfill > n)
55 +                   wp->w_topfill = (n < 0 ? 0 : n);
56 +           }
57         }
58   }
59   
60 ***************
61 *** 1804,1812 ****
62   
63       diff_busy = TRUE;
64   
65 !     /* When no range given include the line above the cursor. */
66 !     if (eap->addr_count == 0 && eap->line1 > 1)
67 !       --eap->line1;
68   
69       if (eap->cmdidx == CMD_diffget)
70       {
71 --- 1817,1835 ----
72   
73       diff_busy = TRUE;
74   
75 !     /* When no range given include the line above or below the cursor. */
76 !     if (eap->addr_count == 0)
77 !     {
78 !       /* Make it possible that ":diffget" on the last line gets line below
79 !        * the cursor line when there is no difference above the cursor. */
80 !       if (eap->cmdidx == CMD_diffget
81 !               && eap->line1 == curbuf->b_ml.ml_line_count
82 !               && diff_check(curwin, eap->line1) == 0
83 !               && (eap->line1 == 1 || diff_check(curwin, eap->line1 - 1) == 0))
84 !           ++eap->line2;
85 !       else if (eap->line1 > 0)
86 !           --eap->line1;
87 !     }
88   
89       if (eap->cmdidx == CMD_diffget)
90       {
91 *** ../vim-6.2.279/src/fold.c   Tue Jan 27 17:55:24 2004
92 --- src/fold.c  Thu Feb 19 20:55:36 2004
93 ***************
94 *** 837,843 ****
95   
96   /* foldUpdateAll() {{{2 */
97   /*
98 !  * Update all lines in the current window for folding.
99    * Used when a fold setting changes or after reloading the buffer.
100    * The actual updating is postponed until fold info is used, to avoid doing
101    * every time a setting is changed or a syntax item is added.
102 --- 837,843 ----
103   
104   /* foldUpdateAll() {{{2 */
105   /*
106 !  * Update all lines in a window for folding.
107    * Used when a fold setting changes or after reloading the buffer.
108    * The actual updating is postponed until fold info is used, to avoid doing
109    * every time a setting is changed or a syntax item is added.
110 ***************
111 *** 847,853 ****
112       win_T     *win;
113   {
114       win->w_foldinvalid = TRUE;
115 !     redraw_later(NOT_VALID);
116   }
117   
118   /* foldMoveTo() {{{2 */
119 --- 847,853 ----
120       win_T     *win;
121   {
122       win->w_foldinvalid = TRUE;
123 !     redraw_win_later(win, NOT_VALID);
124   }
125   
126   /* foldMoveTo() {{{2 */
127 *** ../vim-6.2.279/src/move.c   Thu Feb 13 20:08:09 2003
128 --- src/move.c  Thu Feb 19 19:47:30 2004
129 ***************
130 *** 207,219 ****
131                 check_topline = TRUE;
132             else if (check_top_offset())
133                 check_topline = TRUE;
134   #ifdef FEAT_DIFF
135             /* Check if there are more filler lines than allowed. */
136 !           else if (curwin->w_topfill > diff_check_fill(curwin,
137                                                            curwin->w_topline))
138 !               check_topline = TRUE;
139   #endif
140 -       }
141   
142         if (check_topline)
143         {
144 --- 207,219 ----
145                 check_topline = TRUE;
146             else if (check_top_offset())
147                 check_topline = TRUE;
148 +       }
149   #ifdef FEAT_DIFF
150             /* Check if there are more filler lines than allowed. */
151 !       if (!check_topline && curwin->w_topfill > diff_check_fill(curwin,
152                                                            curwin->w_topline))
153 !           check_topline = TRUE;
154   #endif
155   
156         if (check_topline)
157         {
158 ***************
159 *** 746,752 ****
160   #ifdef FEAT_DIFF
161                 if (lnum == wp->w_topline)
162                     wp->w_cline_row += plines_win_nofill(wp, lnum++, TRUE)
163 !                       + wp->w_topfill;
164                 else
165   #endif
166                     wp->w_cline_row += plines_win(wp, lnum++, TRUE);
167 --- 746,752 ----
168   #ifdef FEAT_DIFF
169                 if (lnum == wp->w_topline)
170                     wp->w_cline_row += plines_win_nofill(wp, lnum++, TRUE)
171 !                                                             + wp->w_topfill;
172                 else
173   #endif
174                     wp->w_cline_row += plines_win(wp, lnum++, TRUE);
175 *** ../vim-6.2.279/src/version.c        Thu Feb 19 15:31:20 2004
176 --- src/version.c       Fri Feb 20 21:33:40 2004
177 ***************
178 *** 639,640 ****
179 --- 639,642 ----
180   {   /* Add new patch number below this line */
181 + /**/
182 +     280,
183   /**/
184
185 -- 
186 $ echo pizza > /dev/oven
187
188  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
189 ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
190 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
191  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.037297 seconds and 3 git commands to generate.