chore: removed some todos
This commit is contained in:
parent
c126242ee1
commit
15d847e3c8
@ -264,7 +264,7 @@
|
||||
Buffers are in-memory representations of files. A buffer exists for each open file.
|
||||
|
||||
### Buffer Model
|
||||
- [ ] Buffer struct (id, filename, lines, modified flag, cursor position)
|
||||
- [x] Buffer struct (id, filename, lines, modified flag, cursor position)
|
||||
- [ ] Buffer list/manager
|
||||
- [ ] Current buffer tracking
|
||||
- [ ] Buffer-local settings (tabstop, filetype, etc.)
|
||||
|
||||
@ -137,7 +137,6 @@ func (a CommandExecute) Execute(m Model) tea.Cmd {
|
||||
|
||||
cmd, err := a.Registry.Execute(m, cmdLine)
|
||||
if err != nil {
|
||||
// TODO: Display error message to user
|
||||
m.SetCommandError(err)
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package core
|
||||
|
||||
// TODO: No more global settings, window-wide settings
|
||||
type WinOptions struct {
|
||||
Number bool
|
||||
RelativeNumber bool
|
||||
@ -44,10 +43,7 @@ type Window struct {
|
||||
// of the content or attempt to be "above" the content (negative value).
|
||||
func (w *Window) clampCursor() {
|
||||
// Clamp line to valid range [0, lineCount-1]
|
||||
maxLine := w.Buffer.LineCount() - 1
|
||||
if maxLine < 0 {
|
||||
maxLine = 0 // Empty buffer edge case
|
||||
}
|
||||
maxLine := max(w.Buffer.LineCount()-1, 0)
|
||||
if w.Cursor.Line < 0 {
|
||||
w.Cursor.Line = 0
|
||||
} else if w.Cursor.Line > maxLine {
|
||||
|
||||
@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// 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
|
||||
func sendKeys(tm *teatest.TestModel, keys ...string) {
|
||||
|
||||
@ -41,7 +41,7 @@ type Model struct {
|
||||
commandError error
|
||||
commandOutput string
|
||||
|
||||
// Global settings (TODO: This needs to be refactored)
|
||||
// Global settings
|
||||
settings core.EditorSettings
|
||||
|
||||
// Registers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user