diff --git a/docs/widgets_options_editor.md b/docs/widgets_options_editor.md index b7882096..4fe75055 100644 --- a/docs/widgets_options_editor.md +++ b/docs/widgets_options_editor.md @@ -16,11 +16,11 @@ The options are applied in real time but are reversible until the green checker - : Validates the modifications made to the current category, after what they can't be canceled anymore. - : Cancels and restores the previous state of the current category. -The options are persistent and saved in a distinct folder: +The options are persistent and saved in a specific folder: - Linux: **`/home//.config/Coedit/`**. - Windows: **`?:\Users\\AppData\Roaming\Coedit\`**. -Each widget and software component save their own files with a self-explanatory name so it's easy to find and modify the file that matches a particular setting. \ No newline at end of file +Each software component saves its own file with a self-explanatory name so it's easy to find and modify the file that matches a particular setting. \ No newline at end of file diff --git a/docs/widgets_todo_list.md b/docs/widgets_todo_list.md index f7defc26..c465c6f7 100644 --- a/docs/widgets_todo_list.md +++ b/docs/widgets_todo_list.md @@ -16,7 +16,7 @@ When no source file is opened but a project is, the widget displays the comments When a source file has the focus and if it is not part of the project then the widget only displays the items located in this file. Otherwise if a file has the focus and if it's part of the project then the whole project *todos* are displayed. -It's possible to jump to a particular item in its file with a double click. +It's possible to display the comment that matches to a particular item with a double click. The items cannot be edited in the widget. - : Refreshes the list manually. diff --git a/lazproj/coedit.lpi b/lazproj/coedit.lpi index b7b260fb..2a6182fb 100644 --- a/lazproj/coedit.lpi +++ b/lazproj/coedit.lpi @@ -549,7 +549,7 @@ - + diff --git a/src/ce_ceproject.pas b/src/ce_ceproject.pas index dbf77afb..9a51ff7c 100644 --- a/src/ce_ceproject.pas +++ b/src/ce_ceproject.pas @@ -526,7 +526,7 @@ end; procedure TCENativeProject.checkMissingFiles; var - hasPatched: Boolean; + hasPatched: Boolean = false; // either all the source files have moved or only the project file procedure checkMissingAllSources; var diff --git a/src/ce_dcd.pas b/src/ce_dcd.pas index 4b765a7b..76ebbeda 100644 --- a/src/ce_dcd.pas +++ b/src/ce_dcd.pas @@ -442,7 +442,7 @@ var i: Integer; kind: Char; item: string; - kindObj: TObject; + kindObj: TObject = nil; begin if not fAvailable then exit; if not fServerListening then exit; diff --git a/src/ce_ddemangle.pas b/src/ce_ddemangle.pas index d302ff10..59bf445e 100644 --- a/src/ce_ddemangle.pas +++ b/src/ce_ddemangle.pas @@ -72,7 +72,8 @@ var begin init; fDone := false; - fProc.Input.Write(value[1], value.length); + if value.isNotEmpty then + fProc.Input.Write(value[1], value.length); fProc.Input.WriteByte(10); while not fDone do begin diff --git a/src/ce_gdb.pas b/src/ce_gdb.pas index c3bc8ce3..7cf5851c 100644 --- a/src/ce_gdb.pas +++ b/src/ce_gdb.pas @@ -1594,7 +1594,7 @@ end; procedure TCEGdbWidget.startDebugging; var - str: string; + str: string = ''; gdb: string; i: integer; b: TPersistentBreakPoint; @@ -1671,10 +1671,13 @@ begin begin b := fBreakPoints[i]; case b.kind of - bpkBreak: str := 'break ' + b.filename + ':' + intToStr(b.line) + #10; + bpkBreak: + begin + str := 'break ' + b.filename + ':' + intToStr(b.line) + #10; + fGdb.Input.Write(str[1], str.length); + end; bpkWatch: {TODO-cGDB: put watchpoint from persistent}; end; - fGdb.Input.Write(str[1], str.length); end; gdbCommand('set disassembly-flavor ' + asmFlavorStr[fOptions.asmSyntax]); // break on druntime exceptions + any throw' @@ -1845,7 +1848,8 @@ procedure parseGdbout(const str: string; var json: TJSONObject); procedure parseProperty(node: TJSONObject; r: PStringRange); var - idt,v: string; + idt: string = ''; + v: string; c: char; begin while true do @@ -2000,7 +2004,7 @@ var arr: TJSONArray; k: TListItem; // common data - nme: string; + nme: string = ''; reason: string; addr: PtrUint = 0; func:string = ''; diff --git a/src/ce_halstead.pas b/src/ce_halstead.pas index ec877cc9..506e4ee0 100644 --- a/src/ce_halstead.pas +++ b/src/ce_halstead.pas @@ -215,6 +215,7 @@ procedure THalsteadMetrics.Measure(document: TCESynMemo); case fBugCountMethod of pow23div3000: bgs := power(eff, 0.666667) / 3000; div3000: bgs := eff / 3000; + else bgs := 0; end; bugsSum += bgs; diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index 8967365a..dbb228dc 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -768,7 +768,7 @@ end; procedure TCELibManEditorWidget.btnSelRootClick(Sender: TObject); var - dir, outdir: string; + dir: string; begin if List.Selected.isNil then exit; diff --git a/src/ce_stringrange.pas b/src/ce_stringrange.pas index 1390250d..bb1d19b2 100644 --- a/src/ce_stringrange.pas +++ b/src/ce_stringrange.pas @@ -108,6 +108,7 @@ end; function TStringRange.init(const str: string): PStringRange; begin + Result := @self; ptr := nil; pos := 0; len := 0; @@ -116,7 +117,6 @@ begin ptr := @str[1]; pos := 0; len := length(str); - Result := @self; end; function TStringRange.init(const pchr: PChar; length: integer): PStringRange; diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index f1dd3ba3..a7a2406c 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -1440,7 +1440,7 @@ procedure TCESynMemo.ShowPhobosDoc; var str: string; pth: string; - idt: string; + idt: string = ''; pos: integer; len: integer; sum: integer; @@ -2132,8 +2132,8 @@ var i: integer; p: integer; c: integer = 0; - tok: PLexToken; - ton: PLexToken; + tok: PLexToken = nil; + ton: PLexToken = nil; bet: boolean; begin p := SelStart; diff --git a/src/ce_tools.pas b/src/ce_tools.pas index 5b79f028..4b461d72 100644 --- a/src/ce_tools.pas +++ b/src/ce_tools.pas @@ -398,7 +398,7 @@ end; procedure TCETools.executeTool(tool: TCEToolItem); var - txt: string; + txt: string = ''; begin if tool.isNil then exit; // @@ -412,7 +412,8 @@ begin pikLine: txt := fDoc.LineText; pikSelection: txt := fDoc.SelText; end; - tool.fProcess.Input.Write(txt[1], txt.length); + if txt.isNotEmpty then + tool.fProcess.Input.Write(txt[1], txt.length); tool.fProcess.CloseInput; end; end;