Changesets · Branches · Tags · Compare
| Changeset | b40c72ceceee3c8c5176258d95d0264cf38e4ffbe35da42b06001f30ba1837c7 |
|---|---|
| Author | Keerthana Panyam <panyam.k@northeastern.edu> · 2025-07-08 10:03 -04:00 |
| Committer | Keerthana Panyam <panyam.k@northeastern.edu> · 2025-07-08 10:03 -04:00 |
| Parents | b49f18a43c86 |
2 files changed
modified gui/src/components/mainInput/Lump/LumpToolbar/EditToolbar.tsx +1 −3
| @@ -30,9 +30,7 @@ | ||
| 30 | 30 | <span className="truncate"> |
| 31 | 31 | Editing:{" "} |
| 32 | 32 | <span className="italic"> |
| 33 | - {codeToEdit | |
| 34 | - ? getEditFilenameAndRangeText(codeToEdit) | |
| 35 | - : "⚠️ No file selected"} | |
| 33 | + {getEditFilenameAndRangeText(codeToEdit)} | |
| 36 | 34 | </span> |
| 37 | 35 | </span> |
| 38 | 36 | </div> |
modified gui/src/redux/thunks/edit.ts +8 −4
| @@ -133,6 +133,14 @@ | ||
| 133 | 133 | return; |
| 134 | 134 | } |
| 135 | 135 | |
| 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 | + | |
| 136 | 144 | dispatch(setMainEditorContentTrigger({})); |
| 137 | 145 | dispatch(setPreviousModeEditorContent(editorContent)); |
| 138 | 146 | |
| @@ -148,9 +156,5 @@ | ||
| 148 | 156 | ); |
| 149 | 157 | |
| 150 | 158 | dispatch(setIsInEdit(true)); |
| 151 | - | |
| 152 | - if (!state.editModeState.codeToEdit[0]) { | |
| 153 | - extra.ideMessenger.post("edit/addCurrentSelection", undefined); | |
| 154 | - } | |
| 155 | 159 | }, |
| 156 | 160 | ); |