mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
make undothresthold a setting
This commit is contained in:
@@ -17,10 +17,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
synLinesUp = 75 // How many lines up to look to do syntax highlighting
|
// How many lines up to look to do syntax highlighting
|
||||||
synLinesDown = 75 // How many lines down to look to do syntax highlighting
|
synLinesUp = 75
|
||||||
doubleClickThreshold = 400 // How many milliseconds to wait before a second click is not a double click
|
// How many lines down to look to do syntax highlighting
|
||||||
undoThreshold = 500 // If two events are less than n milliseconds apart, undo both of them
|
synLinesDown = 75
|
||||||
|
// How many milliseconds to wait before a second click is not a double click
|
||||||
|
doubleClickThreshold = 400
|
||||||
|
// If two events are less than n milliseconds apart, undo both of them
|
||||||
|
undoThreshold = int(settings["undothreshold"].(float64))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -72,17 +72,18 @@ func GetOption(name string) interface{} {
|
|||||||
// DefaultSettings returns the default settings for micro
|
// DefaultSettings returns the default settings for micro
|
||||||
func DefaultSettings() map[string]interface{} {
|
func DefaultSettings() map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"colorscheme": "default",
|
"autoindent": true,
|
||||||
"tabsize": float64(4),
|
"colorscheme": "default",
|
||||||
"indentchar": " ",
|
"ignorecase": false,
|
||||||
"ignorecase": false,
|
"indentchar": " ",
|
||||||
"autoindent": true,
|
"ruler": true,
|
||||||
"syntax": true,
|
"scrollspeed": float64(2),
|
||||||
"tabstospaces": false,
|
"scrollmargin": float64(3),
|
||||||
"ruler": true,
|
"statusline": true,
|
||||||
"statusline": true,
|
"syntax": true,
|
||||||
"scrollmargin": float64(3),
|
"tabsize": float64(4),
|
||||||
"scrollspeed": float64(2),
|
"tabstospaces": false,
|
||||||
|
"undothreshold": float64(500),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,10 @@ Here are the options that you can set:
|
|||||||
|
|
||||||
default value: `on`
|
default value: `on`
|
||||||
|
|
||||||
|
* `undothreshold`: maximum time in milliseconds events can be apart to be counted as a single undo
|
||||||
|
|
||||||
|
default value: `500`
|
||||||
|
|
||||||
* `statusline`: display the status line at the bottom of the screen
|
* `statusline`: display the status line at the bottom of the screen
|
||||||
|
|
||||||
default value: `on`
|
default value: `on`
|
||||||
|
|||||||
Reference in New Issue
Block a user