Mercurial > vim
comparison src/ex_cmds.c @ 3184:074ddc768fea v7.3.362
updated for version 7.3.362
Problem: ml_get error when using ":g" with folded lines.
Solution: Adjust the line number for changed_lines(). (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 30 Nov 2011 17:01:58 +0100 |
parents | 6963603ec6dc |
children | 48252b5fd170 |
comparison
equal
deleted
inserted
replaced
3183:cccf3bc67bb3 | 3184:074ddc768fea |
---|---|
818 curwin->w_cursor.lnum = dest; | 818 curwin->w_cursor.lnum = dest; |
819 else | 819 else |
820 curwin->w_cursor.lnum = dest + (line2 - line1) + 1; | 820 curwin->w_cursor.lnum = dest + (line2 - line1) + 1; |
821 | 821 |
822 if (line1 < dest) | 822 if (line1 < dest) |
823 changed_lines(line1, 0, dest + num_lines + 1, 0L); | 823 { |
824 dest += num_lines + 1; | |
825 last_line = curbuf->b_ml.ml_line_count; | |
826 if (dest > last_line + 1) | |
827 dest = last_line + 1; | |
828 changed_lines(line1, 0, dest, 0L); | |
829 } | |
824 else | 830 else |
825 changed_lines(dest + 1, 0, line1 + num_lines, 0L); | 831 changed_lines(dest + 1, 0, line1 + num_lines, 0L); |
826 | 832 |
827 return OK; | 833 return OK; |
828 } | 834 } |