mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Fix typo
This commit is contained in:
parent
5fe676efb6
commit
ec9ebb4f02
3
Changes
3
Changes
|
|
@ -7,6 +7,9 @@ v0.6.0 - UNRELEASED
|
|||
`CustomMatcher`. Use `InitialFilter` and `CustomFilter` instead.
|
||||
* Removed deprecated CLI option `--initial-matcher`.
|
||||
Use `--initial-filter` instead.
|
||||
* The action `ViewArround` has been renamed to `ViewAround` (fix typo).
|
||||
The old name still works but shows a deprecation notice. If you have
|
||||
`"ViewArround"` in your config, please update it to `"ViewAround"`.
|
||||
|
||||
v0.5.11 - 21 Mar 2023
|
||||
[Features]
|
||||
|
|
|
|||
|
|
@ -150,7 +150,8 @@ func init() {
|
|||
ActionFunc(doRefreshScreen).Register("RefreshScreen", keyseq.KeyCtrlL)
|
||||
ActionFunc(doToggleSingleKeyJump).Register("ToggleSingleKeyJump")
|
||||
|
||||
ActionFunc(doToggleViewArround).Register("ViewArround", keyseq.KeyCtrlV)
|
||||
ActionFunc(doToggleViewAround).Register("ViewAround", keyseq.KeyCtrlV)
|
||||
wrapDeprecated(doToggleViewAround, "ViewArround", "ViewAround").Register("ViewArround")
|
||||
|
||||
ActionFunc(doFreezeResults).Register("FreezeResults")
|
||||
ActionFunc(doUnfreezeResults).Register("UnfreezeResults")
|
||||
|
|
@ -744,9 +745,9 @@ func doToggleSingleKeyJump(ctx context.Context, state *Peco, e Event) {
|
|||
state.ToggleSingleKeyJumpMode(ctx)
|
||||
}
|
||||
|
||||
func doToggleViewArround(ctx context.Context, state *Peco, e Event) {
|
||||
func doToggleViewAround(ctx context.Context, state *Peco, e Event) {
|
||||
if pdebug.Enabled {
|
||||
g := pdebug.Marker("doToggleViewArround")
|
||||
g := pdebug.Marker("doToggleViewAround")
|
||||
defer g.End()
|
||||
}
|
||||
q := state.Query()
|
||||
|
|
|
|||
|
|
@ -163,6 +163,16 @@ func TestActionNames(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestViewAroundActionName(t *testing.T) {
|
||||
// The correct spelling "ViewAround" must be registered.
|
||||
_, ok := nameToActions["peco.ViewAround"]
|
||||
require.True(t, ok, "peco.ViewAround must be registered as an action name")
|
||||
|
||||
// The old misspelled name "ViewArround" must also work for backward compatibility.
|
||||
_, ok = nameToActions["peco.ViewArround"]
|
||||
require.True(t, ok, "peco.ViewArround must remain registered for backward compatibility")
|
||||
}
|
||||
|
||||
func expectCaretPos(t *testing.T, c *Caret, expect int) bool {
|
||||
return assert.Equal(t, expect, c.Pos(), "Expected caret position %d, got %d", expect, c.Pos())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue