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 history trim for non-timestamped files #873

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

derklaro
Copy link
Contributor

I've got a report today from a user that there is an issue saving the console history. This is due to the fact that the console history can be timestamped (format <timestamp>:<line>) but also just the raw line (format <line>). The trim process tries to find the delimiter char : everytime, and errors out if the console history is not timestamped:
image

I've changed the trim process in a way that it checks if the history is timestamped, and if not there is no split applied and the line is just parsed raw. The time is not used in the further trim steps.

@gnodet
Copy link
Member

gnodet commented Oct 19, 2023

Nice catch. Do you think you could add a small unit test for that ?

@gnodet gnodet merged commit 7ca9dc2 into jline:master Oct 20, 2023
3 checks passed
@gnodet gnodet added this to the 3.24.0 milestone Oct 20, 2023
@gnodet gnodet changed the title fix history trim for non-timestamped files Fix history trim for non-timestamped files Oct 20, 2023
@gnodet gnodet mentioned this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants