[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-19 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-19 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH 1/6] [lldb] Improve editline completion formatting This

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-19 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,69 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + + +class EditlineCompletionsTest(PExpectTest): +@skipIfAsan +@skipIfEdit

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-19 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,69 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + + +class EditlineCompletionsTest(PExpectTest): +@skipIfAsan +@skipIfEdit

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Much better, thanks. https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,87 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_length) { + constexpr si

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,69 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + + +class EditlineCompletionsTest(PExpectTest): +@skipIfAsan +@skipIfEdit

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,69 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test.lldbpexpect import PExpectTest + + +class EditlineCompletionsTest(PExpectTest): +@skipIfAsan +@skipIfEdit

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,87 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_length) { + constexpr si

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread via lldb-commits
jimingham wrote: The change makes this more useful for completion, where you are more getting reminded than reading the whole help. LGTM. https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere ready_for_review https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH 1/5] [lldb] Improve editline completion formatting This

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH 1/4] [lldb] Improve editline completion formatting This

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r cdda76a8cfc3b0c5def836f68f6f58efba03e01c...5e0304fa539e7322984cd9962348724f293c1185 lldb/

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) Changes This patch improves the formatting of editline completions. The current implementation is naive and doesn't account for the terminal width. Concretely, the old implementation suffered from the follo

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH 1/3] [lldb] Improve editline completion formatting This

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH 1/2] [lldb] Improve editline completion formatting This

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: The string manipulations are fairly crude. I tried to suggest replacements using more advanced features. I'm not sure I got all of the offset calculations right, but I think they demonstrate the general idea, which is: - using existing printf features (e.g.

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { ---

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
@@ -927,12 +927,92 @@ unsigned char Editline::BufferEndCommand(int ch) { static void PrintCompletion(FILE *output_file, llvm::ArrayRef results, -size_t max_len) { +size_t max_completion_length, size_t max_lenght) { + + constexpr

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-18 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-15 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: I've made this a draft because this still needs a test. https://github.com/llvm/llvm-project/pull/116456 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-15 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/116456 >From 3434c7de701e4851b4eefe25f23e49d415ba4dd3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 15 Nov 2024 16:06:47 -0800 Subject: [PATCH] [lldb] Improve editline completion formatting This pat

[Lldb-commits] [lldb] [lldb] Improve editline completion formatting (PR #116456)

2024-11-15 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/116456 This patch improves the formatting of editline completions. The current implementation is naive and doesn't account for the terminal width. Concretely, the old implementation suffered from the following is