mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.2099
Problem: When a keymap is active only "(lang)" is displayed. (Ilya Dogolazky) Solution: Show the keymap name. (Dmitri Vereshchagin, closes #933)
This commit is contained in:
@@ -4114,7 +4114,7 @@ build_stl_str_hl(
|
|||||||
|
|
||||||
case STL_KEYMAP:
|
case STL_KEYMAP:
|
||||||
fillable = FALSE;
|
fillable = FALSE;
|
||||||
if (get_keymap_str(wp, tmp, TMPLEN))
|
if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN))
|
||||||
str = tmp;
|
str = tmp;
|
||||||
break;
|
break;
|
||||||
case STL_PAGENUM:
|
case STL_PAGENUM:
|
||||||
|
@@ -23,7 +23,7 @@ void win_redraw_last_status(frame_T *frp);
|
|||||||
void win_redr_status_matches(expand_T *xp, int num_matches, char_u **matches, int match, int showtail);
|
void win_redr_status_matches(expand_T *xp, int num_matches, char_u **matches, int match, int showtail);
|
||||||
void win_redr_status(win_T *wp);
|
void win_redr_status(win_T *wp);
|
||||||
int stl_connected(win_T *wp);
|
int stl_connected(win_T *wp);
|
||||||
int get_keymap_str(win_T *wp, char_u *buf, int len);
|
int get_keymap_str(win_T *wp, char_u *fmt, char_u *buf, int len);
|
||||||
void screen_putchar(int c, int row, int col, int attr);
|
void screen_putchar(int c, int row, int col, int attr);
|
||||||
void screen_getbytes(int row, int col, char_u *bytes, int *attrp);
|
void screen_getbytes(int row, int col, char_u *bytes, int *attrp);
|
||||||
void screen_puts(char_u *text, int row, int col, int attr);
|
void screen_puts(char_u *text, int row, int col, int attr);
|
||||||
|
11
src/screen.c
11
src/screen.c
@@ -6767,7 +6767,7 @@ win_redr_status(win_T *wp)
|
|||||||
screen_fill(row, row + 1, len + W_WINCOL(wp),
|
screen_fill(row, row + 1, len + W_WINCOL(wp),
|
||||||
this_ru_col + W_WINCOL(wp), fillchar, fillchar, attr);
|
this_ru_col + W_WINCOL(wp), fillchar, fillchar, attr);
|
||||||
|
|
||||||
if (get_keymap_str(wp, NameBuff, MAXPATHL)
|
if (get_keymap_str(wp, (char_u *)"<%s>", NameBuff, MAXPATHL)
|
||||||
&& (int)(this_ru_col - len) > (int)(STRLEN(NameBuff) + 1))
|
&& (int)(this_ru_col - len) > (int)(STRLEN(NameBuff) + 1))
|
||||||
screen_puts(NameBuff, row, (int)(this_ru_col - STRLEN(NameBuff)
|
screen_puts(NameBuff, row, (int)(this_ru_col - STRLEN(NameBuff)
|
||||||
- 1 + W_WINCOL(wp)), attr);
|
- 1 + W_WINCOL(wp)), attr);
|
||||||
@@ -6862,6 +6862,7 @@ stl_connected(win_T *wp)
|
|||||||
int
|
int
|
||||||
get_keymap_str(
|
get_keymap_str(
|
||||||
win_T *wp,
|
win_T *wp,
|
||||||
|
char_u *fmt, /* format string containing one %s item */
|
||||||
char_u *buf, /* buffer for the result */
|
char_u *buf, /* buffer for the result */
|
||||||
int len) /* length of buffer */
|
int len) /* length of buffer */
|
||||||
{
|
{
|
||||||
@@ -6894,9 +6895,7 @@ get_keymap_str(
|
|||||||
#endif
|
#endif
|
||||||
p = (char_u *)"lang";
|
p = (char_u *)"lang";
|
||||||
}
|
}
|
||||||
if ((int)(STRLEN(p) + 3) < len)
|
if (vim_snprintf((char *)buf, len, (char *)fmt, p) > len - 1)
|
||||||
sprintf((char *)buf, "<%s>", p);
|
|
||||||
else
|
|
||||||
buf[0] = NUL;
|
buf[0] = NUL;
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
vim_free(s);
|
vim_free(s);
|
||||||
@@ -10166,7 +10165,9 @@ showmode(void)
|
|||||||
MSG_PUTS_ATTR(_(" Arabic"), attr);
|
MSG_PUTS_ATTR(_(" Arabic"), attr);
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
MSG_PUTS_ATTR(_(" (lang)"), attr);
|
if (get_keymap_str(curwin, (char_u *)" (%s)",
|
||||||
|
NameBuff, MAXPATHL))
|
||||||
|
MSG_PUTS_ATTR(NameBuff, attr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((State & INSERT) && p_paste)
|
if ((State & INSERT) && p_paste)
|
||||||
|
@@ -758,6 +758,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 */
|
||||||
|
/**/
|
||||||
|
2099,
|
||||||
/**/
|
/**/
|
||||||
2098,
|
2098,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user