diff --git a/docs/commands.md b/docs/commands.md index bb4f15e293b..2488194679f 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -869,7 +869,7 @@ Redo the last undone action. ### Repeat -Repeats the last command. Repeats the last command. +Repeats the last command. Navigation and non-undoable commands are ignored, so Repeat always repeats the last command that changed the thoughtspace. diff --git a/src/commands/repeat.ts b/src/commands/repeat.ts index 17cdb272aa3..3885b95a879 100644 --- a/src/commands/repeat.ts +++ b/src/commands/repeat.ts @@ -4,7 +4,7 @@ import { noop } from '../constants' const repeatCommand = { id: 'repeat', label: 'Repeat' as const, - description: 'Repeats the last command. Repeats the last command.', + description: 'Repeats the last command.', keyboard: { key: '.', meta: true }, // Repeat has no multicursor behavior of its own. It is resolved to the last command before multicursor handling, so the repeated command's own multicursor behavior is applied. multicursor: false, diff --git a/src/components/__tests__/DesktopCommandUniverse.ts b/src/components/__tests__/DesktopCommandUniverse.ts new file mode 100644 index 00000000000..759a6600011 --- /dev/null +++ b/src/components/__tests__/DesktopCommandUniverse.ts @@ -0,0 +1,15 @@ +import { screen } from '@testing-library/react' +import { desktopCommandUniverseActionCreator as desktopCommandUniverse } from '../../actions/desktopCommandUniverse' +import createTestApp, { cleanupTestApp } from '../../test-helpers/createTestApp' +import dispatch from '../../test-helpers/dispatch' + +beforeEach(createTestApp) +afterEach(cleanupTestApp) + +// https://github.com/cybersemics/em/issues/6080 +it('shows the Repeat description once', async () => { + await dispatch(desktopCommandUniverse()) + + const description = screen.getByText(/^Repeats the last command\./) + expect(description).toHaveTextContent(/^Repeats the last command\.$/) +})