From 27d40ffd2d99deb56366cb3b2ccd0413197f9708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D0=BD=D0=B4=D0=B0=D1=80=D0=B5=D0=B2=20=D0=98?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD?= Date: Mon, 10 Jun 2019 12:44:01 +0200 Subject: [PATCH] folding of multiline enums --- CodeCompletion/DomSyntaxTreeVisitor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index 6a018ea60..7cd993af3 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -1970,6 +1970,12 @@ namespace CodeCompletion ts.topScope = cur_scope; ts.declaringUnit = entry_scope; //ts.si.describe = "type "+ret_tn.si.name+" = "+ret_tn.si.describe; + if (_type_declaration.type_def is enum_type_definition && ts.loc.begin_line_num != ts.loc.end_line_num) + { + location loc = get_location(_type_declaration.type_def); + ts.head_loc = new location(loc.begin_line_num, loc.begin_column_num, loc.begin_line_num, loc.begin_column_num, doc); + ts.body_loc = loc; + } cur_scope.AddName(_type_declaration.type_name.name, ts); if (add_doc_from_text && this.converter.controller.docs != null && this.converter.controller.docs.ContainsKey(_type_declaration)) ts.AddDocumentation(this.converter.controller.docs[_type_declaration]);