File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -367,10 +367,14 @@ void LuaEditorConfig::ParseFromSection(std::shared_ptr<LuaCodeStyleOptions> opti
367367 options->detect_end_of_line = configMap.at (" detect_end_of_line" ) == " true" ;
368368 }
369369
370- if (configMap.count (" max_line_length" )
371- && isNumber (configMap.at (" max_line_length" )))
370+ if (configMap.count (" max_line_length" ))
372371 {
373- options->max_line_length = std::stoi (configMap.at (" max_line_length" ));
372+ if (isNumber (configMap.at (" max_line_length" ))) {
373+ options->max_line_length = std::stoi (configMap.at (" max_line_length" ));
374+ }
375+ else if (configMap.at (" max_line_length" ) == " unset" ){
376+ options->max_line_length = std::numeric_limits<int >::max ();
377+ }
374378 }
375379
376380 if (configMap.count (" enable_check_codestyle" ))
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ keep_line_after_expression_statement = keepLine
7474# [diagnostic]
7575# the following is code diagnostic options
7676enable_check_codestyle = true
77- # this mean utf8 length
77+ # this mean utf8 length , if this is 'unset' then the line width is no longer checked
7878max_line_length = 120
7979# this will check text end with new line(format always end with new line)
8080insert_final_newline = true
You can’t perform that action at this time.
0 commit comments