4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen)
12 Solution: Fix computations in getvcol(). (partly by Lech Lorens)
13 Files: src/charset.c, src/memline.c
16 *** ../vim-7.2.390/src/charset.c 2009-11-03 16:03:59.000000000 +0100
17 --- src/charset.c 2010-03-10 14:38:14.000000000 +0100
22 ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
23 ! posptr = ptr + pos->col;
26 * This function is used very often, do some speed optimizations.
30 ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
31 ! if (pos->col == MAXCOL)
32 ! posptr = NULL; /* continue until the NUL */
34 ! posptr = ptr + pos->col;
37 * This function is used very often, do some speed optimizations.
43 ! if (ptr >= posptr) /* character at pos->col */
51 ! if (posptr != NULL && ptr >= posptr) /* character at pos->col */
60 ! if (ptr >= posptr) /* character at pos->col */
68 ! if (posptr != NULL && ptr >= posptr) /* character at pos->col */
72 *** ../vim-7.2.390/src/memline.c 2010-02-11 18:54:38.000000000 +0100
73 --- src/memline.c 2010-03-10 14:38:25.000000000 +0100
76 if (buf->b_ml.ml_mfp == NULL) /* there are no lines */
80 ! * See if it is the same line as requested last time.
81 ! * Otherwise may need to flush last used line.
82 ! * Don't use the last used line when 'swapfile' is reset, need to load all
85 if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
89 if (buf->b_ml.ml_mfp == NULL) /* there are no lines */
93 ! * See if it is the same line as requested last time.
94 ! * Otherwise may need to flush last used line.
95 ! * Don't use the last used line when 'swapfile' is reset, need to load all
98 if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
101 *** ../vim-7.2.390/src/version.c 2010-03-10 14:15:28.000000000 +0100
102 --- src/version.c 2010-03-10 14:31:02.000000000 +0100
106 { /* Add new patch number below this line */
112 WOMAN: King of the who?
114 WOMAN: Who are the Britons?
115 ARTHUR: Well, we all are. we're all Britons and I am your king.
116 The Quest for the Holy Grail (Monty Python)
118 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
119 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
120 \\\ download, build and distribute -- http://www.A-A-P.org ///
121 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///