mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Merge pull request #139 from onodera-punpun/undo_option
make undothresthold a setting and add stackundo option
This commit is contained in:
@@ -117,6 +117,8 @@ func (eh *EventHandler) Undo() {
|
||||
|
||||
if startTime-(te.time.UnixNano()/int64(time.Millisecond)) > undoThreshold {
|
||||
return
|
||||
} else {
|
||||
startTime = t.(*TextEvent).time.UnixNano() / int64(time.Millisecond)
|
||||
}
|
||||
|
||||
eh.UndoOneEvent()
|
||||
|
||||
@@ -72,17 +72,17 @@ func GetOption(name string) interface{} {
|
||||
// DefaultSettings returns the default settings for micro
|
||||
func DefaultSettings() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"colorscheme": "default",
|
||||
"tabsize": float64(4),
|
||||
"indentchar": " ",
|
||||
"ignorecase": false,
|
||||
"autoindent": true,
|
||||
"syntax": true,
|
||||
"tabstospaces": false,
|
||||
"colorscheme": "default",
|
||||
"ignorecase": false,
|
||||
"indentchar": " ",
|
||||
"ruler": true,
|
||||
"statusline": true,
|
||||
"scrollmargin": float64(3),
|
||||
"scrollspeed": float64(2),
|
||||
"scrollmargin": float64(3),
|
||||
"statusline": true,
|
||||
"syntax": true,
|
||||
"tabsize": float64(4),
|
||||
"tabstospaces": false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user