From 5c6c14e21be8a2dcf6ef7d6484f877fa644b9f68 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 16 Aug 2014 16:14:28 -0400 Subject: [PATCH] TW-1381 - TW-1381 blocking report exits with "Unknown error" and exit code 3. --- ChangeLog | 1 + src/ViewTask.cpp | 2 +- src/columns/ColParent.cpp | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc954bb1d..f3ed239fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -133,6 +133,7 @@ - TW-1366 In diagnostics it's called 'Cert', and in config it's called 'certificate' (thanks to Jack). - TW-1373 taskrc.vim VIM syntax file updated (thanks to lolilolicon). +- TW-1381 blocking report exits with "Unknown error" and exit code 3. - TW-1383 Segmentation fault running import-yaml.pl with included example (thanks to Markus Beppler). - Removed deprecated 'echo.command' setting, in favor of the 'header' and diff --git a/src/ViewTask.cpp b/src/ViewTask.cpp index e31613726..f7a17b197 100644 --- a/src/ViewTask.cpp +++ b/src/ViewTask.cpp @@ -76,7 +76,7 @@ ViewTask::~ViewTask () // +--+--+-------+--+-------+--+-------+--+ // |ma|ex|cell |in|cell |in|cell |ex| // +--+--+-------+--+-------+--+-------+--+ -// +// // margin - indentation for the whole table // extrapadding - left and right padding for the whole table // intrapadding - padding between columns diff --git a/src/columns/ColParent.cpp b/src/columns/ColParent.cpp index 025a91233..3566a2912 100644 --- a/src/columns/ColParent.cpp +++ b/src/columns/ColParent.cpp @@ -81,10 +81,17 @@ void ColumnParent::render ( // 34f00694 short if (_style == "default" || _style == "long") + { lines.push_back (color.colorize (leftJustify (task.get (_name), width))); + } else if (_style == "short") - lines.push_back (color.colorize (leftJustify (task.get (_name).substr (28), width))); + { + if (task.has (_name)) + lines.push_back (color.colorize (leftJustify (task.get (_name).substr (28), width))); + else + lines.push_back (color.colorize (leftJustify ("", width))); + } } ////////////////////////////////////////////////////////////////////////////////