]>
Commit | Line | Data |
---|---|---|
9b1d76b7 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.0.209 | |
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 7.0.209 | |
11 | Problem: When replacing a line through Python the cursor may end up beyond | |
12 | the end of the line. | |
13 | Solution: Check the cursor column after replacing the line. | |
14 | Files: src/if_python.c | |
15 | ||
16 | ||
17 | *** ../vim-7.0.208/src/if_python.c Tue Oct 3 15:02:11 2006 | |
18 | --- src/if_python.c Tue Mar 6 23:00:53 2007 | |
19 | *************** | |
20 | *** 2410,2415 **** | |
21 | --- 2410,2417 ---- | |
22 | curwin->w_cursor.lnum = lo; | |
23 | check_cursor(); | |
24 | } | |
25 | + else | |
26 | + check_cursor_col(); | |
27 | changed_cline_bef_curs(); | |
28 | } | |
29 | invalidate_botline(); | |
30 | *************** | |
31 | *** 2486,2491 **** | |
32 | --- 2488,2497 ---- | |
33 | changed_bytes((linenr_T)n, 0); | |
34 | ||
35 | curbuf = savebuf; | |
36 | + | |
37 | + /* Check that the cursor is not beyond the end of the line now. */ | |
38 | + if (buf == curwin->w_buffer) | |
39 | + check_cursor_col(); | |
40 | ||
41 | if (PyErr_Occurred() || VimErrorCheck()) | |
42 | return FAIL; | |
43 | *** ../vim-7.0.208/src/version.c Tue Mar 6 20:27:03 2007 | |
44 | --- src/version.c Thu Mar 8 10:16:23 2007 | |
45 | *************** | |
46 | *** 668,669 **** | |
47 | --- 668,671 ---- | |
48 | { /* Add new patch number below this line */ | |
49 | + /**/ | |
50 | + 209, | |
51 | /**/ | |
52 | ||
53 | -- | |
54 | In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975 | |
55 | of them are to be found in the United States. | |
56 | ||
57 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
58 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
59 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
60 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |