fixed:新增导致原始内容被覆盖

This commit is contained in:
LittleBoy 2024-11-11 21:13:11 +08:00
parent 70c0654a41
commit 76147498f4
7 changed files with 18 additions and 2 deletions

Binary file not shown.

View File

@ -640,6 +640,12 @@ namespace AIProofread
}
}
public void Focus()
{
// 使面板重新获取到焦点
Globals.ThisAddIn.ActiveDocument.FocusToPanel();
}
public string SaveCache(string cache, bool silent)
{
if (!silent)

View File

@ -734,9 +734,14 @@ namespace AIProofread.Model
return true;
}
internal void Save()
public void Save()
{
CurrentDocument.Save();
}
public void FocusToPanel()
{
TaskPane.Visible = true;
TaskPane.Control.Focus();
}
}
}

View File

@ -391,7 +391,12 @@ namespace AIProofread
c.Insert = sentence.Text;
if (sentence.Text == c.Insert)
{ // 比对原始内容与校对原文是否一致
{
if (item.Tag == "i")
{
return document.Range(offset + item.Start, offset + item.Start);
}
// 比对原始内容与校对原文是否一致
var range = document.Range(offset + item.Start, offset + item.End + 1);
//
if (range.Text == item.Origin) return range;