Mercurial > vim
diff src/misc2.c @ 1488:205a26fab116 v7.1.203
updated for version 7.1-203
author | vimboss |
---|---|
date | Fri, 04 Jan 2008 20:25:44 +0000 |
parents | f0b3b9ac2147 |
children | 0d0bf7598dcb |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -507,12 +507,17 @@ check_cursor_col() curwin->w_cursor.col = 0; else if (curwin->w_cursor.col >= len) { - /* Allow cursor past end-of-line in Insert mode, restarting Insert - * mode or when in Visual mode and 'selection' isn't "old" */ + /* Allow cursor past end-of-line when: + * - in Insert mode or restarting Insert mode + * - in Visual mode and 'selection' isn't "old" + * - 'virtualedit' is set */ if ((State & INSERT) || restart_edit #ifdef FEAT_VISUAL || (VIsual_active && *p_sel != 'o') #endif +#ifdef FEAT_VIRTUALEDIT + || (ve_flags & VE_ONEMORE) +#endif || virtual_active()) curwin->w_cursor.col = len; else