patch 9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu'
Problem: Line number not visisble with 'smoothscroll', 'nu' and 'rnu'.
Solution: Put the ">>>" after the line number instead of on top.
diff --git a/src/drawline.c b/src/drawline.c
index b2a5951..f3024c2 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -370,7 +370,8 @@
#ifdef FEAT_PROP_POPUP
+ wlv->text_prop_above_count
#endif
- && (wp->w_skipcol == 0 || wlv->row > wp->w_winrow))
+ && (wp->w_skipcol == 0 || wlv->row > wp->w_winrow
+ || (wp->w_p_nu && wp->w_p_rnu)))
{
long num;
char *fmt = "%*ld ";
@@ -770,8 +771,18 @@
)
{
int off = (int)(current_ScreenLine - ScreenLines);
+ int skip = 0;
- for (int i = 0; i < 3; ++i)
+ if (wp->w_p_nu && wp->w_p_rnu)
+ // Do not overwrite the line number, change "123 text" to
+ // "123>>>xt".
+ while (skip < wp->w_width && VIM_ISDIGIT(ScreenLines[off]))
+ {
+ ++off;
+ ++skip;
+ }
+
+ for (int i = 0; i < 3 && i + skip < wp->w_width; ++i)
{
ScreenLines[off] = '<';
if (enc_utf8)