Changesets · Branches · Tags · Compare
| Changeset | c71f1eb00d9f6706b680119ce7c63502bf973d19dba843aa874d5d840c0efb86 |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-07-09 09:43 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-09 09:43 -07:00 |
| Parents | 1686aa828e85, b40c72ceceee |
2 files changed
modified gui/src/components/mainInput/Lump/LumpToolbar/EditToolbar.tsx +1 −1
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 | Back to {mode.charAt(0).toUpperCase() + mode.slice(1)} |
| 29 | 29 | </span> |
| 30 | 30 | <span className="truncate"> |
| 31 | - Editing{" "} | |
| 31 | + Editing:{" "} | |
| 32 | 32 | <span className="italic"> |
| 33 | 33 | {getEditFilenameAndRangeText(codeToEdit)} |
| 34 | 34 | </span> |
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 | ); |