Skip to content

Commit

Permalink
nvim: sort struct field for optimize allocate memory
Browse files Browse the repository at this point in the history
  • Loading branch information
zchee committed Dec 31, 2020
1 parent b9204a7 commit 5df923d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions nvim/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,25 @@ type CommandOptions struct {
// :help command-addr
Addr string

// Eval is evaluated in Nvim and the result is passed as an argument.
Eval string

// Complete specifies command completion.
//
// :help :command-complete
Complete string

// Bang specifies that the command can take a ! modifier (like :q or :w).
Bang bool

// Register specifes that the first argument to the command can be an
// optional register name (like :del, :put, :yank).
Register bool

// Eval is evaluated in Nvim and the result is passed as an argument.
Eval string

// Bar specifies that the command can be followed by a "|" and another
// command. A "|" inside the command argument is not allowed then. Also
// checks for a " to start a comment.
Bar bool

// Complete specifies command completion.
//
// :help :command-complete
Complete string
}

// HandleCommand registers fn as a handler for a Nvim command. The arguments
Expand Down
8 changes: 4 additions & 4 deletions nvim/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ type OptionInfo struct {
// Default is the default value for the option.
Default interface{} `msgpack:"default"`

// WasSet whether the option was set.
WasSet bool `msgpack:"was_set"`
// Scope one of "global", "win", or "buf".
Scope string `msgpack:"scope"`

// LastSetSid is the last set script id (if any).
LastSetSid int `msgpack:"last_set_sid"`
Expand All @@ -478,8 +478,8 @@ type OptionInfo struct {
// LastSetChan is the channel where option was set (0 for local).
LastSetChan int `msgpack:"last_set_chan"`

// Scope one of "global", "win", or "buf".
Scope string `msgpack:"scope"`
// WasSet whether the option was set.
WasSet bool `msgpack:"was_set"`

// GlobalLocal whether win or buf option has a global value.
GlobalLocal bool `msgpack:"global_local"`
Expand Down

0 comments on commit 5df923d

Please sign in to comment.