Commit c51d1cc
patch 9.1.1825: completion: flicker when LSP server is slow
Problem: completion: flicker when LSP server is slow
Solution: reinsert leader text before invoking user function
(Girish Palya)
Reference:
girishji/vimcomplete#101 (comment)
In insert-mode completion, the leader text is temporarily removed while
searching for candidates. When the LSP server responds slowly, the
client may call `:sleep` to wait, which triggers `out_flush()`. This
causes the deleted text to disappear briefly before being redrawn,
resulting in visible flicker.
This commit reinserts the leader text before invoking the user function,
and removes it again afterward to eliminate flicker.
closes: #18468
Signed-off-by: Girish Palya <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>1 parent 420923c commit c51d1cc
3 files changed
+27
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7690 | 7690 | | |
7691 | 7691 | | |
7692 | 7692 | | |
7693 | | - | |
| 7693 | + | |
| 7694 | + | |
7694 | 7695 | | |
7695 | 7696 | | |
7696 | 7697 | | |
7697 | 7698 | | |
7698 | 7699 | | |
7699 | 7700 | | |
| 7701 | + | |
| 7702 | + | |
| 7703 | + | |
| 7704 | + | |
| 7705 | + | |
| 7706 | + | |
7700 | 7707 | | |
7701 | 7708 | | |
7702 | | - | |
7703 | | - | |
| 7709 | + | |
| 7710 | + | |
| 7711 | + | |
| 7712 | + | |
7704 | 7713 | | |
7705 | 7714 | | |
7706 | 7715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
590 | 594 | | |
591 | 595 | | |
592 | | - | |
593 | | - | |
| 596 | + | |
| 597 | + | |
594 | 598 | | |
595 | 599 | | |
596 | | - | |
597 | | - | |
| 600 | + | |
| 601 | + | |
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
601 | 605 | | |
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 609 | + | |
| 610 | + | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 614 | + | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| |||
4128 | 4128 | | |
4129 | 4129 | | |
4130 | 4130 | | |
4131 | | - | |
4132 | 4131 | | |
4133 | 4132 | | |
4134 | 4133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
| 733 | + | |
732 | 734 | | |
733 | 735 | | |
734 | 736 | | |
| |||
0 commit comments