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

timew day crashes hard on Chinese tags #499

Open
ShizuhaAki opened this issue Jul 23, 2022 · 4 comments
Open

timew day crashes hard on Chinese tags #499

ShizuhaAki opened this issue Jul 23, 2022 · 4 comments
Labels
bug Something isn't working more information required More information is required to proceed

Comments

@ShizuhaAki
Copy link

Screen Shot 2022-07-23 at 5 10 54 PM

This is not reproduced when I used English tags before. Apart from the display being wrecked. Some tags (long ones) went missing.

I'm using timew 1.4.3 on macOS's iTerm terminal.

P.S. changing terminal font & resolution, etc. yields the same result.

@lauft
Copy link
Member

lauft commented Jul 24, 2022

@Ravenclaw-OIer Could you supply a minimal reproducing script? From the picture alone, it is difficult to get to the bottom of the problem.

@ShizuhaAki
Copy link
Author

@Ravenclaw-OIer Could you supply a minimal reproducing script? From the picture alone, it is difficult to get to the bottom of the problem.

@lauft Is there away to create a Virtual Environment-like env that I can play around with timew in?

@lauft
Copy link
Member

lauft commented Jul 31, 2022

@Ravenclaw-OIer
Use the following bash script template to create your reproducer:

# Set Timewarriors DB to '/tmp/timewarriordb'
export TIMEWARRIORDB=/tmp/timewarriordb
# Remove anything from previous runs
rm -rf ${TIMEWARRIORDB}
# Make sure 'data' directory exists
mkdir -p ${TIMEWARRIORDB}/data
# Create an empty config file
:> ${TIMEWARRIORDB}/timewarrior.cfg

# Add your reproducing commands here
...

@lauft lauft added bug Something isn't working more information required More information is required to proceed labels Aug 17, 2022
@cyberme0w
Copy link
Contributor

Hi there, I'm not the original poster, but I stumbled upon this as it is still open and was able to reproduce part of the issue, namely the disappearing (chinese) tags:

# Setup
export TIMEWARRIORDB=/tmp/timewarriordb
rm -rf ${TIMEWARRIORDB}
mkdir -p ${TIMEWARRIORDB}/data
:> ${TIMEWARRIORDB}/timewarrior.cfg

# Steps
timew start 传传传传传传传
sleep 1
timew stop

timew lengthen @1 2.5hour
timew day # this will not yet display the tag

timew lengthen @1 15min
timew day # the tag is now visible again

Hopefully this helps, if only by having some steps to reproduce.

It seemed to be a fair assumption that this affected any wide chars, and testing with cuneiform chars (𒀖) returned the same result - the tag is only visible if all chars in the tag fit the space available.

Also, using multiple tags where at least one of them uses wide-chars behaves in a similar fashion: either all tags fit the given space, or no tag is displayed, including the non-wide-char tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more information required More information is required to proceed
Projects
None yet
Development

No branches or pull requests

3 participants