Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some issues regarding ANSI CSI handling #1611

Merged
merged 5 commits into from
Apr 12, 2023
Merged

Commits on Apr 5, 2023

  1. widgets/ansi: Clear attr dict when resetting

    Otherwise, some attributes set from ECODES will be kept in the dict.
    guludo committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    ab0c4f2 View commit details
    Browse the repository at this point in the history
  2. widgets/ansi: Also recognize ESC[0m

    That is a valid way of resetting and must be properly regognized.
    guludo committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    4013ba8 View commit details
    Browse the repository at this point in the history
  3. widgets/ansi: Update attr dictionary only after append

    Do that so we get the correct order of operations: as the comment says,
    append_themed_infix(infix) must use the previous (a.k.a. current)
    attr dict.
    guludo committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    323b291 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. utils/ansi: Add and use module

    Extract existing logic to get ANSI CSIs into a dedicated module. While
    at it, also implement a function to filter out those escape sequences.
    That function will be used in a future commit to clean up the message
    text when generating the quoted text for the a reply.
    guludo committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    72f0ece View commit details
    Browse the repository at this point in the history
  2. commands/thread: Filter out ANSI CSI when replying

    It is undesirable to have those sequence in the quoted text of a reply
    message. Remove them.
    guludo committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    685ba81 View commit details
    Browse the repository at this point in the history