Skip to content

Commit d117012

Browse files
committed
feat: Codemirror - update shortcut keys text for find and replace
1 parent abe5ae3 commit d117012

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Common/CodeMirror/CodeEditor.constants.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/typ
2020
export const PREVIOUS_MATCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = ['Shift', 'Enter']
2121
export const NEXT_MATCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = ['Enter']
2222
export const REPLACE_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = ['Enter']
23-
export const REPLACE_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = [IS_PLATFORM_MAC_OS ? 'Meta' : 'Control', 'Enter']
24-
export const SELECT_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = ['Alt', 'Enter']
23+
export const REPLACE_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = [
24+
IS_PLATFORM_MAC_OS ? 'Meta' : 'Control',
25+
'Alt',
26+
'Enter',
27+
]
2528
export const CLOSE_SEARCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = ['Escape']
2629

2730
export const READ_ONLY_TOOLTIP_TIMEOUT = 2000

src/Common/CodeMirror/Extensions/findAndReplace.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
PREVIOUS_MATCH_SHORTCUT_KEYS,
5050
REPLACE_ALL_SHORTCUT_KEYS,
5151
REPLACE_SHORTCUT_KEYS,
52-
SELECT_ALL_SHORTCUT_KEYS,
5352
} from '../CodeEditor.constants'
5453
import { getFindReplaceToggleButtonIconClass, getUpdatedSearchMatchesCount } from '../utils'
5554

@@ -322,10 +321,7 @@ const FindReplace = ({ view, defaultQuery }: FindReplaceProps) => {
322321
onClick={onSelectAllClick}
323322
showTooltip
324323
tooltipProps={{
325-
shortcutKeyCombo: {
326-
text: 'Select All',
327-
combo: SELECT_ALL_SHORTCUT_KEYS,
328-
},
324+
content: 'Select All',
329325
placement: 'bottom',
330326
}}
331327
/>

0 commit comments

Comments
 (0)