From a45d29ca200341f5d41fad634c18df96605df8ab Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 6 Jul 2026 14:34:07 -0300 Subject: cursor-line gutter highlight: the line number on the cursor's row takes the tag style (tag_fg/tag_bg), resolved at render time from the theme like the rest of the chrome. Same row math as the cursor pass (pinned cur_row or emulator cursor + scroll), gated on active && !tag_edit so only the focused file pane shows it. New cursorline snap script + golden proves it follows j-movement; look-file/syntax style goldens regenerated (cursor-row gutter cells only). 19/19 snap green. --- test/snapshots/cursorline.golden | 124 +++++++++++++++++++++++++++++++++++++++ test/snapshots/cursorline.snap | 25 ++++++++ test/snapshots/look-file.golden | 2 +- test/snapshots/syntax.golden | 6 +- 4 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 test/snapshots/cursorline.golden create mode 100644 test/snapshots/cursorline.snap (limited to 'test') diff --git a/test/snapshots/cursorline.golden b/test/snapshots/cursorline.golden new file mode 100644 index 00000000..f50617c8 --- /dev/null +++ b/test/snapshots/cursorline.golden @@ -0,0 +1,124 @@ +== snap top grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/cursorline/cwd/cur.txt Save nm /tmp/pardes-snap/cursorline/cwd Del +| 1 line 1 +| 2 line 2 cur.txt +| 3 line 3 +| 4 line 4 +| 5 line 5 +| 6 line 6 +| 7 line 7 +| 8 line 8 +| 9 line 9 +| nm /tmp/pardes-snap/cursorline/cwd Del +| +| cur.txt +| +| +| +| cur.txt +| +| +| +| nm /tmp/pardes-snap/cursorline/cwd Del +| +| cur.txt +| +| +| +| +| +| +== style top +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-89 #969696,#2c2a3e, 90-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #969696,#2c2a3e, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-39 #969696,#2c2a3e, 40-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-39 #969696,#2c2a3e, 40-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== snap down3 grid=100x30 cursor=7,5 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/cursorline/cwd/cur.txt Save nm /tmp/pardes-snap/cursorline/cwd Del +| 1 line 1 +| 2 line 2 cur.txt +| 3 line 3 +| 4 line 4 +| 5 line 5 +| 6 line 6 +| 7 line 7 +| 8 line 8 +| 9 line 9 +| nm /tmp/pardes-snap/cursorline/cwd Del +| +| cur.txt +| +| +| +| cur.txt +| +| +| +| nm /tmp/pardes-snap/cursorline/cwd Del +| +| cur.txt +| +| +| +| +| +| +== style down3 +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-89 #969696,#2c2a3e, 90-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-6 #969696,#2c2a3e, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-39 #969696,#2c2a3e, 40-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-39 #969696,#2c2a3e, 40-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/cursorline.snap b/test/snapshots/cursorline.snap new file mode 100644 index 00000000..f9b3de5b --- /dev/null +++ b/test/snapshots/cursorline.snap @@ -0,0 +1,25 @@ +# cursor-line gutter: the line number on the cursor's row takes the tag style +# and follows modal movement (gg to the top, then jjj down three lines) +lines cur.txt 20 +start 30 100 +wait 8000 cur.txt +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text cur.txt +key esc +settle 700 +stable 400 5000 +press right 6 8 +release right 6 8 +stable 700 15000 +key g g +stable 400 5000 +snap top +snapstyle top +key j j j +stable 400 5000 +snap down3 +snapstyle down3 diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden index 4f6d4a71..0b9f08cd 100644 --- a/test/snapshots/look-file.golden +++ b/test/snapshots/look-file.golden @@ -32,7 +32,7 @@ == style file-open |0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, |1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-88 #969696,#2c2a3e, 89-99 d,#2c2a3e, -|2: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|2: 0-1 d,#2a2a2a, 2-6 #969696,#2c2a3e, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |3: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |4: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |5: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden index 310d6d64..372f2999 100644 --- a/test/snapshots/syntax.golden +++ b/test/snapshots/syntax.golden @@ -32,7 +32,7 @@ == style zig-open |0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, |1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, -|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|2: 0-1 d,#525252, 2-6 #969696,#2c2a3e, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, |3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, |4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, |5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, @@ -63,7 +63,7 @@ == style colors-off |0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, |1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, -|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|2: 0-1 d,#525252, 2-6 #969696,#2c2a3e, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, |5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, @@ -94,7 +94,7 @@ == style colors-on |0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, |1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, -|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|2: 0-1 d,#525252, 2-6 #969696,#2c2a3e, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, |3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, |4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, |5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, -- cgit v1.3