mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
vim-patch:7.4.2099 (#5951)
Problem: When a keymap is active only "(lang)" is displayed. (Ilya
Dogolazky)
Solution: Show the keymap name. (Dmitri Vereshchagin, closes vim/vim#933)
73ac0c4281
This commit is contained in:
parent
b5560a69b1
commit
3fd7be6d3e
@ -3443,7 +3443,7 @@ int build_stl_str_hl(
|
||||
|
||||
case STL_KEYMAP:
|
||||
fillable = false;
|
||||
if (get_keymap_str(wp, tmp, TMPLEN))
|
||||
if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN))
|
||||
str = tmp;
|
||||
break;
|
||||
case STL_PAGENUM:
|
||||
|
@ -4912,7 +4912,7 @@ void win_redr_status(win_T *wp)
|
||||
screen_fill(row, row + 1, len + wp->w_wincol,
|
||||
this_ru_col + wp->w_wincol, fillchar, fillchar, attr);
|
||||
|
||||
if (get_keymap_str(wp, NameBuff, MAXPATHL)
|
||||
if (get_keymap_str(wp, (char_u *)"<%s>", NameBuff, MAXPATHL)
|
||||
&& this_ru_col - len > (int)(STRLEN(NameBuff) + 1))
|
||||
screen_puts(NameBuff, row, (int)(this_ru_col - STRLEN(NameBuff)
|
||||
- 1 + wp->w_wincol), attr);
|
||||
@ -4993,8 +4993,9 @@ int stl_connected(win_T *wp)
|
||||
int
|
||||
get_keymap_str (
|
||||
win_T *wp,
|
||||
char_u *buf, /* buffer for the result */
|
||||
int len /* length of buffer */
|
||||
char_u *fmt, // format string containing one %s item
|
||||
char_u *buf, // buffer for the result
|
||||
int len // length of buffer
|
||||
)
|
||||
{
|
||||
char_u *p;
|
||||
@ -5021,10 +5022,9 @@ get_keymap_str (
|
||||
else
|
||||
p = (char_u *)"lang";
|
||||
}
|
||||
if ((int)(STRLEN(p) + 3) < len)
|
||||
sprintf((char *)buf, "<%s>", p);
|
||||
else
|
||||
if (vim_snprintf((char *)buf, len, (char *)fmt, p) > len - 1) {
|
||||
buf[0] = NUL;
|
||||
}
|
||||
xfree(s);
|
||||
}
|
||||
return buf[0] != NUL;
|
||||
@ -6752,10 +6752,12 @@ int showmode(void)
|
||||
if (p_fkmap)
|
||||
MSG_PUTS_ATTR(farsi_text_5, attr);
|
||||
if (State & LANGMAP) {
|
||||
if (curwin->w_p_arab)
|
||||
if (curwin->w_p_arab) {
|
||||
MSG_PUTS_ATTR(_(" Arabic"), attr);
|
||||
else
|
||||
MSG_PUTS_ATTR(_(" (lang)"), attr);
|
||||
} else if (get_keymap_str(curwin, (char_u *)" (%s)",
|
||||
NameBuff, MAXPATHL)) {
|
||||
MSG_PUTS_ATTR(NameBuff, attr);
|
||||
}
|
||||
}
|
||||
if ((State & INSERT) && p_paste)
|
||||
MSG_PUTS_ATTR(_(" (paste)"), attr);
|
||||
|
@ -341,7 +341,7 @@ static int included_patches[] = {
|
||||
// 2102 NA
|
||||
// 2101,
|
||||
2100,
|
||||
// 2099,
|
||||
2099,
|
||||
// 2098,
|
||||
// 2097,
|
||||
// 2096,
|
||||
|
Loading…
Reference in New Issue
Block a user