Skip to content

Commit d35ab1d

Browse files
committed
Fix the behavior of Terminal.wrap() (#455)
The behavior of Terminal.wrap() seemed to have changed in blessed 1.26. This patches forces the placeholder string to "" to fix it. Closes #455 reported by asarubbo
1 parent bedfd06 commit d35ab1d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
* Strip comments from SQL queries emitted by pg\_activity (#442).
88
* Remove the "tuples returned/s" metric from the header, it provided misleading
99
information (#441, reported by @kmoppel)
10+
* Fix a difference in wrapping behavior introduced in blessed 1.26 (#455,
11+
reported by @asarubbo)
1012

1113
## pg\_activity 3.6.1 - 2025-06-03
1214

1315
### Fixed
1416

15-
* Fix `--hide-queries-in-logs` to also disable log_statements when it is used
16-
(Kouber Saparev).
17+
* Fix `--hide-queries-in-logs` to also disable log_statements when it is used
18+
(Kouber Saparev).
1719
* Fix deprecated syntax of the `license` field in packaging metadata; require
1820
setuptools version 77.0.0 or higher accordingly.
1921
* Remove dummy `setup.py` file.

pgactivity/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def shorten(term: Terminal, text: str, width: int | None = None) -> str:
7171
"""
7272
if not text:
7373
return ""
74-
wrapped = term.wrap(text, width=width, max_lines=1)
74+
wrapped = term.wrap(text, width=width, max_lines=1, placeholder="")
7575
return wrapped[0] + term.normal
7676

7777

0 commit comments

Comments
 (0)