Skip to content

Commit 8018ba4

Browse files
committed
feat: nextMatchFromCursor, prevMatchFromCursor
1 parent 9e455f4 commit 8018ba4

File tree

6 files changed

+79
-3
lines changed

6 files changed

+79
-3
lines changed

docs-master/Config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,8 @@ keybinding:
612612
focusMainView: "0"
613613
nextMatch: "n"
614614
prevMatch: "N"
615+
nextMatchFromCursor: ""
616+
prevMatchFromCursor: ""
615617
startSearch: /
616618
optionMenu: <disabled>
617619
optionMenu-alt1: '?'

pkg/config/user_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ type KeybindingUniversalConfig struct {
444444
FocusMainView string `yaml:"focusMainView"`
445445
NextMatch string `yaml:"nextMatch"`
446446
PrevMatch string `yaml:"prevMatch"`
447+
NextSearchMatchFromCursor string `yaml:"nextMatchFromCursor"`
448+
PrevSearchMatchFromCursor string `yaml:"prevMatchFromCursor"`
447449
StartSearch string `yaml:"startSearch"`
448450
OptionMenu string `yaml:"optionMenu"`
449451
OptionMenuAlt1 string `yaml:"optionMenu-alt1"`

pkg/gui/gui.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ func (gui *Gui) onUserConfigLoaded() error {
456456
gui.g.SearchEscapeKey = keybindings.GetKey(userConfig.Keybinding.Universal.Return)
457457
gui.g.NextSearchMatchKey = keybindings.GetKey(userConfig.Keybinding.Universal.NextMatch)
458458
gui.g.PrevSearchMatchKey = keybindings.GetKey(userConfig.Keybinding.Universal.PrevMatch)
459+
gui.g.NextSearchMatchFromCursorKey = keybindings.GetKey(userConfig.Keybinding.Universal.NextSearchMatchFromCursor)
460+
gui.g.PrevSearchMatchFromCursorKey = keybindings.GetKey(userConfig.Keybinding.Universal.PrevSearchMatchFromCursor)
459461

460462
gui.g.ShowListFooter = userConfig.Gui.ShowListFooter
461463

schema-master/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,14 @@
13581358
"type": "string",
13591359
"default": "N"
13601360
},
1361+
"nextMatchFromCursor": {
1362+
"type": "string",
1363+
"default": "n"
1364+
},
1365+
"prevMatchFromCursor": {
1366+
"type": "string",
1367+
"default": "p"
1368+
},
13611369
"startSearch": {
13621370
"type": "string",
13631371
"default": "/"

vendor/github.com/jesseduffield/gocui/gui.go

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/jesseduffield/gocui/view.go

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)