mirror of
https://github.com/zyedidia/micro
synced 2024-11-05 17:41:24 +00:00
Merge pull request #139 from onodera-punpun/undo_option
make undothresthold a setting and add stackundo option
This commit is contained in:
commit
d9d0af4a99
2 changed files with 10 additions and 8 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue