-
Notifications
You must be signed in to change notification settings - Fork 8
/
nop.go
51 lines (43 loc) · 1.02 KB
/
nop.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2014 The lime Authors.
// Use of this source code is governed by a 2-clause
// BSD-style license that can be found in the LICENSE file.
package commands
import "github.com/limetext/backend"
type (
// NopApplication performs NOP.
NopApplication struct {
backend.BypassUndoCommand
}
// NopWindow performs NOP.
NopWindow struct {
backend.BypassUndoCommand
}
// NopText performs NOP.
NopText struct {
backend.BypassUndoCommand
}
)
// Run executes the NopApplication command.
func (c *NopApplication) Run() error {
return nil
}
// IsChecked represents if the command
// contains a checkbox in the frontend
func (c *NopApplication) IsChecked() bool {
return false
}
// Run executes the NopWindow command.
func (c *NopWindow) Run(w *backend.Window) error {
return nil
}
// Run executes the NopText command.
func (c *NopText) Run(v *backend.View, e *backend.Edit) error {
return nil
}
func init() {
registerByName([]namedCmd{
{"nop", &NopApplication{}},
{"nop", &NopWindow{}},
{"nop", &NopText{}},
})
}