mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
@@ -51,7 +51,7 @@ var optionValidators = map[string]optionValidator{
|
||||
"colorcolumn": validateNonNegativeValue,
|
||||
"fileformat": validateLineEnding,
|
||||
"encoding": validateEncoding,
|
||||
"multimode": validateMultiMode,
|
||||
"multiopen": validateMultiOpen,
|
||||
}
|
||||
|
||||
func ReadSettings() error {
|
||||
@@ -334,7 +334,7 @@ var DefaultGlobalOnlySettings = map[string]interface{}{
|
||||
"infobar": true,
|
||||
"keymenu": false,
|
||||
"mouse": true,
|
||||
"multimode": "tab",
|
||||
"multiopen": "tab",
|
||||
"parsecursor": false,
|
||||
"paste": false,
|
||||
"pluginchannels": []string{"https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json"},
|
||||
@@ -494,11 +494,11 @@ func validateEncoding(option string, value interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func validateMultiMode(option string, value interface{}) error {
|
||||
func validateMultiOpen(option string, value interface{}) error {
|
||||
val, ok := value.(string)
|
||||
|
||||
if !ok {
|
||||
return errors.New("Expected string type for multimode")
|
||||
return errors.New("Expected string type for multiopen")
|
||||
}
|
||||
|
||||
switch val {
|
||||
|
||||
Reference in New Issue
Block a user