summaryrefslogtreecommitdiff
path: root/src/precmd.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-23 19:31:06 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-23 19:31:06 -0400
commiteda6cbd0146d371653feec70e0eb3ee4e4c56379 (patch)
treeaeb4e1ace0f9b284789f66f3ceb30bed66946b93 /src/precmd.cc
parent014fde3418783d1ee1ec7fe4ea6c8b04ae7f6cd8 (diff)
parent93807fade69dd4f0ec575eda78fe1a77a85c24e3 (diff)
downloadfork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.tar.gz
fork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.tar.bz2
fork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.zip
Merge branch 'next'
Diffstat (limited to 'src/precmd.cc')
-rw-r--r--src/precmd.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/precmd.cc b/src/precmd.cc
index 95f3e875..8ca27fd8 100644
--- a/src/precmd.cc
+++ b/src/precmd.cc
@@ -200,26 +200,23 @@ value_t query_command(call_scope_t& args)
args.value().dump(out);
out << std::endl << std::endl;
- query_t query(args.value(), report.what_to_keep());
- if (query) {
+ query_t query(args.value(), report.what_to_keep(),
+ ! report.HANDLED(collapse));
+ if (query.has_query(query_t::QUERY_LIMIT)) {
call_scope_t sub_args(static_cast<scope_t&>(args));
- sub_args.push_back(string_value(query.text()));
+ sub_args.push_back(string_value(query.get_query(query_t::QUERY_LIMIT)));
parse_command(sub_args);
}
- if (query.tokens_remaining()) {
+ if (query.has_query(query_t::QUERY_SHOW)) {
out << std::endl << _("====== Display predicate ======")
<< std::endl << std::endl;
- query.parse_again();
+ call_scope_t disp_sub_args(static_cast<scope_t&>(args));
+ disp_sub_args.push_back(string_value(query.get_query(query_t::QUERY_SHOW)));
- if (query) {
- call_scope_t disp_sub_args(static_cast<scope_t&>(args));
- disp_sub_args.push_back(string_value(query.text()));
-
- parse_command(disp_sub_args);
- }
+ parse_command(disp_sub_args);
}
return NULL_VALUE;