You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(files): close three find edge cases from review
- Keep context-sensitive lowercasing in the length-preserving case fold. A
word-final sigma lowercases differently in a string than on its own, so
folding character by character let one unrelated expanding code point change
how every sigma in the string matched. The fallback now reads each
character's replacement out of the whole-string result.
- Decline Cmd/Ctrl+F while a collaborative document is still seeding. The text
on screen then belongs to the read-only placeholder's editor, not the empty
hidden one find is attached to, so the bar answered "No results" for visible
text. The browser's native find reads the placeholder correctly in that
window; the shortcut becomes ours once the seed lands.
- Re-apply a pending term when the editor instance arrives, so a query typed
before TipTap mounts is searched instead of sitting at zero matches until the
next keystroke.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/find/find-extension.test.ts
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/find/use-markdown-find.ts
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,18 @@ export function useMarkdownFind({
105
105
}
106
106
},[editor,isOpen,syncTally])
107
107
108
+
/**
109
+
* Re-applies the live term to a newly arrived editor. `useEditor` returns null on the first render,
110
+
* so a term typed into the bar before the editor mounts would be held in React and never searched,
111
+
* leaving the bar at "No results" until the next keystroke pushed it through.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1215,14 +1215,20 @@ export function LoadedRichMarkdownEditor({
0 commit comments