SynEdit: prevent syncro mode from being wrongly started, if no word pairs exist. Issue #16522

git-svn-id: trunk@25525 -
This commit is contained in:
martin 2010-05-20 00:44:49 +00:00
parent f607c5ba28
commit 1624eca2ae

View File

@ -1000,6 +1000,7 @@ begin
exit; exit;
end; end;
FEditModeQueued := False; FEditModeQueued := False;
if FWordIndex.MultiWordCount = 0 then exit;
FMode := spseEditing; FMode := spseEditing;
AreaMarkupEnabled := True; AreaMarkupEnabled := True;
@ -1339,6 +1340,7 @@ begin
if Handled or AfterProcessing or not Active then exit; if Handled or AfterProcessing or not Active then exit;
if FMode = spseSelecting then begin if FMode = spseSelecting then begin
// todo: finish word-hash calculations / check if any cells exist
Cmd := ConvertCommandToBaseSel(Command); Cmd := ConvertCommandToBaseSel(Command);
Handled := True; Handled := True;
case Cmd of case Cmd of