mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0653: BS and DEL do not work properly in an interacive shell
Problem: BS and DEL do not work properly in an interacive shell. (Gary Johnson) Solution: Adjust the length for replaced codes.
This commit is contained in:
parent
b6aab8f44b
commit
01c34e7d10
@ -5106,7 +5106,7 @@ mch_call_shell_fork(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
term_replace_bs_del_keycode(ta_buf, ta_len, len);
|
len = term_replace_bs_del_keycode(ta_buf, ta_len, len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For pipes: echo the typed characters.
|
* For pipes: echo the typed characters.
|
||||||
|
@ -4531,7 +4531,7 @@ mch_system_piped(char *cmd, int options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
term_replace_bs_del_keycode(ta_buf, ta_len, len);
|
len = term_replace_bs_del_keycode(ta_buf, ta_len, len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For pipes: echo the typed characters. For a pty this
|
* For pipes: echo the typed characters. For a pty this
|
||||||
|
@ -86,5 +86,5 @@ void update_tcap(int attr);
|
|||||||
void swap_tcap(void);
|
void swap_tcap(void);
|
||||||
void ansi_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
|
void ansi_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
|
||||||
void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
|
void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx);
|
||||||
void term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len);
|
int term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len_arg);
|
||||||
/* vim: set ft=c : */
|
/* vim: set ft=c : */
|
||||||
|
@ -6733,11 +6733,13 @@ cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replace K_BS by <BS> and K_DEL by <DEL>
|
* Replace K_BS by <BS> and K_DEL by <DEL>.
|
||||||
|
* Returns "len" adjusted for replaced codes.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len)
|
term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len_arg)
|
||||||
{
|
{
|
||||||
|
int len = len_arg;
|
||||||
int i;
|
int i;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
@ -6762,4 +6764,5 @@ term_replace_bs_del_keycode(char_u *ta_buf, int ta_len, int len)
|
|||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
i += (*mb_ptr2len_len)(ta_buf + i, ta_len + len - i) - 1;
|
i += (*mb_ptr2len_len)(ta_buf + i, ta_len + len - i) - 1;
|
||||||
}
|
}
|
||||||
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -699,6 +699,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 */
|
||||||
|
/**/
|
||||||
|
653,
|
||||||
/**/
|
/**/
|
||||||
652,
|
652,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user