Mercurial > vim
comparison src/ops.c @ 610:cd3689efd90a v7.0173
updated for version 7.0173
author | vimboss |
---|---|
date | Sun, 18 Dec 2005 22:10:00 +0000 |
parents | e4c00ec07598 |
children | 53114ef7778f |
comparison
equal
deleted
inserted
replaced
609:ba54311bc43e | 610:cd3689efd90a |
---|---|
1841 /* When deleted a char in the line, reset coladd. */ | 1841 /* When deleted a char in the line, reset coladd. */ |
1842 if (gchar_cursor() != NUL) | 1842 if (gchar_cursor() != NUL) |
1843 curwin->w_cursor.coladd = 0; | 1843 curwin->w_cursor.coladd = 0; |
1844 } | 1844 } |
1845 #endif | 1845 #endif |
1846 (void)del_bytes((long)n, restart_edit == NUL && !virtual_op); | 1846 (void)del_bytes((long)n, restart_edit == NUL && !virtual_op, |
1847 oap->op_type == OP_DELETE && !oap->is_VIsual); | |
1847 } | 1848 } |
1848 else /* delete characters between lines */ | 1849 else /* delete characters between lines */ |
1849 { | 1850 { |
1850 pos_T curpos; | 1851 pos_T curpos; |
1851 | 1852 |
1861 del_lines((long)(oap->line_count - 2), FALSE); | 1862 del_lines((long)(oap->line_count - 2), FALSE); |
1862 | 1863 |
1863 /* delete from start of line until op_end */ | 1864 /* delete from start of line until op_end */ |
1864 curwin->w_cursor.col = 0; | 1865 curwin->w_cursor.col = 0; |
1865 (void)del_bytes((long)(oap->end.col + 1 - !oap->inclusive), | 1866 (void)del_bytes((long)(oap->end.col + 1 - !oap->inclusive), |
1866 restart_edit == NUL && !virtual_op); | 1867 restart_edit == NUL && !virtual_op, |
1868 oap->op_type == OP_DELETE && !oap->is_VIsual); | |
1867 curwin->w_cursor = curpos; /* restore curwin->w_cursor */ | 1869 curwin->w_cursor = curpos; /* restore curwin->w_cursor */ |
1868 | 1870 |
1869 (void)do_join(FALSE); | 1871 (void)do_join(FALSE); |
1870 } | 1872 } |
1871 } | 1873 } |
4507 curwin->w_cursor.lnum++; | 4509 curwin->w_cursor.lnum++; |
4508 curwin->w_cursor.col = 0; | 4510 curwin->w_cursor.col = 0; |
4509 if (line_count < 0 && u_save_cursor() == FAIL) | 4511 if (line_count < 0 && u_save_cursor() == FAIL) |
4510 break; | 4512 break; |
4511 #ifdef FEAT_COMMENTS | 4513 #ifdef FEAT_COMMENTS |
4512 (void)del_bytes((long)next_leader_len, FALSE); | 4514 (void)del_bytes((long)next_leader_len, FALSE, FALSE); |
4513 if (next_leader_len > 0) | 4515 if (next_leader_len > 0) |
4514 mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L, | 4516 mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L, |
4515 (long)-next_leader_len); | 4517 (long)-next_leader_len); |
4516 #endif | 4518 #endif |
4517 curwin->w_cursor.lnum--; | 4519 curwin->w_cursor.lnum--; |