Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Bold text style matches everything? #73

Closed
heigren opened this issue Oct 9, 2019 · 3 comments
Closed

Bold text style matches everything? #73

heigren opened this issue Oct 9, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@heigren
Copy link

heigren commented Oct 9, 2019

Description

When using the "bold" it matches everything after the initial match, while the color configured on the same rule is displaying correctly. The bold style continues until the session is closed. ct --reload does not help either.

Screenshot from 2019-10-09 11-33-33

Environment

  • OS: Ubuntu 19.04
  • ChromaTerm: 0.4.8

Configuration

  regex: (?:[0-9]*[1-9][0-9]*\W|^)((input errors|errors|error|err|reset|act\/unsup|dhcp|DHCP|mismatch|notconnect|drops|dropped|runts|CRC|collisions|collision|LRN|learning
|listening|LIS|unsynchronized))(?=[\W\s]|$)
  color: f#c94b4b bold
@hSaria
Copy link
Owner

hSaria commented Oct 9, 2019

Thanks for the submission. I was able to recreate the problem on v0.5.0. I'll get a fix out ASAP.

On initial inspection, it seems like ct is doing what it's designed to do:

v color start                        v color reset
\e[38;5;167m\e[1m1 input errors\e[21m\e[39m
            ^ bold on          ^ bold off

I looked at a Wiki page for getting the "bold off" (\e[21m) code but it would seem that it is not widely supported. I'll find the correct code or an alternative for bold off.

@hSaria hSaria added the bug Something isn't working label Oct 9, 2019
@hSaria
Copy link
Owner

hSaria commented Oct 9, 2019

Aha! Found it! It's \e[22m for "normal intensity".

@hSaria hSaria self-assigned this Oct 9, 2019
@hSaria
Copy link
Owner

hSaria commented Oct 9, 2019

Fixed in 7b86041. v0.5.1 published. Thanks again for creating this issue.

@hSaria hSaria closed this as completed Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants