Johan Rong před 17 hodinami
rodič
revize
3cf41db02c

+ 0 - 2
internal/editor/config.go

@@ -54,5 +54,3 @@ func DefaultConfig() Config {
 
 	return config
 }
-
-

+ 3 - 3
internal/editor/draw.go

@@ -87,7 +87,7 @@ func (m *Model) DrawPalette(rect layout.Rect) {
 	strWorkspaces := make([]string, len(populatedWorkspaces))
 
 	for i, v := range populatedWorkspaces {
-	    strWorkspaces[i] = strconv.Itoa(v)
+		strWorkspaces[i] = strconv.Itoa(v)
 	}
 
 	workspacesStr := strings.Join(strWorkspaces, " ")
@@ -95,8 +95,8 @@ func (m *Model) DrawPalette(rect layout.Rect) {
 	m.Screen.PutStrStyled(1, rect.Y, workspacesStr, m.Config.StyleDefault.Foreground(tcell.GetColor(m.Config.Colors.WorkspaceForeground)).Background(tcell.GetColor(m.Config.Colors.WorkspaceBackground)))
 
 	for idx, workspace := range populatedWorkspaces {
-		if workspace == m.LM.ActiveIdx + 1 {
-			m.Screen.SetContent(idx * 2 + 1, rect.Y, '0' + rune(m.LM.ActiveIdx + 1), nil, m.Config.StyleDefault.Background(tcell.GetColor(m.Config.Colors.WorkspaceBackgroundActive)).Foreground(tcell.GetColor(m.Config.Colors.WorkspaceForegroundActive)))
+		if workspace == m.LM.ActiveIdx+1 {
+			m.Screen.SetContent(idx*2+1, rect.Y, '0'+rune(m.LM.ActiveIdx+1), nil, m.Config.StyleDefault.Background(tcell.GetColor(m.Config.Colors.WorkspaceBackgroundActive)).Foreground(tcell.GetColor(m.Config.Colors.WorkspaceForegroundActive)))
 		}
 	}
 

+ 2 - 1
internal/editor/model.go

@@ -1,9 +1,10 @@
 package editor
 
 import (
-	"github.com/gdamore/tcell/v3"
 	"moose/internal/buffer"
 	"moose/internal/layout"
+
+	"github.com/gdamore/tcell/v3"
 )
 
 type Model struct {

+ 3 - 2
internal/extension/syntax.go

@@ -1,8 +1,9 @@
 package extension
 
 import (
-	lua "github.com/yuin/gopher-lua"
 	"moose/internal/extension/highlight"
+
+	lua "github.com/yuin/gopher-lua"
 )
 
 func GetSyntaxTable(em *ExtensionManager) *lua.LTable {
@@ -40,4 +41,4 @@ func luaRegisterLanguage(L *lua.LState) int {
 	}
 
 	return 0
-}
+}