mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-19 15:25:42 -04:00
Merge 7e339d67d9
into 5eddf5b85d
This commit is contained in:
commit
9098ebb7ab
@ -21,6 +21,11 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
"background": {
|
||||||
|
"description": "Whether to display the theme's background color\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/options.md#options",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"backup": {
|
"backup": {
|
||||||
"description": "Whether to backup all open buffers\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/options.md#options",
|
"description": "Whether to backup all open buffers\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/options.md#options",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -578,7 +578,7 @@ func doSetGlobalOptionNative(option string, nativeValue interface{}) error {
|
|||||||
config.ModifiedSettings[option] = true
|
config.ModifiedSettings[option] = true
|
||||||
delete(config.VolatileSettings, option)
|
delete(config.VolatileSettings, option)
|
||||||
|
|
||||||
if option == "colorscheme" {
|
if option == "colorscheme" || option == "background" {
|
||||||
// LoadSyntaxFiles()
|
// LoadSyntaxFiles()
|
||||||
config.InitColorscheme()
|
config.InitColorscheme()
|
||||||
for _, b := range buffer.OpenBuffers {
|
for _, b := range buffer.OpenBuffers {
|
||||||
|
@ -137,6 +137,11 @@ lineLoop:
|
|||||||
colors := string(matches[2])
|
colors := string(matches[2])
|
||||||
|
|
||||||
style := StringToStyle(colors)
|
style := StringToStyle(colors)
|
||||||
|
|
||||||
|
if !GlobalSettings["background"].(bool) && link != "statusline" {
|
||||||
|
style = style.Background(tcell.ColorDefault)
|
||||||
|
}
|
||||||
|
|
||||||
c[link] = style
|
c[link] = style
|
||||||
|
|
||||||
if link == "default" {
|
if link == "default" {
|
||||||
|
@ -55,6 +55,7 @@ var OptionChoices = map[string][]string{
|
|||||||
var defaultCommonSettings = map[string]interface{}{
|
var defaultCommonSettings = map[string]interface{}{
|
||||||
"autoindent": true,
|
"autoindent": true,
|
||||||
"autosu": false,
|
"autosu": false,
|
||||||
|
"background": true,
|
||||||
"backup": true,
|
"backup": true,
|
||||||
"backupdir": "",
|
"backupdir": "",
|
||||||
"basename": false,
|
"basename": false,
|
||||||
|
@ -24,7 +24,7 @@ Here are the available options:
|
|||||||
|
|
||||||
default value: `0`
|
default value: `0`
|
||||||
|
|
||||||
* `autosu`: When a file is saved that the user doesn't have permission to
|
* `autosu`: when a file is saved that the user doesn't have permission to
|
||||||
modify, micro will ask if the user would like to use super user
|
modify, micro will ask if the user would like to use super user
|
||||||
privileges to save the file. If this option is enabled, micro will
|
privileges to save the file. If this option is enabled, micro will
|
||||||
automatically attempt to use super user privileges to save without
|
automatically attempt to use super user privileges to save without
|
||||||
@ -32,6 +32,12 @@ Here are the available options:
|
|||||||
|
|
||||||
default value: `false`
|
default value: `false`
|
||||||
|
|
||||||
|
* `background`: whether to display the current theme's background color.
|
||||||
|
If this option is disabled, the background color of the current theme
|
||||||
|
will not be used and instead the terminal's default color will be shown.
|
||||||
|
|
||||||
|
default value: `true`
|
||||||
|
|
||||||
* `backup`: micro will automatically keep backups of all open buffers. Backups
|
* `backup`: micro will automatically keep backups of all open buffers. Backups
|
||||||
are stored in `~/.config/micro/backups` and are removed when the buffer is
|
are stored in `~/.config/micro/backups` and are removed when the buffer is
|
||||||
closed cleanly. In the case of a system crash or a micro crash, the contents
|
closed cleanly. In the case of a system crash or a micro crash, the contents
|
||||||
@ -531,6 +537,7 @@ so that you can see what the formatting should look like.
|
|||||||
"autoindent": true,
|
"autoindent": true,
|
||||||
"autosave": 0,
|
"autosave": 0,
|
||||||
"autosu": false,
|
"autosu": false,
|
||||||
|
"background": true,
|
||||||
"backup": true,
|
"backup": true,
|
||||||
"backupdir": "",
|
"backupdir": "",
|
||||||
"basename": false,
|
"basename": false,
|
||||||
|
Loading…
Reference in New Issue
Block a user