chore: removed some todos

This commit is contained in:
Hayden Hargreaves 2026-03-06 18:20:19 -07:00
parent c126242ee1
commit 15d847e3c8
5 changed files with 4 additions and 8 deletions

View File

@ -264,7 +264,7 @@
Buffers are in-memory representations of files. A buffer exists for each open file. Buffers are in-memory representations of files. A buffer exists for each open file.
### Buffer Model ### Buffer Model
- [ ] Buffer struct (id, filename, lines, modified flag, cursor position) - [x] Buffer struct (id, filename, lines, modified flag, cursor position)
- [ ] Buffer list/manager - [ ] Buffer list/manager
- [ ] Current buffer tracking - [ ] Current buffer tracking
- [ ] Buffer-local settings (tabstop, filetype, etc.) - [ ] Buffer-local settings (tabstop, filetype, etc.)

View File

@ -137,7 +137,6 @@ func (a CommandExecute) Execute(m Model) tea.Cmd {
cmd, err := a.Registry.Execute(m, cmdLine) cmd, err := a.Registry.Execute(m, cmdLine)
if err != nil { if err != nil {
// TODO: Display error message to user
m.SetCommandError(err) m.SetCommandError(err)
return nil return nil
} }

View File

@ -1,6 +1,5 @@
package core package core
// TODO: No more global settings, window-wide settings
type WinOptions struct { type WinOptions struct {
Number bool Number bool
RelativeNumber bool RelativeNumber bool
@ -44,10 +43,7 @@ type Window struct {
// of the content or attempt to be "above" the content (negative value). // of the content or attempt to be "above" the content (negative value).
func (w *Window) clampCursor() { func (w *Window) clampCursor() {
// Clamp line to valid range [0, lineCount-1] // Clamp line to valid range [0, lineCount-1]
maxLine := w.Buffer.LineCount() - 1 maxLine := max(w.Buffer.LineCount()-1, 0)
if maxLine < 0 {
maxLine = 0 // Empty buffer edge case
}
if w.Cursor.Line < 0 { if w.Cursor.Line < 0 {
w.Cursor.Line = 0 w.Cursor.Line = 0
} else if w.Cursor.Line > maxLine { } else if w.Cursor.Line > maxLine {

View File

@ -10,6 +10,7 @@ import (
) )
// NOTE: Lots of this actually sucks ass, but it works for now... // NOTE: Lots of this actually sucks ass, but it works for now...
// TODO: Refactor this to implement the builder pattern
// sendKeys sends a sequence of keys to the test model // sendKeys sends a sequence of keys to the test model
func sendKeys(tm *teatest.TestModel, keys ...string) { func sendKeys(tm *teatest.TestModel, keys ...string) {

View File

@ -41,7 +41,7 @@ type Model struct {
commandError error commandError error
commandOutput string commandOutput string
// Global settings (TODO: This needs to be refactored) // Global settings
settings core.EditorSettings settings core.EditorSettings
// Registers // Registers