summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--src/ui.cc7
2 files changed, 10 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 28387e8d..5742cf5b 100644
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,13 @@ Version 0.6.7 "I said 'Step pause turn
* [cmdline]: Use arch-qualified names in 'Provided by' for virtual
packages (LP: #972847)
+ * [curses]: Preview screen ignores Pkg-Display-Limit
+
+ Previously it would apply that limit if
+ UI::Preview-Limit was not set. This was causing
+ confusion and it is more useful to have these as two
+ clearly distinct settings. (LP: #381507)
+
- Build system changes:
* [all]: Include build of gtest when building gmock. (Closes: #670403)
diff --git a/src/ui.cc b/src/ui.cc
index 312cb8b4..a94ed97d 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -1374,10 +1374,9 @@ static void do_show_preview()
grp=new pkg_grouppolicy_mode_factory(new pkg_grouppolicy_end_factory);
}
- if(aptcfg->Exists(PACKAGE "::UI::Preview-Limit"))
- active_preview_tree=pkg_tree::create(grpstr.c_str(), grp, cw::util::transcode(aptcfg->Find(PACKAGE "::UI::Preview-Limit").c_str()));
- else
- active_preview_tree=pkg_tree::create(grpstr.c_str(), grp);
+ const std::wstring limitstr =
+ cw::util::transcode(aptcfg->Find(PACKAGE "::UI::Preview-Limit", ""));
+ active_preview_tree=pkg_tree::create(grpstr.c_str(), grp, limitstr.c_str());
active_preview=make_default_view(active_preview_tree,
&active_preview_tree->selected_signal,