[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:16 PST 2024


================
@@ -1000,14 +1010,17 @@ PrintCompletion(FILE *output_file,
       if (position + description_length < max_length) {
         fprintf(output_file, "%.*s\n", static_cast<int>(description_length),
                 line.data());
+        lines_printed++;
----------------
labath wrote:

I suppose its not the end of the world, though it that case, it might be better to bail out here (and skip printing the rest of the description) instead of pushing the first completion off the screen (and if it fit on one line, the user wouldn't even know that it was there).

If this was c++20 I guess we could make this a coroutine which continues where it left off for the next page.

Up to you, I guess...

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


More information about the lldb-commits mailing list