Skip to content

Commit

Permalink
nvim: remove unnecessary codes
Browse files Browse the repository at this point in the history
  • Loading branch information
zchee committed Dec 31, 2020
1 parent 620209e commit b9204a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions nvim/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ func NewBufferReader(v *Nvim, b Buffer) io.Reader {
return &bufferReader{v: v, b: b}
}

var lineEnd = []byte{'\n'}

// Read implements io.Reader.
func (r *bufferReader) Read(p []byte) (n int, err error) {
if r.err != nil {
Expand Down
5 changes: 2 additions & 3 deletions nvim/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ type CommandCompletionArgs struct {

// CursorPos returns the cursor position.
func (a *CommandCompletionArgs) CursorPos() int {
n := a.CursorPosString
return n
return a.CursorPosString
}

// Mode represents a Nvim's current mode.
Expand Down Expand Up @@ -194,7 +193,7 @@ type ClientMethod struct {
Async bool `msgpack:"async"`

// NArgs is the number of method arguments.
NArgs ClientMethodNArgs `msgpack:"nargs"`
NArgs ClientMethodNArgs
}

// ClientMethodNArgs is the number of arguments. Could be a single integer or an array two integers, minimum and maximum inclusive.
Expand Down

0 comments on commit b9204a7

Please sign in to comment.