patch 9.0.1061: cannot display 'showcmd' somewhere else
Problem: Cannot display 'showcmd' somewhere else.
Solution: Add the 'showcmdloc' option. (Luuk van Baal, closes #11684)
diff --git a/src/screen.c b/src/screen.c
index c5c6a7a..a737dc0 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4389,8 +4389,18 @@
c = ' ';
screen_fill(0, 1, col, (int)Columns, c, c, attr_fill);
+ // Draw the 'showcmd' information if 'showcmdloc' == "tabline".
+ if (p_sc && *p_sloc == 't')
+ {
+ int width = MIN(10, (int)Columns - col - (tabcount > 1) * 3);
+
+ if (width > 0)
+ screen_puts_len(showcmd_buf, width, 0, (int)Columns
+ - width - (tabcount > 1) * 2, attr_nosel);
+ }
+
// Put an "X" for closing the current tab if there are several.
- if (first_tabpage->tp_next != NULL)
+ if (tabcount > 1)
{
screen_putchar('X', 0, (int)Columns - 1, attr_nosel);
TabPageIdxs[Columns - 1] = -999;