Fixed syntax highlighting issues when inserting or removing multi-line comments.

Added support for ranged semantic highlighting, improving performance for LSPs that support ranges but not fullDelta changes.
This commit is contained in:
Martín Lucas Golini
2023-04-14 20:52:29 -03:00
parent 0b3dea6595
commit 0886aded95
7 changed files with 34 additions and 9 deletions

View File

@@ -88,6 +88,7 @@ class EE_API TextDocument {
}
virtual void onDocumentSyntaxDefinitionChange( const SyntaxDefinition& ) {}
virtual void onDocumentLineMove( const Int64& /*fromLine*/, const Int64& /*numLines*/ ){};
virtual TextRange getVisibleRange() const { return {}; };
};
TextDocument( bool verbose = true );
@@ -560,6 +561,8 @@ class EE_API TextDocument {
void setMightBeBinary( bool mightBeBinary );
TextRange getActiveClientVisibleRange() const;
protected:
friend class UndoStack;

View File

@@ -523,6 +523,8 @@ class EE_API UICodeEditor : public UIWidget, public TextDocument::Client {
std::pair<Uint64, Uint64> getVisibleLineRange() const;
virtual TextRange getVisibleRange() const;
bool isLineVisible( const Uint64& line ) const;
int getVisibleLinesCount() const;