Open
Conversation
Fix the width for the description details, both default and as cmdline option, and make sure we don't break the width of the calw and calm output. The (pretty much undocumented) option --width/-w option was used for setting the width of a day table cell in calw and calm but seemed to also be intended for setting the overall width of the description in agenda. The latter part was broken and the details description width would always default to 80. We change the behaviour to set the overall width of the table, defaulting to the terminal width, both for calw and calm and for description details. The width of the day cell is calculated from the overall width.
Author
|
See also insanum#825 |
day_width was calculated assuming 7 days a week. This is not correct when noweekend is set. days was already calculated in _GraphEvents, so move it to instance level and set it in __init__ and use it to calculate the correct width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proper fix instead of #1, as also mentioned in that PR, I realise this repo is not upstream gcalcli, but since it's the source for OpenSUSE, I think it makes sense to fix it here too.
Fix the width for the description details, both default and as cmdline option, and make sure we don't break the width of the
calwandcalmoutput.The (pretty much undocumented) option
--width/-woption was used for setting the width of a day table cell incalwandcalmbut seemed to also be intended for setting the overall width of thedescriptioninagenda. The latter part was broken and the detailsdescriptionwidth would always default to 80.We change the behaviour to set the overall width of the table, defaulting to the terminal width, both for
calwandcalmand fordescriptiondetails. The width of the day cell is calculated from the overall width.