Skip to content

Bump elm-ansi to 11.0.1 that fixes CursorColumn (CSI G) to use 1-based indexing as per ANSI spec. - #9342

Open
analytically wants to merge 1 commit into
concourse:masterfrom
analytically:feature/fixansi
Open

analytically wants to merge 1 commit into
concourse:masterfrom
analytically:feature/fixansi

Conversation

@analytically

Copy link
Copy Markdown
Contributor

Other fixes:

  • Fix hyperlink URL parsing to preserve semicolons in URLs by only splitting on first two semicolons
  • Fix non-ASCII character encoding in URLs to encode individual characters rather than entire string

…d indexing as per ANSI spec.

Other fixes:
- Fix hyperlink URL parsing to preserve semicolons in URLs by only
  splitting on first two semicolons
- Fix non-ASCII character encoding in URLs to encode individual
  characters rather than entire string

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
@analytically
analytically requested a review from a team October 28, 2025 18:08
@analytically

Copy link
Copy Markdown
Contributor Author

Pipeline to test:

---
jobs:
  - name: csi-g-test
    plan:
      - task: test-csi-g
        config:
          platform: linux
          image_resource:
            type: registry-image
            source:
              repository: python
              tag: "3.11"
          run:
            path: sh
            args:
              - -exc
              - |
                pip install rich
                cat > test.py << 'EOF'
                from rich.console import Console
                console = Console(width=180, force_terminal=True)
                
                # Test CSI G positioning
                for col in [1, 30, 60, 90, 120, 150, 180]:
                    console.file.write(f"\033[{col}G")
                    console.file.flush()
                    console.print(f"|{col}", end="")
                console.print()
                EOF
                
                python3 test.py

Before:
screentshot-2025-10-28 at 18 08 44@2x

After:
screentshot-2025-10-28 at 18 10 09@2x

@analytically

Copy link
Copy Markdown
Contributor Author

DO NOT MERGE. Newer version of elm-ansi is coming with a lot more improvements.

@taylorsilva

Copy link
Copy Markdown
Member

I see v12 of elm-ansi is out: vito/elm-ansi@264ff3c

Is it safe to bump to the new major?

@analytically

Copy link
Copy Markdown
Contributor Author

It should work yeah. I still have some issue with width calculation.

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

Labels

Projects

Status: Waiting on Contributor

Development

Successfully merging this pull request may close these issues.

2 participants