Elffuss BraidHub

kikocis/continue public

Merge pull request #6495 from panyamkeerthana/panyamkeerthana/chat_editor_freeze

fix: prevent UI freeze when ⌘I pressed without active editor
Changesetc71f1eb00d9f6706b680119ce7c63502bf973d19dba843aa874d5d840c0efb86
AuthorPatrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-07-09 09:43 -07:00
CommitterGitHub <noreply@github.com> · 2025-07-09 09:43 -07:00
Parents1686aa828e85, b40c72ceceee

Browse the files at this changeset

2 files changed

modified gui/src/components/mainInput/Lump/LumpToolbar/EditToolbar.tsx +1 −1
@@ -28,7 +28,7 @@
2828 Back to {mode.charAt(0).toUpperCase() + mode.slice(1)}
2929 </span>
3030 <span className="truncate">
31- Editing{" "}
31+ Editing:{" "}
3232 <span className="italic">
3333 {getEditFilenameAndRangeText(codeToEdit)}
3434 </span>
modified gui/src/redux/thunks/edit.ts +8 −4
@@ -133,6 +133,14 @@
133133 return;
134134 }
135135
136+ if (!state.editModeState.codeToEdit[0]) {
137+ extra.ideMessenger.post("showToast", [
138+ "info",
139+ "Please open a file to use Edit mode",
140+ ]);
141+ return;
142+ }
143+
136144 dispatch(setMainEditorContentTrigger({}));
137145 dispatch(setPreviousModeEditorContent(editorContent));
138146
@@ -148,9 +156,5 @@
148156 );
149157
150158 dispatch(setIsInEdit(true));
151-
152- if (!state.editModeState.codeToEdit[0]) {
153- extra.ideMessenger.post("edit/addCurrentSelection", undefined);
154- }
155159 },
156160 );