File tree Expand file tree Collapse file tree
src/extension/providers/completion Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ const _directives = new Set<string>([
2121 "uwsgi_ignore_headers" ,
2222 "uwsgi_pass_header" ,
2323] ) ;
24- export function _doesDirectiveNeedHttpHeader ( directive : string ) : boolean | number {
25- if ( ! _directives . has ( directive ) ) false ;
26- if ( directive . endsWith ( "s" ) ) return true ;
27- return 1 ;
24+ export function _doesDirectiveNeedHttpHeader ( directive : string ) : boolean {
25+ if ( ! _directives . has ( directive ) ) return false ;
26+ return true ;
2827}
2928
3029export function _completeHttpHeader ( document : TextDocument , position : Position , currentInput : string ) {
Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ export class NginxCompletionItemsProvider implements CompletionItemProvider {
9898
9999 const completePos = list . length - ( n ? 0 : 1 ) ;
100100 const completeHeaderPos = _doesDirectiveNeedHttpHeader ( list [ 0 ] ) ;
101- if ( completeHeaderPos === true || completePos === completeHeaderPos )
102- return _completeHttpHeader ( document , position , currentInput ) ;
101+ if ( completeHeaderPos === true ) return _completeHttpHeader ( document , position , currentInput ) ;
103102
104103 // other args
105104 if ( n && ! list [ 0 ] . startsWith ( "$" ) ) return _completeNameArgs ( list [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments