mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 15:49:32 +01:00 
			
		
		
		
	codetools: identifier completion: request semicolon even for statement starts
git-svn-id: trunk@26454 -
This commit is contained in:
		
							parent
							
								
									1751469cc8
								
							
						
					
					
						commit
						97ae6679ec
					
				@ -2120,7 +2120,6 @@ begin
 | 
				
			|||||||
        begin
 | 
					        begin
 | 
				
			||||||
          // check if a semicolon is needed at the end
 | 
					          // check if a semicolon is needed at the end
 | 
				
			||||||
          if (not (ilcfNoEndSemicolon in CurrentIdentifierList.ContextFlags))
 | 
					          if (not (ilcfNoEndSemicolon in CurrentIdentifierList.ContextFlags))
 | 
				
			||||||
          and (not (ilcfStartOfStatement in CurrentIdentifierList.ContextFlags))
 | 
					 | 
				
			||||||
          then begin
 | 
					          then begin
 | 
				
			||||||
            // check if a semicolon is needed at the end
 | 
					            // check if a semicolon is needed at the end
 | 
				
			||||||
            if (CurPos.Flag in [cafEnd])
 | 
					            if (CurPos.Flag in [cafEnd])
 | 
				
			||||||
 | 
				
			|||||||
@ -650,6 +650,7 @@ begin
 | 
				
			|||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // add semicolon for statement ends
 | 
					  // add semicolon for statement ends
 | 
				
			||||||
 | 
					  //debugln(['GetIdentCompletionValue CanAddSemicolon=',CanAddSemicolon,' ilcfNoEndSemicolon=',ilcfNoEndSemicolon in IdentList.ContextFlags,' ']);
 | 
				
			||||||
  if CanAddSemicolon
 | 
					  if CanAddSemicolon
 | 
				
			||||||
  and (not (ilcfNoEndSemicolon in IdentList.ContextFlags))
 | 
					  and (not (ilcfNoEndSemicolon in IdentList.ContextFlags))
 | 
				
			||||||
  then begin
 | 
					  then begin
 | 
				
			||||||
@ -660,8 +661,8 @@ begin
 | 
				
			|||||||
      Result:=Result+';';
 | 
					      Result:=Result+';';
 | 
				
			||||||
      if (CursorToLeft=0) and (IdentItem.GetDesc=ctnProcedure)
 | 
					      if (CursorToLeft=0) and (IdentItem.GetDesc=ctnProcedure)
 | 
				
			||||||
      and (not IdentItem.IsFunction) then begin
 | 
					      and (not IdentItem.IsFunction) then begin
 | 
				
			||||||
        // a procedure call without paramters
 | 
					        // a procedure call without parameters
 | 
				
			||||||
        // put cursor behind semicolon
 | 
					        // => put cursor behind semicolon
 | 
				
			||||||
      end else begin
 | 
					      end else begin
 | 
				
			||||||
        // keep cursor in front of semicolon
 | 
					        // keep cursor in front of semicolon
 | 
				
			||||||
        inc(CursorToLeft);
 | 
					        inc(CursorToLeft);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user