Subversion Repositories fastphp

Compare Revisions

Regard whitespace Rev 3 → Rev 4

/trunk/Functions.pas
4,8 → 4,14
 
uses
Windows, Messages, SysUtils, StrUtils, IniFiles, Classes, Forms, Variants, MsHTML,
SHDocVw, StdCtrls;
SHDocVw_TLB, StdCtrls, SynEdit,
 
 
 
 
 
dialogs;
 
function GetDosOutput(CommandLine: string; Work: string = ''): string;
function StrIPos(const SubStr, S: string): Integer;
procedure WaitForBrowser(WB: TWebbrowser);
15,7 → 21,7
procedure BrowseURL(WebBrowser1: TWebBrowser; url: string);
procedure BrowseContent(WebBrowser1: TWebBrowser; html: string);
function IsTextHTML(s: string): boolean;
function GetWordUnderCaret(AMemo: TMemo): string;
function GetWordUnderCaret(AMemo: TSynEdit): string;
function IsValidPHPExe(const exeFile: string): boolean;
 
implementation
323,7 → 329,7
end;
 
// Template: http://stackoverflow.com/questions/6339446/delphi-get-the-whole-word-where-the-caret-is-in-a-memo
function GetWordUnderCaret(AMemo: TMemo): string;
function GetWordUnderCaret(AMemo: TSynEdit): string;
 
function ValidChar(c: char): boolean;
begin
338,8 → 344,19
EndPos : Integer;
begin
//Get the caret position
(*
if AMemo is TMemo then
begin
Line := AMemo.Perform(EM_LINEFROMCHAR,AMemo.SelStart, 0) ;
Column := AMemo.SelStart - AMemo.Perform(EM_LINEINDEX, Line, 0) ;
end;
*)
if AMemo is TSynEdit then
begin
Line := AMemo.CaretY-1;
Column := AMemo.CaretX-1;
end;
 
//Validate the line number
if AMemo.Lines.Count-1 < Line then Exit;