Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/check_copilot_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def index_repo_files(root: Path):


def parse_frontmatter(text: str):
# Strip UTF-8 BOM if present
if text.startswith("\ufeff"):
text = text[1:]
lines = text.splitlines()
fm = {}
if len(lines) >= 3 and lines[0].strip() == "---":
Expand Down Expand Up @@ -222,7 +225,7 @@ def validate_file(path: Path, repo_index: dict, verbose=False):
"current_tree": "",
"ok": True,
}
text = path.read_text(encoding="utf-8", errors="replace")
text = path.read_text(encoding="utf-8-sig", errors="replace")
fm, body = parse_frontmatter(text)
if not fm:
result["frontmatter"]["missing"] = [
Expand Down
2 changes: 1 addition & 1 deletion .github/detect_copilot_needed.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def top_level_src_folder(path: str):
def parse_frontmatter(path: Path) -> Tuple[Optional[Dict[str, str]], str]:
if not path.exists():
return None, ""
text = path.read_text(encoding="utf-8", errors="replace")
text = path.read_text(encoding="utf-8-sig", errors="replace")
lines = text.splitlines()
if len(lines) >= 3 and lines[0].strip() == "---":
end_idx = -1
Expand Down
2 changes: 1 addition & 1 deletion .github/plan_copilot_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def run_git(cmd: Sequence[str], cwd: Path) -> str:
def parse_frontmatter(path: Path) -> Tuple[Optional[Dict[str, str]], str]:
if not path.exists():
return None, ""
text = path.read_text(encoding="utf-8", errors="replace")
text = path.read_text(encoding="utf-8-sig", errors="replace")
lines = text.splitlines()
if len(lines) < 3 or lines[0].strip() != "---":
return None, text
Expand Down
5 changes: 4 additions & 1 deletion .github/scaffold_copilot_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def top_level_src_folder(path: str) -> Optional[str]:


def parse_frontmatter(text: str) -> Tuple[Optional[Dict[str, str]], str]:
# Strip UTF-8 BOM if present
if text.startswith("\ufeff"):
text = text[1:]
lines = text.splitlines()
if len(lines) >= 3 and lines[0].strip() == "---":
end_idx = -1
Expand Down Expand Up @@ -230,7 +233,7 @@ def ensure_copilot_doc(
) -> Tuple[str, Optional[str]]:
copath = folder / "AGENTS.md"
if copath.exists():
original = copath.read_text(encoding="utf-8", errors="replace")
original = copath.read_text(encoding="utf-8-sig", errors="replace")
else:
original = ""
try:
Expand Down
4 changes: 2 additions & 2 deletions Src/FwCoreDlgs/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
last-reviewed: 2025-10-31
last-reviewed-tree: 686f899291d7c6b63b4532a7d7d32a41b409d3198444a91f4ba68020df7a99ac
last-reviewed: 2026-02-20
last-reviewed-tree: c84b4a50fb902fe4b7c3d7cb91e9d38297e7bd079b969d9400080c016ebf0078
status: draft
---
anchors:
Expand Down
3 changes: 2 additions & 1 deletion Src/FwCoreDlgs/FwFindReplaceDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2643,11 +2643,12 @@ public void ApplyWS(FwTextBox fwTextBox, int hvoWs)
{
CheckDisposed();

// Select the text before applying WS (LT-21845).
fwTextBox.Select();
fwTextBox.ApplyWS(hvoWs);
if (chkMatchWS.Enabled)
chkMatchWS.Checked = true;
SetFormatLabels();
fwTextBox.Select();
}

/// ------------------------------------------------------------------------------------
Expand Down
Loading