GothenburgBitFactory / GothenburgBitFactory/taskwarrior

The report has a minimum width of 109 and does not fit in the available width of 80.

Open
#2,263 3 comments 0 reactions 0 assignees View on GitHub
eval:reproduced
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

#### To report a bug...

* What command(s) did you run?

The following script, in an 80-character wide terminal

```bash
#!/bin/sh -ex

# Set up a temporary empty TaskWarrior working environment (and delete when script ends)
d=$(mktemp -dt twtest.XXXXXX)
trap 'rm -rf "$d"' 0 INT TERM QUIT
touch "$d"/.taskrc
export TASKDATA="$d"
export TASKRC="$d"/.taskrc

x=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
task add "$x\n$x\n$x"
task add "$x\n$x"
task add "$x \n$x\n$x"
task next 1
task next 2
task next 3
task diag
```

* What did you expect to happen?

All three tasks would display without issue.

* What actually happened?

The first task, which had two lines of long description only separated by a newline, and no spaces, caused an error that the report was too wide. Truncated/tidied output:

```
$ task add 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Created task 1.
$ task add 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Created task 2.
$ task add 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Created task 3.
$ task next 1

ID Age Description Urg
1 - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1 task
The report has a minimum width of 109 and does not fit in the available width of 80.
$ task next 2

ID Age Description Urg
2 - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1 task
$ task next 3

ID Age Description Urg
3 - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1 task
```

* Paste the output of the ```task diag``` command.

```
TASKRC override: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP/.taskrc
TASKDATA override: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP

task 2.5.1
Platform: Darwin

Compiler
Version: 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.8)
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++11

Build Features
Built: Oct 16 2019 19:08:34
CMake: 3.15.4
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.6.10
Build type: Release

Configuration
File: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP/.taskrc (found), 0 bytes, mode 100664
Data: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP (found), dir, mode 40700
TASKRC: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP/.taskrc
TASKDATA: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP
Locking: Enabled
GC: Enabled
$VISUAL: vi
Server:
Trust: strict
Certificate: , not readable, 0 bytes
Key: , not readable, 0 bytes
Ciphers: NORMAL
Creds:

Hooks
System: Enabled
Location: /var/folders/6d/5bz1pvqn5dq0183fjbv2_zfr0000gn/T/twtest.Ve41aP/hooks
(-none-)

Tests
$TERM: xterm-256color (120x30)
Dups: Scanned 3 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 3 tasks for broken references:
No broken references found
```

I suspect this may be fixed by #2249, and may be the same error as #2148 and/or #2260, and maybe #2023?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.