GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.5k stars 311 forks source link

description.oneline sometimes overflows to a new line. #3652

Open Jelso13 opened 1 month ago

Jelso13 commented 1 month ago

To report a bug...

When using description.oneline the end of annotations are sometimes put on a new line. From testing this, it seems that there is always one entry that is partially on a new line and seems to be the longest line. It does not always move only the last word of the description.oneline entry to the new line, sometimes it has moved two.

3 tasks


* What actually happened?
Instead I received this output where part of the second annotation for task 3 is put on a new line.
```bash
Id Description
 2 second task 2024-10-15 task two, annotation one 2024-10-15 task two, annotation two
 3 third task 2024-10-15 task three, annotation one 2024-10-15 task three, annotation
   two
 1 first task 2024-10-15 task one, annotation one

3 tasks

Compiler Version: 14.2.1 20240802 Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64 Compliance: C++17

Build Features CMake: 3.30.2 libuuid: libuuid + uuid_unparse_lower Build type: release

Configuration File: /tmp/task_test/taskrc (found), 775 bytes, mode 100644 Data: /tmp/task_test (found), dir, mode 40755 TASKRC: /tmp/task_test/taskrc TASKDATA: /tmp/task_test GC: Enabled $EDITOR: /usr/bin/nvim Hooks System: Enabled Location: /tmp/task_test/hooks (-none-)

Tests Terminal: 324x64 Broken ref: Scanned 3 tasks for broken references: No broken references found


* A more minimal example:
Running the below also results in the last part of the annotation being put in a new line and does not use any modifier on the view (rc.defaultwidth etc).
```bash
rm -r /tmp/task_test
mkdir /tmp/task_test 
TASKDATA=/tmp/task_test TASKRC=/tmp/task_test/taskrc task add "first task"
TASKDATA=/tmp/task_test TASKRC=/tmp/task_test/taskrc task 1 annotate "task one, annotation one"
TASKDATA=/tmp/task_test TASKRC=/tmp/task_test/taskrc task next rc.report.next.columns=id,description.oneline rc.report.next.labels=Id,Description 

Gives:

Id Description
 1 first task 2024-10-15 task one, annotation
   one

1 task

It seems to be the longest entry in the table but does not always put only a single word on the new line. This is possibly related to #2090.