Merge pull request #139 from onodera-punpun/undo_option

make undothresthold a setting and add stackundo option
This commit is contained in:
Zachary Yedidia 2016-05-27 18:05:37 -04:00
commit d9d0af4a99
2 changed files with 10 additions and 8 deletions

View file

@ -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()

View file

@ -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,
}
}