teemperor added a comment.

In D81001#2188888 <https://reviews.llvm.org/D81001#2188888>, @gedatsu217 wrote:

> Although I thought of how to clear all the following characters, I did not 
> come up with it. So, I will try to fill the space. Should I add how many 
> spaces? If I add too many spaces, sequences will be two lines, but if  I add 
> a few spaces, I can't handle some of the cases.

It should be possible to keep track of how long the previous autosuggestion was 
and then print the difference between the current autosuggestion length and the 
previous one in spaces to clear the buffer. So, something like `spaces_to_print 
= line.size() + to_add.size - m_previous_autosuggestion_size` (and if that's 
positive we add that many spaces).

Also could you rebase the diff here when you have time (e.g., regenerate the 
diff from you changes on top of the latest master commit)? It no longer applies 
at the moment without having to manually resolve a conflict.



================
Comment at: lldb/include/lldb/Host/Editline.h:364
   void *m_completion_callback_baton = nullptr;
-
   std::mutex m_output_mutex;
----------------
Unrelated removed line.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81001/new/

https://reviews.llvm.org/D81001

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to