mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-16 14:05:07 +03:00
Ignore LSP folds that are less or equal to 2 lines.
This commit is contained in:
@@ -404,8 +404,10 @@ void LSPDocumentClient::requestFoldRange() {
|
||||
return;
|
||||
std::vector<TextRange> regions;
|
||||
regions.reserve( res.size() );
|
||||
for ( const auto& region : res )
|
||||
regions.push_back( { { region.startLine, 0 }, { region.endLine, 0 } } );
|
||||
for ( const auto& region : res ) {
|
||||
if ( region.endLine - region.startLine > 1 )
|
||||
regions.push_back( { { region.startLine, 0 }, { region.endLine, 0 } } );
|
||||
}
|
||||
doc->getFoldRangeService().setFoldingRegions( regions );
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user