Skip to content

Commit 5df923d

Browse files
committed
nvim: sort struct field for optimize allocate memory
1 parent b9204a7 commit 5df923d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

nvim/plugin/plugin.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -186,25 +186,25 @@ type CommandOptions struct {
186186
// :help command-addr
187187
Addr string
188188

189+
// Eval is evaluated in Nvim and the result is passed as an argument.
190+
Eval string
191+
192+
// Complete specifies command completion.
193+
//
194+
// :help :command-complete
195+
Complete string
196+
189197
// Bang specifies that the command can take a ! modifier (like :q or :w).
190198
Bang bool
191199

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

196-
// Eval is evaluated in Nvim and the result is passed as an argument.
197-
Eval string
198-
199204
// Bar specifies that the command can be followed by a "|" and another
200205
// command. A "|" inside the command argument is not allowed then. Also
201206
// checks for a " to start a comment.
202207
Bar bool
203-
204-
// Complete specifies command completion.
205-
//
206-
// :help :command-complete
207-
Complete string
208208
}
209209

210210
// HandleCommand registers fn as a handler for a Nvim command. The arguments

nvim/types.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ type OptionInfo struct {
466466
// Default is the default value for the option.
467467
Default interface{} `msgpack:"default"`
468468

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

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

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

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

0 commit comments

Comments
 (0)