Column widths are always calculated now
This commit is contained in:
parent
3f00f8362c
commit
832e53f300
3 changed files with 11 additions and 33 deletions
|
|
@ -538,6 +538,8 @@ void global_scope_t::normalize_report_options(const string& verb)
|
|||
cols = rep.HANDLER(columns_).value.to_long();
|
||||
else if (const char * columns = std::getenv("COLUMNS"))
|
||||
cols = lexical_cast<long>(columns);
|
||||
else
|
||||
cols = 80L;
|
||||
|
||||
if (cols > 0) {
|
||||
DEBUG("auto.columns", "cols = " << cols);
|
||||
|
|
|
|||
36
src/report.h
36
src/report.h
|
|
@ -869,16 +869,7 @@ public:
|
|||
});
|
||||
|
||||
OPTION_(report_t, wide, DO() { // -w
|
||||
parent->HANDLER(date_width_).on_with(string("--wide"), 9L);
|
||||
parent->HANDLER(date_width_).specified = true;
|
||||
parent->HANDLER(payee_width_).on_with(string("--wide"), 35L);
|
||||
parent->HANDLER(payee_width_).specified = true;
|
||||
parent->HANDLER(account_width_).on_with(string("--wide"), 39L);
|
||||
parent->HANDLER(account_width_).specified = true;
|
||||
parent->HANDLER(amount_width_).on_with(string("--wide"), 22L);
|
||||
parent->HANDLER(amount_width_).specified = true;
|
||||
parent->HANDLER(total_width_).on_with(string("--wide"), 22L);
|
||||
parent->HANDLER(total_width_).specified = true;
|
||||
parent->HANDLER(columns_).on_with(string("--wide"), 132L);
|
||||
});
|
||||
|
||||
OPTION_(report_t, yearly, DO() { // -Y
|
||||
|
|
@ -887,38 +878,23 @@ public:
|
|||
|
||||
OPTION__(report_t, date_width_,
|
||||
bool specified;
|
||||
CTOR(report_t, date_width_) {
|
||||
on_with(none, 9L);
|
||||
specified = false;
|
||||
}
|
||||
CTOR(report_t, date_width_) { specified = false; }
|
||||
DO_(args) { value = args[1].to_long(); specified = true; });
|
||||
OPTION__(report_t, payee_width_,
|
||||
bool specified;
|
||||
CTOR(report_t, payee_width_) {
|
||||
on_with(none, 20L);
|
||||
specified = false;
|
||||
}
|
||||
CTOR(report_t, payee_width_) { specified = false; }
|
||||
DO_(args) { value = args[1].to_long(); specified = true; });
|
||||
OPTION__(report_t, account_width_,
|
||||
bool specified;
|
||||
CTOR(report_t, account_width_) {
|
||||
on_with(none, 23L);
|
||||
specified = false;
|
||||
}
|
||||
CTOR(report_t, account_width_) { specified = false; }
|
||||
DO_(args) { value = args[1].to_long(); specified = true; });
|
||||
OPTION__(report_t, amount_width_,
|
||||
bool specified;
|
||||
CTOR(report_t, amount_width_) {
|
||||
on_with(none, 12L);
|
||||
specified = false;
|
||||
}
|
||||
CTOR(report_t, amount_width_) { specified = false; }
|
||||
DO_(args) { value = args[1].to_long(); specified = true; });
|
||||
OPTION__(report_t, total_width_,
|
||||
bool specified;
|
||||
CTOR(report_t, total_width_) {
|
||||
on_with(none, 12L);
|
||||
specified = false;
|
||||
}
|
||||
CTOR(report_t, total_width_) { specified = false; }
|
||||
DO_(args) { value = args[1].to_long(); specified = true; });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ reg --wide
|
|||
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35
|
||||
>>>1
|
||||
07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
|
||||
Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35
|
||||
0.350 VMMXX
|
||||
>>>2
|
||||
=== 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue