haskell / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
223 stars 75 forks source link

better spanning of ANSI control sequences from when finding graphemes #115

Closed aryairani closed 2 years ago

aryairani commented 5 years ago

Per #114, I added a more detailed span for ANSI sequences, based on a definition from Wikipedia. :) So this will look for ANSI control sequences (not just those ending in '\STX') when grouping characters into graphemes, and then filters out '\ESC' graphemes when calculating length for column alignment.

base:

image

PR:

image

What do you think? Thanks!

aryairani commented 5 years ago

haskeline master (v0.8.0.0 wip) builds ok, but doesn't merge cleanly with my rendering fixes.

aryairani commented 2 years ago

I guess this has been resolved independently.