From ea21bc207d8f80909b1171edb475629963dd7455 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 4 Dec 2014 00:48:48 +0100 Subject: [PATCH] fix, DCD completion half broken due to a typo --- src/ce_editor.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ce_editor.pas b/src/ce_editor.pas index 992e3392..dc8b107b 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -266,6 +266,7 @@ begin str.SaveToFile(ftempname); fname := ftempname; srcpos := fDoc.SelStart; + if srcpos > 0 then srcpos += -1; if fDoc.GetWordAtRowCol(fDoc.LogicalCaretXY) <> '' then ce_dcd.getSymbolLoc(fname, srcpos); if fname <> ftempname then if fileExists(fname) then @@ -293,7 +294,7 @@ begin fDoc.Lines.SaveToStream(str); str.SaveToFile(fname); srcpos := fDoc.SelStart; - if srcpos > 0 then srcpos -= -1; + if srcpos > 0 then srcpos += -1; completion.ItemList.Clear; ce_dcd.getCompletion(fname, srcpos, completion.ItemList); finally @@ -319,6 +320,7 @@ begin fDoc.Lines.SaveToStream(str); str.SaveToFile(fname); srcpos := fDoc.SelStart; + if srcpos > 0 then srcpos += -1; if fDoc.GetWordAtRowCol(fDoc.LogicalCaretXY) <> '' then ce_dcd.getHint(fname, srcpos, lst); result := lst.Text;