mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
fix: spacebar keybinding is now "space" instead of a literal space
This commit is contained in:
+1
-2
@@ -64,7 +64,6 @@ func (km KeyMap) FullHelp() [][]key.Binding {
|
||||
|
||||
// DefaultKeyMap returns a default set of keybindings.
|
||||
func DefaultKeyMap() KeyMap {
|
||||
const spacebar = " "
|
||||
return KeyMap{
|
||||
LineUp: key.NewBinding(
|
||||
key.WithKeys("up", "k"),
|
||||
@@ -79,7 +78,7 @@ func DefaultKeyMap() KeyMap {
|
||||
key.WithHelp("b/pgup", "page up"),
|
||||
),
|
||||
PageDown: key.NewBinding(
|
||||
key.WithKeys("f", "pgdown", spacebar),
|
||||
key.WithKeys("f", "pgdown", "space"),
|
||||
key.WithHelp("f/pgdn", "page down"),
|
||||
),
|
||||
HalfPageUp: key.NewBinding(
|
||||
|
||||
+1
-3
@@ -2,8 +2,6 @@ package viewport
|
||||
|
||||
import "github.com/charmbracelet/bubbles/v2/key"
|
||||
|
||||
const spacebar = " "
|
||||
|
||||
// KeyMap defines the keybindings for the viewport. Note that you don't
|
||||
// necessary need to use keybindings at all; the viewport can be controlled
|
||||
// programmatically with methods like Model.LineDown(1). See the GoDocs for
|
||||
@@ -21,7 +19,7 @@ type KeyMap struct {
|
||||
func DefaultKeyMap() KeyMap {
|
||||
return KeyMap{
|
||||
PageDown: key.NewBinding(
|
||||
key.WithKeys("pgdown", spacebar, "f"),
|
||||
key.WithKeys("pgdown", "space", "f"),
|
||||
key.WithHelp("f/pgdn", "page down"),
|
||||
),
|
||||
PageUp: key.NewBinding(
|
||||
|
||||
Reference in New Issue
Block a user