diff --git a/packages/hoppscotch-app/components/smart/EnvInput.vue b/packages/hoppscotch-app/components/smart/EnvInput.vue index 860b787f..69029c5c 100644 --- a/packages/hoppscotch-app/components/smart/EnvInput.vue +++ b/packages/hoppscotch-app/components/smart/EnvInput.vue @@ -29,10 +29,13 @@ import { placeholder as placeholderExt, ViewPlugin, ViewUpdate, + keymap, } from "@codemirror/view" import { EditorState, Extension } from "@codemirror/state" import clone from "lodash/clone" import { tooltips } from "@codemirror/tooltip" +import { history, historyKeymap } from "@codemirror/history" +import { defaultKeymap } from "@codemirror/commands" import { inputTheme } from "~/helpers/editor/themes/baseTheme" import { HoppReactiveEnvPlugin } from "~/helpers/editor/extensions/HoppEnvironment" import { useReadonlyStream } from "~/helpers/utils/composables" @@ -172,6 +175,8 @@ const initView = (el: any) => { } } ), + history(), + keymap.of([...defaultKeymap, ...historyKeymap]), ] view.value = new EditorView({