From 52aa174091616534696bde4aef4fd0d9da556ea8 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 2 Apr 2021 19:24:58 -0400 Subject: [PATCH] Fix formatting --- internal/editor/document/document.go | 4 ++-- internal/editor/editor.go | 4 ++-- internal/gilo/buffer.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/editor/document/document.go b/internal/editor/document/document.go index ba553fb..7df1b66 100644 --- a/internal/editor/document/document.go +++ b/internal/editor/document/document.go @@ -96,7 +96,7 @@ func (d *Document) InsertRow(at int, s string) { // Split the array of rows at the specified index start := d.rows[0:at] - end := d.rows[at : d.RowCount()] + end := d.rows[at:d.RowCount()] // Splice it back together newRows = append(newRows, start...) @@ -114,7 +114,7 @@ func (d *Document) InsertNewline(at *gilo.Point) { row := d.rows[at.Y] // Insert the characters right of the cursor to the next line - d.InsertRow(at.Y + 1, string(row.chars[at.X:row.Size()])) + d.InsertRow(at.Y+1, string(row.chars[at.X:row.Size()])) // Remove the characters copied to the next line row.chars = row.chars[0:at.X] diff --git a/internal/editor/editor.go b/internal/editor/editor.go index 459c2ab..f098d27 100644 --- a/internal/editor/editor.go +++ b/internal/editor/editor.go @@ -103,7 +103,7 @@ func (e *editor) Prompt(prompt string) string { e.SetStatusMessage("") return buf.ToString() - } else if ! key.IsCtrl(ch) && key.IsAscii(ch) { + } else if !key.IsCtrl(ch) && key.IsAscii(ch) { buf.AppendRune(ch) } } @@ -139,7 +139,7 @@ func (e *editor) delChar() { e.cursor.X = e.document.GetRow(e.cursor.Y - 1).Size() // Move the contents of the current row to the previous - e.document.MergeRows(e.cursor.Y - 1, e.cursor.Y) + e.document.MergeRows(e.cursor.Y-1, e.cursor.Y) e.cursor.Y -= 1 } diff --git a/internal/gilo/buffer.go b/internal/gilo/buffer.go index e1be4cc..a649422 100644 --- a/internal/gilo/buffer.go +++ b/internal/gilo/buffer.go @@ -47,4 +47,4 @@ func (b *Buffer) ToString() string { func (b *Buffer) Len() int { return b.buf.Len() -} \ No newline at end of file +}