Skip to content

Commit

Permalink
remove unused receiver names
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Oct 17, 2024
1 parent 6e9e423 commit a54c66a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion buffer/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func (r constReader) Read(b []byte) (int, error) {
}

// Seek implements the io.Seeker interface.
func (r constReader) Seek(int64, int) (int64, error) {
func (constReader) Seek(int64, int) (int64, error) {
return 0, nil
}

Expand Down
8 changes: 4 additions & 4 deletions layout/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewLayout(index int) Layout {
return Window{Index: index, Active: true}
}

func (l Window) isLayout() {}
func (Window) isLayout() {}

// Collect returns all the Window.
func (l Window) Collect() map[int]Window {
Expand Down Expand Up @@ -125,7 +125,7 @@ func (l Window) SplitRight(index int) Layout {
}

// Count returns the width and height counts.
func (l Window) Count() (int, int) {
func (Window) Count() (int, int) {
return 1, 1
}

Expand Down Expand Up @@ -177,7 +177,7 @@ type Horizontal struct {
height int
}

func (l Horizontal) isLayout() {}
func (Horizontal) isLayout() {}

// Collect returns all the Window.
func (l Horizontal) Collect() map[int]Window {
Expand Down Expand Up @@ -342,7 +342,7 @@ type Vertical struct {
height int
}

func (l Vertical) isLayout() {}
func (Vertical) isLayout() {}

// Collect returns all the Window.
func (l Vertical) Collect() map[int]Window {
Expand Down
4 changes: 2 additions & 2 deletions tui/tui_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (ui *tuiWindow) setCursor(line int, offset int) {
ui.screen.ShowCursor(ui.region.left+offset, ui.region.top+line)
}

func (ui *tuiWindow) offsetStyleWidth(s *state.WindowState) int {
func offsetStyleWidth(s *state.WindowState) int {
threshold := int64(0xfffff)
for i := range 10 {
if s.Length <= threshold {
Expand All @@ -38,7 +38,7 @@ func (ui *tuiWindow) drawWindow(s *state.WindowState, active bool) {
height, width := ui.region.height-2, s.Width
cursorPos := int(s.Cursor - s.Offset)
cursorLine := cursorPos / width
offsetStyleWidth := ui.offsetStyleWidth(s)
offsetStyleWidth := offsetStyleWidth(s)
eis := s.EditedIndices
for 0 < len(eis) && eis[1] <= s.Offset {
eis = eis[2:]
Expand Down

0 comments on commit a54c66a

Please sign in to comment.