[Lldb-commits] [lldb] [lldb] Use the terminal height for paging editline completions (PR #119914)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 16 08:54:17 PST 2024


================
@@ -1026,21 +1045,15 @@ void Editline::DisplayCompletions(
 
   const size_t max_len = longest->GetCompletion().size();
 
-  if (results.size() < page_size) {
-    PrintCompletion(editline.m_output_file, results, max_len,
-                    editline.GetTerminalWidth());
-    return;
-  }
-
   size_t cur_pos = 0;
   while (cur_pos < results.size()) {
     size_t remaining = results.size() - cur_pos;
     size_t next_size = all ? remaining : std::min(page_size, remaining);
----------------
labath wrote:

I think you don't need this now, and could always just pass the remainder of the list.

https://github.com/llvm/llvm-project/pull/119914


More information about the lldb-commits mailing list