From 6cbe0e8ab20650be6365be726f305e97af8c2f19 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 15 Jun 2025 18:01:46 +0300 Subject: [PATCH] Add 'toggle-top-bar' and 'toggle-line-index' commands --- src/command.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/command.go b/src/command.go index 6306005..bbef303 100644 --- a/src/command.go +++ b/src/command.go @@ -202,6 +202,20 @@ func initCommands() { }, } + toggleTopBar := Command{ + cmd: "toggle-top-bar", + run: func(window *Window, args ...string) { + window.ShowTopMenu = !window.ShowTopMenu + }, + } + + toggleLineIndex := Command{ + cmd: "toggle-line-index", + run: func(window *Window, args ...string) { + window.ShowLineIndex = !window.ShowLineIndex + }, + } + setStyleCmd := Command{ cmd: "set-style", run: func(window *Window, args ...string) { @@ -343,6 +357,8 @@ func initCommands() { commands["next-buffer"] = &nextBufferCmd commands["new-buffer"] = &newBufferCmd commands["close-buffer"] = &closeBufferCmd + commands["toggle-top-bar"] = &toggleTopBar + commands["toggle-line-index"] = &toggleLineIndex commands["set-style"] = &setStyleCmd commands["menu-file"] = &menuFileCmd commands["menu-edit"] = &menuEditCmd