Skip to content

Fix context separator width for small and round line numbers - #175

Open
Wilfred wants to merge 1 commit into
masterfrom
claude/fix-context-separator-width
Open

Fix context separator width for small and round line numbers#175
Wilfred wants to merge 1 commit into
masterfrom
claude/fix-context-separator-width

Conversation

@Wilfred

@Wilfred Wilfred commented Aug 16, 2026

Copy link
Copy Markdown
Owner

The -- separator between context groups sizes itself to the previous line number, but used (log prev-line-num 10):

  • after line 1 the separator was empty (log 1 = 0), leaving a blank line;
  • after exact powers of 10 it was one dash short (log 100 = 2.0 for a 3-digit number);
  • it also relied on s-repeat quietly accepting a float.

Use the digit count of the line number instead. Includes a regression test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MwUBSSJnCtCeoqJEA3xH48

The separator length between context groups used
(log prev-line-num 10), which is 0 for line 1 (producing an empty
separator line) and one short after exact powers of 10 (log 100 = 2
for a 3-digit number). It also relied on s-repeat quietly accepting
a float. Use the digit count of the line number instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MwUBSSJnCtCeoqJEA3xH48
@Wilfred
Wilfred force-pushed the claude/fix-context-separator-width branch from 61597b6 to c64187c Compare August 18, 2026 21:31
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 60.677% (+0.8%) from 59.86% — claude/fix-context-separator-width into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants