mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 01:38:01 +01:00
Split processing autocomplete and drawing it (#3662)
This commit is contained in:
@@ -1016,8 +1016,7 @@ public class TextField : View
|
||||
|
||||
RenderCaption ();
|
||||
|
||||
ProcessAutocomplete ();
|
||||
|
||||
DrawAutocomplete ();
|
||||
_isDrawing = false;
|
||||
}
|
||||
|
||||
@@ -1767,8 +1766,21 @@ public class TextField : View
|
||||
return;
|
||||
}
|
||||
|
||||
// draw autocomplete
|
||||
GenerateSuggestions ();
|
||||
}
|
||||
|
||||
private void DrawAutocomplete ()
|
||||
{
|
||||
|
||||
if (SelectedLength > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Autocomplete?.Context == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var renderAt = new Point (
|
||||
Autocomplete.Context.CursorPosition,
|
||||
|
||||
Reference in New Issue
Block a user