]>
Commit | Line | Data |
---|---|---|
a6f905ff AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.3.064 | |
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.3.064 | |
11 | Problem: line2byte(line("$") + 1) sometimes returns the wrong number. | |
12 | (Charles Campbell) | |
13 | Solution: Flush the cached line before counting the bytes. | |
14 | Files: src/memline.c | |
15 | ||
16 | ||
17 | *** ../vim-6.3.041/src/memline.c Wed Jun 9 14:56:26 2004 | |
18 | --- src/memline.c Thu Feb 17 11:02:53 2005 | |
19 | *************** | |
20 | *** 4247,4252 **** | |
21 | --- 4247,4255 ---- | |
22 | int ffdos = (get_fileformat(buf) == EOL_DOS); | |
23 | int extra = 0; | |
24 | ||
25 | + /* take care of cached line first */ | |
26 | + ml_flush_line(curbuf); | |
27 | + | |
28 | if (buf->b_ml.ml_usedchunks == -1 | |
29 | || buf->b_ml.ml_chunksize == NULL | |
30 | || line < 0) | |
31 | *** ../vim-6.3.041/src/version.c Fri Mar 11 19:14:17 2005 | |
32 | --- src/version.c Fri Mar 11 19:15:46 2005 | |
33 | *************** | |
34 | *** 643,644 **** | |
35 | --- 643,646 ---- | |
36 | { /* Add new patch number below this line */ | |
37 | + /**/ | |
38 | + 64, | |
39 | /**/ | |
40 | ||
41 | -- | |
42 | FATHER: You killed eight wedding guests in all! | |
43 | LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady. | |
44 | FATHER: I can understand that. | |
45 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
46 | ||
47 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
48 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
49 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
50 | \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html /// |