mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0218: reading before the start of the line
Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
This commit is contained in:
parent
e1f3fd1d02
commit
e98c88c44c
@ -1746,8 +1746,9 @@ edit_unputchar(void)
|
|||||||
* Only works when cursor is in the line that changes.
|
* Only works when cursor is in the line that changes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
display_dollar(colnr_T col)
|
display_dollar(colnr_T col_arg)
|
||||||
{
|
{
|
||||||
|
colnr_T col = col_arg < 0 ? 0 : col_arg;
|
||||||
colnr_T save_col;
|
colnr_T save_col;
|
||||||
|
|
||||||
if (!redrawing())
|
if (!redrawing())
|
||||||
|
@ -5,7 +5,7 @@ void ins_redraw(int ready);
|
|||||||
void edit_putchar(int c, int highlight);
|
void edit_putchar(int c, int highlight);
|
||||||
void set_insstart(linenr_T lnum, int col);
|
void set_insstart(linenr_T lnum, int col);
|
||||||
void edit_unputchar(void);
|
void edit_unputchar(void);
|
||||||
void display_dollar(colnr_T col);
|
void display_dollar(colnr_T col_arg);
|
||||||
void undisplay_dollar(void);
|
void undisplay_dollar(void);
|
||||||
void truncate_spaces(char_u *line);
|
void truncate_spaces(char_u *line);
|
||||||
void backspace_until_column(int col);
|
void backspace_until_column(int col);
|
||||||
|
@ -365,5 +365,13 @@ func Test_cant_open_cmdwin_in_cmdwin()
|
|||||||
call assert_match('E1292:', caught)
|
call assert_match('E1292:', caught)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_cmdwin_virtual_edit()
|
||||||
|
enew!
|
||||||
|
set ve=all cpo+=$
|
||||||
|
silent normal q/s
|
||||||
|
|
||||||
|
set ve= cpo-=$
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
218,
|
||||||
/**/
|
/**/
|
||||||
217,
|
217,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user