Minor clean up in TCPSocket and set timeout on HTTP socket connections.

LSP list view always selects first item.
This commit is contained in:
Martín Lucas Golini
2024-07-05 01:37:50 -03:00
parent 7f90b5afb3
commit a9de765b60
5 changed files with 11 additions and 9 deletions

View File

@@ -533,7 +533,6 @@ void LSPClientPlugin::createListView( UICodeEditor* editor, const std::shared_pt
lv->addClass( "editor_listview" );
auto pos =
editor->getRelativeScreenPosition( editor->getDocumentRef()->getSelection().start() );
lv->setSelection( model->index( 0, 0 ) );
lv->setPixelsPosition( { pos.x, pos.y + editor->getLineHeight() } );
if ( !lv->getParent()->getLocalBounds().contains(
lv->getLocalBounds().setPosition( lv->getPixelsPosition() ) ) ) {
@@ -554,6 +553,7 @@ void LSPClientPlugin::createListView( UICodeEditor* editor, const std::shared_pt
ScrollBarMode::AlwaysOff );
if ( onCreateCb )
onCreateCb( lv );
lv->setSelection( model->index( 0 ) );
lv->setFocus();
Uint32 focusCb = lv->getUISceneNode()->getUIEventDispatcher()->addFocusEventCallback(
[lv]( const auto&, Node* focus, Node* ) {