Compare commits

..
Author SHA1 Message Date
l0ng-ai d2d372e484 fix(editor): keep hover documentation inside its popup near the window edge
When little space is left above or below, CodeMirror caps the hover
tooltip's height, but the documentation section kept its own 380px
maximum and ran past the popup's border. The tooltip is now a flex
column whose sections shrink and scroll within it.
2026-11-12 19:12:36 +08:00
2 changed files with 1 additions and 19 deletions

No files matched your search

@@ -283,19 +283,6 @@ describe("commit inclusion", () => {
]);
});
it("leaves out a file added to the index and then deleted, which no group lists", () => {
const files = [fs("src/A.java", null, "modified"), fs("src/Gone.java", "added", "deleted")];
expect(
buildChangeTree(files, "/r", false)
.flatMap((g) => g.children ?? [])
.map((n) => n.label),
).toEqual(["A.java"]);
const plan = planCommit(files, new Map());
expect(plan.stage).toEqual(["/r/src/A.java"]);
expect(plan.exclude).toEqual(["/r/src/Gone.java"]);
expect(plan.included.map((f) => f.relPath)).toEqual(["src/A.java"]);
});
it("aggregates checkbox state for groups", () => {
const checks = new Map<string, CheckState>();
expect(aggregateCheck([status[0]!, status[3]!], checks)).toMatchObject({ checked: true, indeterminate: false });
+1 -6
View File
@@ -390,12 +390,7 @@ export function renamedFromPath(fs: FileStatus): string | null {
export function planCommit(status: readonly FileStatus[], checks: ReadonlyMap<string, CheckState>): CommitPlan {
const plan: CommitPlan = { stage: [], exclude: [], included: [], partial: [] };
for (const fs of status) {
if (!groupOf(fs)) {
// Listed nowhere, yet staged: added to the index, then deleted from disk. It is no
// change against HEAD, so the commit must not pick up the staged addition.
if (fs.staged && fs.staged !== "conflicted" && fs.unstaged !== "ignored") plan.exclude.push(stripSlash(fs.path));
continue;
}
if (!groupOf(fs)) continue;
const c = checkOf(fs, checks);
const path = stripSlash(fs.path);
if (c === "none") {