diff --git a/cmd/micro/buffer.go b/cmd/micro/buffer.go index ac47e9e8..692fad8e 100644 --- a/cmd/micro/buffer.go +++ b/cmd/micro/buffer.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "crypto/md5" "encoding/gob" "io" "io/ioutil" @@ -57,6 +58,9 @@ type Buffer struct { syntaxDef *highlight.Def highlighter *highlight.Highlighter + // Hash of the original buffer -- empty if fastdirty is on + origHash [16]byte + // Buffer local settings Settings map[string]interface{} } @@ -174,7 +178,7 @@ func NewBuffer(reader io.Reader, size int64, path string) *Buffer { } if b.Settings["saveundo"].(bool) { - // We should only use last time's eventhandler if the file wasn't by someone else in the meantime + // We should only use last time's eventhandler if the file wasn't modified by someone else in the meantime if b.ModTime == buffer.ModTime { b.EventHandler = buffer.EventHandler b.EventHandler.buf = b @@ -188,6 +192,10 @@ func NewBuffer(reader io.Reader, size int64, path string) *Buffer { screen.EnableMouse() } + if !b.Settings["fastdirty"].(bool) { + b.origHash = md5.Sum([]byte(b.String())) + } + b.cursors = []*Cursor{&b.Cursor} return b @@ -451,6 +459,13 @@ func (b *Buffer) SaveAsWithSudo(filename string) error { return err } +func (b *Buffer) Modified() bool { + if b.Settings["fastdirty"].(bool) { + return b.IsModified + } + return b.origHash != md5.Sum([]byte(b.String())) +} + func (b *Buffer) insert(pos Loc, value []byte) { b.IsModified = true b.LineArray.insert(pos, value) diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index bc78fa87..0b9b545b 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -1010,7 +1010,7 @@ func runtimeHelpKeybindingsMd() (*asset, error) { return a, nil } -var _runtimeHelpOptionsMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x59\x5b\x8f\xdc\x36\xb2\x7e\xb6\x7e\x45\xc1\x0e\x30\x33\x41\x8f\x26\xc8\xf1\x43\xd0\x2f\x07\x4e\x7c\x8e\x13\x20\x37\x24\xde\xdd\x04\x9b\x45\x48\x49\x25\x89\x19\x8a\xd4\x92\x54\xf7\xc8\x41\xf6\xb7\x2f\xaa\x48\x4a\xea\x9e\xf6\xd8\x6f\xdd\x12\x59\xf7\xfa\xea\xa2\x17\x2f\x5e\xc0\x0f\x63\x50\xd6\xf8\xa2\xf8\x4e\xd5\xce\x82\x0f\xd6\xa1\x07\xa9\x35\xd8\x16\x42\x8f\x30\x79\x74\x50\x5b\xd3\xaa\x6e\x72\x92\x0e\x83\x32\xa0\x82\x3f\x7b\xd8\x28\x87\x75\xb0\x6e\x2e\x33\xad\xc9\xa3\x67\x12\xe2\x93\x5f\x5e\xbf\xf9\xfd\xab\x1f\xbe\xff\xff\x6f\xde\xfc\xfe\xf5\x0f\xdf\xfd\xdf\xdd\x40\x07\x04\xc8\xf8\xfe\x7d\x84\xe0\x95\x87\x11\x5d\x41\x67\x7e\x79\xfd\x06\xfc\x88\xf5\x0e\x54\xfb\x98\xa0\x00\xe5\xc1\xd8\x00\x1e\xc3\x0e\xc4\x7f\xee\xca\x48\x33\x33\x52\x9e\xa4\x69\x88\x61\xb1\x72\x3c\x91\xf9\x6b\x74\x08\xd2\x21\x4b\x64\xa3\x55\x20\xf4\x32\xc0\x6c\x27\xa8\xa5\x21\xda\xfb\xa2\xf8\x14\x44\x6d\xb5\x75\xbe\xee\x71\x40\xb1\x07\x6d\x65\x93\xf5\x58\x9e\x47\x43\x36\x64\xaa\x02\x00\x3e\xb9\x8e\x1c\x5f\x2b\x77\x73\xb7\x39\xe6\xef\x44\x64\x25\x4a\x96\x94\xce\xbe\xed\x95\x27\x5e\x41\x99\x8e\x04\x17\x9d\xb6\x95\xd4\x60\x8d\x9e\x45\x59\x14\xcf\x1a\x6c\xe5\xa4\x03\x1c\xa4\x9e\x70\x0f\x22\xfd\x17\xc5\xb3\xef\x6d\xc0\x28\x33\x89\x93\xcf\x6d\xf9\xc1\x75\x7a\xba\x03\x6f\xb5\x74\xea\x1d\x36\x3b\x90\xa6\x59\xff\xde\x86\xfa\xa6\x78\x46\x96\x20\x83\x6a\x5b\xcb\x10\x15\x59\x54\xd8\x41\x85\xb5\x9c\x3c\xdb\x6a\x66\xa3\xe1\x50\x61\xd3\xc4\x73\xc4\x9b\xb5\x81\x4a\x19\xc9\xc6\x7d\xf6\xf6\xcc\x3c\x64\xcf\x0a\xc1\xa3\xc6\x9a\xc8\xb7\xce\x0e\x1c\x75\x74\xb9\x55\x1a\x7d\xa6\x54\x3c\x3b\xf3\xe6\xa9\xfd\xb6\xe1\x12\xc3\xae\xb6\xa4\x67\x35\x2f\xfa\x1f\x55\xe8\x21\xf4\x0e\xb1\x78\xb6\xbd\xbb\x2f\xc8\xdc\xf0\x6b\x72\xaf\x43\xd9\xc0\x60\x29\x0a\x2a\x3b\x85\xa8\xc2\x95\x3f\x35\x5f\x12\x2a\x85\x80\x80\x1e\xf5\x08\xc1\x8e\xaa\x66\x5a\xd7\x82\x1f\xa4\xb7\x37\xe5\x1a\x2e\xb5\xd5\xd3\x60\xc4\x9e\xc2\x37\x90\x87\xd7\x80\x85\x60\xe1\xb3\x1d\x28\x92\x54\x6b\x68\x94\x1f\xb5\x9c\x41\x42\xbc\x03\xc9\x9d\x14\xfd\xaa\x55\xd8\x10\xa7\xf8\xaa\x8c\xc1\x12\xa3\xbb\x9d\x34\x11\xa7\x68\x3d\x4a\x13\xf2\xed\x2f\x3e\x23\xfa\x15\x42\xaf\xba\x5e\xab\xae\x27\x73\x33\x2d\xa9\xa1\xb5\x0e\xf0\x41\x0e\xa3\xc6\x4b\x91\xf5\x99\x60\x05\xd0\xb6\x06\x8f\x5a\x19\x0a\xf7\xe8\x59\x96\x54\x4e\xc1\x0e\x32\xa8\x5a\x6a\x3d\x83\x6c\x1a\x90\x90\x0e\x12\xcf\xec\xca\x4b\x94\x5b\xa9\x3d\x46\xea\x6e\x08\x4e\x2a\xad\x4c\x77\xf4\x4f\xd1\x0f\x4e\x0d\x90\x8f\xc2\xb1\x57\x01\xfd\x28\x6b\x42\xab\x00\x68\xf5\x07\xd8\x04\x59\x79\xf5\x8e\x34\xf0\x18\x62\xbe\x06\x59\x01\x3d\x23\x61\x73\x1e\x5e\x20\xf2\x32\x12\x50\xa6\x41\x13\xea\x5e\xba\x2d\x8d\xf8\x34\x22\x17\xbd\x93\x75\x40\x77\x81\x08\x64\x22\xad\xad\x98\x02\x1a\x59\xe9\x04\x90\x6c\xb1\xe4\xe6\xca\x86\x60\x87\x8c\xbe\xd8\xa8\x60\x1d\x1c\x7b\x42\xa7\x01\xbd\x97\x1d\x29\xec\x10\x46\xa7\x4c\xc0\xa6\x5c\x20\x23\x2a\xf0\x51\x88\xc1\x7a\x7e\x0a\x82\xbc\x13\xe6\xf1\xc4\x28\xf9\x19\xc7\x06\xa3\xda\xe4\x1c\x9a\x00\xd5\xd4\xb6\xe8\xca\xc7\xf8\x44\x10\x91\x98\xc5\x8c\x3a\x63\xc7\xe1\xce\x0e\xad\xf0\xcc\xa7\x14\xfd\x0d\x8e\x68\x1a\x22\x66\xcd\x22\x01\x87\x71\x2f\x0f\x04\xc5\x68\xa2\xe9\x3a\x63\x1d\xd6\xd2\x93\xb8\x23\xba\xd6\xba\x01\xe8\xef\xad\x32\x1e\x8d\x57\x41\x1d\x08\x51\xa4\xab\x7b\xf4\x97\xb4\x6e\xdb\xa8\xb6\x9f\x4d\x90\x0f\x62\x0f\x61\x72\xc6\x43\xfc\x4b\xdc\xad\x03\xdb\xb6\x4f\x18\x8c\x82\x28\xd8\x18\x76\x62\x4f\x59\x07\x29\x06\x95\xf1\x81\x00\x84\xfc\x26\xab\x27\xd9\x07\x59\x0d\xf6\x80\x03\x9a\x20\xf6\x60\xe4\x41\x75\x32\x2c\x84\x72\x18\x60\xa7\x8c\x61\xab\xb4\x1c\x1f\x9e\x8a\x17\x83\x47\x82\x5c\x62\x03\xd7\x58\x76\x25\x10\x39\xb0\x07\x74\xf0\x72\x43\xc6\x9a\x1a\x6f\x1e\xc5\x07\xf9\x09\x1a\x4b\x47\xcc\x1c\x7a\x76\x62\x7b\xa6\x19\xb9\xd5\x9a\xf2\xa2\x37\x57\x3d\xc8\x95\x31\xfc\xc5\x9e\x22\xd4\x40\xed\x50\x72\x58\x30\x0e\xc4\xb0\x4e\x65\x02\xbc\x1c\x4e\xb3\x25\x15\x7f\xe2\x31\x3a\x3c\x28\x3b\x79\xbe\xf1\x84\xf9\xeb\xc9\x79\xeb\x12\x10\x2d\x78\xb6\xa6\xd0\x52\xfa\xe2\xc1\xa8\x06\x61\xb6\x84\x46\x51\xf4\xa2\x49\xe5\x90\xb8\x5e\x2f\x35\x9b\x0e\x36\xd8\x2a\x83\x0d\x15\x8e\xf3\x5a\x4e\xb1\x48\x16\x9f\xbc\x32\xdd\xcd\x13\xf2\xb9\x49\x23\xe5\x76\x86\x70\x16\xca\x4c\x43\x85\xee\x62\x44\xa4\x6b\x3e\xc8\x30\xf9\xa4\x56\xbe\xcb\x36\xe3\x17\x4f\xc0\x83\xaf\x1d\x52\x7a\xbc\x9f\xb4\x3c\x60\x34\x86\xd8\x83\xc3\x81\xea\x74\x86\x93\x8d\xa1\x8e\xd2\x83\x96\x3e\x40\x50\x03\xae\x49\x48\x8f\x29\xff\xa8\x73\x32\x5c\x77\xc6\x29\x50\xa1\x0a\x4c\x80\x7d\x4e\xc6\xa1\x33\xeb\x2d\xd9\x49\x75\x51\xa6\x25\xff\xe4\x01\x27\xd3\xd8\x1c\x36\xe1\x14\xbe\xac\xd9\x01\xbd\xa6\xdf\x74\xb4\x01\x3c\xa0\x01\xd9\x06\x74\xb1\x19\xd3\xd6\x23\x48\xe6\x46\x42\x79\x9b\x0b\x5f\x7a\x63\x1a\x70\xc8\x42\xc5\x43\xbb\xa5\x87\xbb\x47\x1c\x99\xb8\x32\xdd\x93\x22\xd6\xce\x6a\x3d\x48\xd7\x29\x2a\xda\x72\xb0\x93\x09\x6b\x2a\x72\x91\xb5\x93\x6e\x40\xab\x7b\xae\x1f\x1e\xb9\x6f\x38\x44\xee\x15\x6a\x7b\xdc\x18\xf8\x02\xab\xff\xd9\x32\xf2\x23\x62\x73\x81\x0f\x11\xe6\x03\x8c\xc6\xd6\x60\xfe\x4b\x16\x09\x17\xa8\x7e\x9e\xa8\xda\x36\x1c\x9d\x1c\x09\xd8\x7b\x96\x33\x95\x55\x27\xc7\x4c\x9a\x72\x85\x71\xc4\x5a\xd0\xd6\x74\xc4\xac\x55\x21\xa3\xf0\xfb\x43\x6b\xb1\xd1\xa8\x55\xf8\x89\x32\x30\x3b\x52\xc2\x01\x1d\x63\x3b\xf0\x4b\xf2\x20\x63\x02\x35\x99\x49\x10\x15\xa8\x0c\xa4\xa7\xb9\x4d\x70\x9c\xc7\xb6\x25\x6f\x6e\x6b\x0e\x53\xf9\xdf\xa7\xe2\x9b\x0e\x7c\xc9\x39\xb1\x0a\xd1\x5b\xa7\xde\x59\x13\x3e\x5e\x8c\xc5\x5f\xdc\x5b\x7d\x2c\x73\x02\x40\x0a\xd0\xd3\xae\x85\x9e\xc4\x54\xe5\x82\x49\xae\x72\x33\x7c\x01\x1e\x6b\x6b\x1a\x7f\x5a\x01\x19\x9e\x63\xdf\x2a\xb5\xbf\xd8\xf7\x30\x3d\x0a\xaa\x7f\x4f\xd4\x22\xe6\x9c\xc3\x07\x15\x5b\x5b\xea\x55\xa5\xbf\x57\xa6\x63\x62\x5f\x52\x73\xed\xb8\x1b\xe4\xb3\x0c\x5a\x31\xc5\x5a\x94\x61\x72\xb8\xb6\xef\x44\x67\x60\xd3\xcb\xba\x56\x0c\xcd\x2b\xc7\x98\x39\x44\x92\x2a\xcb\xd1\xa9\x10\xfb\x2e\x19\x18\x17\x22\x04\x54\xd8\x5a\x77\xb1\xc3\x5b\xc2\x64\xd4\x53\xa7\x4c\xdd\x4b\x63\x50\x53\xd5\xac\xc9\x35\xca\xf8\xa5\xdf\xcf\xef\x96\x96\x3b\x5e\x81\x41\x1a\xd9\x11\x5c\xb1\x59\xb9\xb0\x93\x38\x94\x0a\xf1\x04\x95\xdd\x12\x5e\x65\x02\x0c\x18\x6a\x18\xa9\x19\x05\xad\x3c\x27\xd2\x95\xc3\xd1\x7a\xea\xa2\xe6\x2b\xf8\xc3\x5b\x93\xc6\x8b\x63\xaf\xea\x3e\xcb\x42\x64\x07\x0c\xb2\x91\x41\xa6\xf6\x9f\x04\xeb\x14\x01\x4f\xe4\x55\xc2\xcf\x18\xfd\x2a\x7e\x8c\xe2\x7d\x17\xc5\x13\xe4\xd9\x58\x5a\x23\x28\x27\x8d\x1f\x4d\x07\x24\x37\xcf\x17\xd4\x04\xba\x81\xab\xe0\x25\xcb\xf5\x21\x8c\x7e\x7f\x77\xd7\xa9\xd0\x4f\x55\x59\xdb\x21\x0e\x3e\xb7\xb1\x19\xbc\x8b\xe4\x6f\x93\xd2\x5b\x23\xb3\xaa\x97\x2c\xbc\x1a\x41\xa1\xbf\xfa\x08\x3b\x93\xb0\x8c\xf7\x27\x76\x5e\x4d\x49\x2c\xbc\xf2\xc1\x93\xd2\x12\x04\xbd\x29\xc9\xba\x22\x55\x8e\xad\x75\xfd\x6a\x5b\xb2\x81\x64\xcc\x56\xa6\xd3\x98\x6d\xfb\xfe\x86\x79\xf2\x38\x3a\x35\x48\x37\x0b\xb8\xe6\xde\x25\x8d\x3a\xd6\xc0\xb7\xca\x4c\x0f\x37\xfb\x54\xba\xc9\xa5\x48\x51\x49\x6d\x1c\x8d\x56\x9b\x9c\xcc\x4d\x48\x22\x05\xb5\x56\x63\x65\xa5\x63\x00\xaa\xed\x38\xa7\x49\x94\x57\x21\x00\x79\xcc\xab\x64\x7d\xdf\x39\x3b\x99\x26\xb5\xbd\xdc\x37\x11\x6d\xd9\xb6\x58\xc7\x20\x31\xe4\x4b\xbd\x21\x19\x33\xee\xab\xe0\xf4\xed\x57\x9c\xb8\xfc\xf3\xef\x4f\x35\xe2\x54\x96\x1e\xb7\x53\x91\xd0\xfa\x7c\xb7\x99\x7a\x28\xd6\x25\x4f\xdc\x64\xd2\xd9\x4e\xe5\x49\x97\xd7\x60\x40\x37\xb0\x55\x14\xa3\xea\x82\x1b\xdc\x2b\x26\xd8\x35\xf8\x10\x62\x77\xb1\x00\x89\x99\xa9\x95\x25\x14\x8f\xfb\x0f\xdc\xf2\x0c\x39\xf9\x23\xe7\x04\xa5\x15\x42\x83\x1a\xf3\x30\xf2\xe5\x3a\x79\xd3\xf5\x55\xfc\x33\xe9\xd3\x9d\xd4\xd3\x26\x31\xa8\x0f\xc1\x36\x00\x0e\x63\x98\x3f\xd4\x80\x92\x8a\x41\x05\xcd\x6d\xd3\xe5\x18\x98\xed\xe4\x20\x9a\x42\xea\x2b\x0f\x7c\x7c\x19\x46\x68\xfc\xa8\xe6\x1c\x28\x64\xa1\xd8\xed\x7c\x88\xf1\x60\x27\x9e\x42\x32\xb3\x60\xd3\x38\x07\xfc\x06\xfc\x34\x8e\xd6\x85\x12\xfe\x41\x34\x4f\x9e\xb1\xe6\xca\xd3\xe1\x66\x07\x93\x9f\xe2\x6c\x4b\xd3\x68\x92\x72\x1d\x95\xaa\xd8\xde\x04\x4b\xf0\x8c\xde\x27\x4a\x5c\xfb\x17\x00\x8b\x8b\x94\x0b\xf3\x7f\x8e\x6c\x5e\xad\x9c\x30\xd8\xcc\x2a\xfc\x32\xea\x7f\x1d\x03\x85\xc7\x08\xef\xfb\xed\x6e\xe0\x64\xe1\xb3\xd2\xe9\x29\x12\xa2\x64\x29\xa0\xe2\x28\xb8\xa6\x02\x45\x7f\xa4\x9e\x33\xe7\xe6\x7d\xb6\xa5\x4c\xb8\xbd\xbd\x2d\x8a\xd7\xe9\x4d\x02\xa7\xb4\x8a\xdb\x2f\x15\x97\x7b\x3c\xb1\x87\x57\x27\x55\x32\x76\x7e\xe2\xcf\xbf\x04\x88\xeb\x1b\x01\xe2\x9f\xff\x12\x20\x9e\x3f\x17\x20\xae\xae\x44\x09\x3f\x3a\x7b\x50\xcd\xda\xdf\x6f\x48\x25\x4e\x4f\xa4\xa7\xa6\x51\xdb\x3d\xe2\x49\x8f\x73\x07\x9b\x7a\xdf\xdc\xb2\x5e\x60\x98\x88\x7c\x98\x5b\x1b\x92\xce\x62\xbf\x59\x63\xed\x4e\x7a\x0c\x0c\xe0\xed\xb0\x2e\x2a\x2b\xe9\xb1\xd9\x0e\xd0\x34\xc2\x97\xf0\x2a\xe6\xe0\x60\x07\x86\x8f\x95\x02\xf9\x80\xfd\x49\x43\x24\x17\x26\x79\x8f\xb1\x30\xf2\x32\x30\x0e\x91\x5c\x69\xe7\xd0\x2f\x45\xd3\x61\x27\x5d\xa3\xc9\xe3\xb6\x8d\xc9\x95\x36\x01\xbe\x84\x6f\xda\xc7\x7d\x31\xf1\x49\xe1\x1e\x7b\x90\x0a\x7b\x79\x50\xd6\xf1\xec\x7d\xd2\xf9\xdb\xb6\xfd\xd0\xae\x22\x96\x4d\x91\x56\x0a\x1b\x8c\xe3\xae\xe4\x5e\x99\x26\xb7\xce\x10\x57\x0a\xfe\xbc\x08\xe4\xa5\x06\xef\xa5\xe0\x6f\x46\x3d\x9c\x1c\x27\x71\xa9\x27\xfe\x63\xf2\x01\xc4\x6f\x46\xc0\xb5\x6e\x6f\xe2\xbc\x24\x09\xfe\xfd\x29\x75\x3a\x2b\x7e\x73\x7c\xb0\x76\xba\xbd\x21\x14\x46\x08\x47\x0b\xa3\xf5\x5e\x91\xda\xac\x88\x4f\x9c\x17\x75\x33\x27\x31\x19\xf5\x20\xd8\xe8\xa2\xb1\x5e\x44\x02\xab\xb2\xef\x59\x9c\x90\xee\xbc\x38\xa5\x8b\x69\x64\x5c\x03\x60\x1d\x28\xa1\x9a\x42\x6c\xaa\x4f\x46\xac\x33\xb8\x38\x99\x64\xa8\xaf\xe8\x70\xc5\xe4\xac\x2b\x8d\xc9\xed\x32\x0b\xfb\x20\xdd\x66\xd4\x4f\x7b\xbe\x4b\x99\xcd\x0a\x16\xc5\x2b\x33\x67\x01\x88\x06\x45\x70\xaa\xb2\x79\xc7\x95\x41\x99\x47\xbe\xcd\xfe\x10\x8a\xf3\x0d\xf0\x12\x73\xdc\xcf\x79\xbb\x23\x52\xc8\x25\x79\x17\xa3\xf2\xf4\x93\x42\x6c\x49\x12\xfd\x22\x37\xfd\x4b\xe1\x8c\x81\x7b\xb5\x9a\x20\xc8\x7b\xbc\x44\x87\x37\xc9\x24\x3d\x41\xb2\xb1\x84\xfd\xc5\x20\xeb\x5e\x19\xdc\xe5\xce\x93\x31\x97\x9d\x70\x22\x64\xd2\x87\xef\x40\xba\x53\x16\xc5\x0b\x78\x13\x77\x75\xe4\xc7\x88\x9e\xf9\x5e\x51\xfc\xba\x7e\x78\xa0\xcb\x7e\xa5\x09\xa8\x98\x50\x5c\xf4\xe9\x99\x9c\xc3\xb7\xf5\x5c\xc2\xb7\xf1\x07\x0c\x28\xf3\x27\x8c\x8d\x3c\xc5\xd1\x9a\xab\x70\x62\xe8\xf3\xef\x25\xa7\xf6\x8d\xc1\xc9\x64\xf2\x8a\x9a\xfb\xb0\x54\x3f\x95\x29\x2e\x6d\x09\x7f\x4e\x0b\x42\x99\x11\x7c\x95\x55\xf9\xed\xe7\x89\xf8\xf5\x61\x41\xb5\xf5\xeb\x4b\xa1\x0c\xf7\xaf\x91\xa2\x2f\x8b\xe2\xed\xba\x79\x8f\x1f\x5f\x36\x11\xbd\x59\x79\xee\x92\xc0\xb8\x59\x70\x6e\x4e\xae\xeb\xca\x12\xde\xda\x82\x98\xae\x42\x26\x23\xee\x18\x2c\x84\xc7\xc0\x0f\xc4\xb6\x64\xd2\x53\x51\x16\xc5\x37\xe9\x53\xc0\x99\xb1\x96\xed\x25\x79\x8e\x67\xba\x71\x8a\x6b\xfe\x8c\xd5\x89\x07\x61\x7b\xdc\xe9\xcf\x31\x8f\x48\x85\x32\x7e\x87\xa2\xe6\xce\xe4\xea\x9b\x2a\x3d\x55\xdb\xb3\x35\x1d\x85\x36\x35\xd4\x5a\x27\x7c\xc6\x87\x1a\xc7\x00\x6f\x6c\xfc\xcf\x96\x28\x96\xd5\x37\xbc\xbc\x7c\xfc\xa7\xa9\x9a\xe3\x93\x7d\x51\x08\x21\x48\x91\xe2\x4f\x4e\xe6\xe7\x9f\x96\x9d\x7d\xbe\x87\xf8\x8f\x9f\x6c\x45\x78\xbe\x07\x5e\xb1\xf3\xdb\xbf\x76\xf9\x8a\xab\x1e\x5f\x51\xef\xf0\xf9\x1e\x3e\x3f\x39\x79\x46\x2a\xb8\x09\x37\x6f\xe2\x8d\x97\xc5\x5f\x24\x53\x51\xbc\xf2\x9b\x2f\x71\x08\x71\xac\xa7\x99\x18\x01\xa5\x9f\xe3\x12\xe6\xb1\x95\xf3\xfc\x7b\xd9\x53\x65\xf1\xdf\x00\x00\x00\xff\xff\xfd\x1d\xf9\x9b\x05\x1d\x00\x00") +var _runtimeHelpOptionsMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x59\x5b\x8f\xdc\xb6\x92\x7e\xb6\x7e\x45\xc1\x0e\x30\x33\x41\x4f\x3b\xc8\xfa\x21\xe8\x97\x85\x13\xef\x3a\x01\x72\x43\xe2\xdd\x93\xe0\xe4\x20\xa2\xa4\x92\xc4\x98\x22\x15\x92\xea\x19\x39\xc8\xf9\xed\x07\x55\x45\x4a\xea\x9e\xf6\xd8\x6f\xdd\x12\x55\xf7\xcb\x57\xc5\x67\xcf\x9e\xc1\x0f\x63\xd4\xce\x86\xa2\xf8\x4e\xd7\xde\x41\x88\xce\x63\x00\x65\x0c\xb8\x16\x62\x8f\x30\x05\xf4\x50\x3b\xdb\xea\x6e\xf2\x8a\x0e\x83\xb6\xa0\x63\x38\x7b\xd8\x68\x8f\x75\x74\x7e\xde\x67\x5a\x53\xc0\xc0\x24\xca\x4f\x7e\x79\xf5\xfa\xf7\xaf\x7e\xf8\xfe\x7f\xbf\x79\xfd\xfb\xd7\x3f\x7c\xf7\x3f\xcf\x07\x3a\x50\x82\x92\xf7\xef\x23\x04\x2f\x03\x8c\xe8\x0b\x3a\xf3\xcb\xab\xd7\x10\x46\xac\x77\xa0\xdb\x87\x04\x4b\xd0\x01\xac\x8b\x10\x30\xee\xa0\xfc\xf7\xf3\xbd\xd0\xcc\x8c\x74\x20\x69\x1a\x62\x58\xac\x1c\x4f\x64\xfe\x1a\x3d\x82\xf2\xc8\x12\x39\xb1\x0a\xc4\x5e\x45\x98\xdd\x04\xb5\xb2\x44\xfb\x50\x14\x9f\x42\x59\x3b\xe3\x7c\xa8\x7b\x1c\xb0\x3c\x80\x71\xaa\xc9\x7a\x2c\xcf\xc5\x90\x0d\x99\xaa\x00\x80\x4f\xae\x85\xe3\x2b\xed\x6f\x9e\x6f\x8e\x85\xe7\xa5\xb0\x2a\xf7\x2c\x29\x9d\x7d\xd3\xeb\x40\xbc\xa2\xb6\x1d\x09\x5e\x76\xc6\x55\xca\x80\xb3\x66\x2e\xf7\x45\xf1\xa4\xc1\x56\x4d\x26\xc2\x51\x99\x09\x0f\x50\xa6\xff\x65\xf1\xe4\x7b\x17\x51\x64\x26\x71\xf2\xb9\x2d\x3f\xb8\x4e\x4f\x77\x10\x9c\x51\x5e\xbf\xc3\x66\x07\xca\x36\xeb\xdf\xdb\x58\xdf\x14\x4f\xc8\x12\x64\x50\xe3\x6a\x15\x45\x91\x45\x85\x1d\x54\x58\xab\x29\xb0\xad\x66\x36\x1a\x0e\x15\x36\x8d\x9c\x23\xde\xac\x0d\x54\xda\x2a\x36\xee\x93\x37\x67\xe6\x21\x7b\x56\x08\x01\x0d\xd6\x44\xbe\xf5\x6e\xe0\xa8\xa3\x8f\x5b\x6d\x30\x64\x4a\xc5\x93\x33\x6f\x9e\xda\x6f\x1b\x2e\x12\x76\xb5\x23\x3d\xab\x79\xd1\xff\x4e\xc7\x1e\x62\xef\x11\x8b\x27\xdb\x6f\x0f\x05\x99\x1b\x7e\x4d\xee\xf5\xa8\x1a\x18\x1c\x45\x41\xe5\xa6\x28\x2a\x5c\x85\x53\xf3\x25\xa1\x52\x08\x94\xd0\xa3\x19\x21\xba\x51\xd7\x4c\xeb\xba\xe4\x07\xe9\xed\xcd\x7e\x0d\x97\xda\x99\x69\xb0\xe5\x81\xc2\x37\x92\x87\xd7\x80\x85\xe8\xe0\xb3\x1d\x68\x92\xd4\x18\x68\x74\x18\x8d\x9a\x41\x81\x7c\x03\xc9\x9d\x14\xfd\xba\xd5\xd8\x10\x27\x79\xb5\x97\x60\x91\xe8\x6e\x27\x43\xc4\x29\x5a\xef\x94\x8d\xf9\xeb\x2f\x3e\x23\xfa\x15\x42\xaf\xbb\xde\xe8\xae\x27\x73\x33\x2d\x65\xa0\x75\x1e\xf0\x5e\x0d\xa3\xc1\x4b\x91\xf5\x59\xc9\x0a\xa0\x6b\x2d\xde\x19\x6d\x29\xdc\xc5\xb3\x2c\xa9\x9a\xa2\x1b\x54\xd4\xb5\x32\x66\x06\xd5\x34\xa0\x20\x1d\x24\x9e\xd9\x95\x97\x28\xb7\xca\x04\x14\xea\x7e\x88\x5e\x69\xa3\x6d\x77\x17\x1e\xa3\x1f\xbd\x1e\x20\x1f\x85\xbb\x5e\x47\x0c\xa3\xaa\xa9\x5a\x45\x40\x67\x3e\xc0\x26\xaa\x2a\xe8\x77\xa4\x41\xc0\x28\xf9\x1a\x55\x05\xf4\x8c\x84\xcd\x79\x78\x81\xc8\x0b\x21\xa0\x6d\x83\x36\xd6\xbd\xf2\x5b\x1a\xf2\x54\x2a\x17\xbd\x53\x75\x44\x7f\x81\x08\x64\x22\xad\xab\x98\x02\x5a\x55\x99\x54\x20\xd9\x62\xc9\xcd\x95\x8b\xd1\x0d\xb9\xfa\x62\xa3\xa3\xf3\x70\xd7\x53\x75\x1a\x30\x04\xd5\x91\xc2\x1e\x61\xf4\xda\x46\x6c\xf6\x4b\xc9\x10\x05\x3e\xaa\x62\xb0\x9e\x9f\x42\x49\xde\x89\xf3\x78\x62\x94\xfc\x8c\x63\x83\xab\xda\xe4\x3d\xda\x08\xd5\xd4\xb6\xe8\xf7\x0f\xeb\x13\x95\x88\xc4\x4c\x32\xea\x8c\x1d\x87\x3b\x3b\xb4\xc2\x33\x9f\x52\xf4\x37\x38\xa2\x6d\x88\x98\xb3\x8b\x04\x1c\xc6\xbd\x3a\x52\x29\x46\x2b\xa6\xeb\xac\xf3\x58\xab\x40\xe2\x8e\xe8\x5b\xe7\x07\xa0\xbf\xb7\xda\x06\xb4\x41\x47\x7d\xa4\x8a\xa2\x7c\xdd\x63\xb8\xa4\x75\xdb\x8a\xda\x61\xb6\x51\xdd\x97\x07\x88\x93\xb7\x01\xe4\x2f\x71\x77\x1e\x5c\xdb\x3e\x62\x30\x0a\xa2\xe8\x24\xec\xca\x03\x65\x1d\xa4\x18\xd4\x36\x44\x2a\x20\xe4\x37\x55\x3d\xca\x3e\xaa\x6a\x70\x47\x1c\xd0\xc6\xf2\x00\x56\x1d\x75\xa7\xe2\x42\x28\x87\x01\x76\xda\x5a\xb6\x4a\xcb\xf1\x11\xa8\x79\x71\xf1\x48\x25\x97\xd8\xc0\x35\xee\xbb\x3d\x10\x39\x70\x47\xf4\xf0\x62\x43\xc6\xd9\x1a\x6f\x1e\xc4\x07\xf9\x09\x1a\x47\x47\xec\x1c\x7b\x76\x62\x7b\xa6\x19\xb9\xd5\xd9\xfd\x45\x6f\xae\x7a\x90\x2b\x25\xfc\xcb\x03\x45\xa8\x85\xda\xa3\xe2\xb0\xe0\x3a\x20\x61\x9d\xda\x04\x04\x35\x9c\x66\x4b\x6a\xfe\xc4\x63\xf4\x78\xd4\x6e\x0a\xfc\xc5\x23\xe6\xaf\x27\x1f\x9c\x4f\x85\x68\xa9\x67\x6b\x0a\x2d\xad\x4f\x0e\x8a\x1a\x54\xb3\x15\x34\x9a\xa2\x17\x6d\x6a\x87\xc4\xf5\x7a\xe9\xd9\x74\xb0\xc1\x56\x5b\x6c\xa8\x71\x9c\xf7\x72\x8a\x45\xb2\xf8\x14\xb4\xed\x6e\x1e\x91\xcf\x4f\x06\x29\xb7\x73\x09\x67\xa1\xec\x34\x54\xe8\x2f\x46\x44\xfa\x2c\x44\x15\xa7\x90\xd4\xca\xdf\xb2\xcd\xf8\xc5\x23\xe5\x21\xd4\x1e\x29\x3d\xde\x4f\x5a\x1d\x51\x8c\x51\x1e\xc0\xe3\x40\x7d\x3a\x97\x93\x8d\xa1\xee\x54\x00\xa3\x42\x84\xa8\x07\x5c\x93\x90\x1e\x53\xfe\x11\x72\xb2\xdc\x77\xc6\x29\x52\xa3\x8a\x4c\x80\x7d\x4e\xc6\xa1\x33\xeb\x57\xaa\x53\xfa\xa2\x4c\x4b\xfe\xa9\x23\x4e\xb6\x71\x39\x6c\xe2\x69\xf9\x72\x76\x07\xf4\x9a\x7e\xd3\xd1\x06\xf0\x88\x16\x54\x1b\xd1\x0b\x18\x33\x2e\x20\x28\xe6\x46\x42\x05\x97\x1b\x5f\x7a\x63\x1b\xf0\xc8\x42\xc9\xa1\xdd\x82\xe1\xde\x22\x8e\x4c\x5c\xdb\xee\x51\x11\x6b\xef\x8c\x19\x94\xef\x34\x35\x6d\x35\xb8\xc9\xc6\x35\x15\xb9\xc9\xba\xc9\x34\x60\xf4\x5b\xee\x1f\x01\x19\x37\x1c\x85\x7b\x85\xc6\xdd\x6d\x0c\x7c\x81\xd5\x7f\x6d\x19\x85\x11\xb1\xb9\xc0\x87\x08\xf3\x01\xae\xc6\xce\x62\xfe\x4b\x16\x89\x17\xa8\x7e\x9e\xa8\xba\x36\xde\x79\x35\x52\x61\xef\x59\xce\xd4\x56\xbd\x1a\x33\x69\xca\x15\xae\x23\xce\x81\x71\xb6\x23\x66\xad\x8e\xb9\x0a\xbf\x3f\xb4\x16\x1b\x8d\x46\xc7\x9f\x28\x03\xb3\x23\x15\x1c\xd1\x73\x6d\x07\x7e\x49\x1e\xe4\x9a\x40\x20\x33\x09\xa2\x23\xb5\x81\xf4\x34\xc3\x04\xcf\x79\xec\x5a\xf2\xe6\xb6\xe7\x30\x95\xff\x7e\x2c\xbe\xe9\xc0\x97\x9c\x13\xab\x10\xbd\xf3\xfa\x9d\xb3\xf1\xe3\xc5\x58\xfc\xc5\xd8\xea\x63\x99\x53\x01\xa4\x00\x3d\x45\x2d\xf4\x44\x52\x95\x1b\x26\xb9\xca\xcf\xf0\x05\x04\xac\x9d\x6d\xc2\x69\x07\xe4\xf2\x2c\xb8\x55\x99\x70\x11\xf7\x30\x3d\x0a\xaa\x3f\x27\x82\x88\x39\xe7\xf0\x5e\x0b\xb4\x25\xac\xaa\xc2\x5b\x6d\x3b\x26\xf6\x25\x81\x6b\xcf\x68\x90\xcf\x72\xd1\x92\x14\x6b\x51\xc5\xc9\xe3\x0a\xdf\x89\xce\xc0\xa6\x57\x75\xad\xb9\x34\xaf\x1c\x25\x73\x88\x24\x75\x96\x3b\xaf\xa3\xe0\x2e\x15\xb9\x2e\x48\x09\xa8\xb0\x75\xfe\x22\xc2\x5b\xc2\x64\x34\x53\xa7\x6d\xdd\x2b\x6b\xd1\x50\xd7\xac\xc9\x35\xda\x86\x05\xef\xe7\x77\x0b\xe4\x96\x4f\x60\x50\x56\x75\x54\xae\xd8\xac\xdc\xd8\x49\x1c\x4a\x05\x39\x41\x6d\x77\x0f\x2f\x33\x01\x2e\x18\x7a\x18\x09\x8c\x82\xd1\x81\x13\xe9\xca\xe3\xe8\x02\xa1\xa8\xf9\x0a\xfe\x08\xce\xa6\xf1\xe2\xae\xd7\x75\x9f\x65\x21\xb2\x03\x46\xd5\xa8\xa8\x12\xfc\x27\xc1\x3a\x4d\x85\x47\x78\xed\xe1\x67\x14\xbf\x96\x3f\x8a\x78\xdf\x89\x78\x25\x79\x56\x5a\xab\x14\xe5\xa4\xf1\x83\xe9\x80\xe4\xe6\xf9\x82\x40\xa0\x1f\xb8\x0b\x5e\xb2\x5c\x1f\xe3\x18\x0e\xcf\x9f\x77\x3a\xf6\x53\xb5\xaf\xdd\x20\x83\xcf\xad\x80\xc1\xe7\x42\xfe\x36\x29\xbd\x35\x32\xab\x7a\xc9\xc2\xab\x11\x34\x86\xab\x8f\xb0\x33\x09\xcb\xf5\xfe\xc4\xce\xab\x29\x89\x45\xd0\x21\x06\x52\x5a\x41\x49\x6f\xf6\x64\xdd\x32\x75\x8e\xad\x75\xc3\x6a\x5b\xb2\x81\xe2\x9a\xad\x6d\x67\x30\xdb\xf6\xfd\x80\x79\x0a\x38\x7a\x3d\x28\x3f\x97\x70\xcd\xd8\x25\x8d\x3a\xce\xc2\xb7\xda\x4e\xf7\x37\x87\xd4\xba\xc9\xa5\x48\x51\x49\x30\x8e\x46\xab\x4d\x4e\x66\x10\x92\x48\x41\x6d\xf4\x58\x39\xe5\xb9\x00\xd5\x6e\x9c\xd3\x24\xca\xab\x10\x80\x3c\xe6\x55\xaa\x7e\xdb\x79\x37\xd9\x26\xc1\x5e\xc6\x4d\x44\x5b\xb5\x2d\xd6\x12\x24\x96\x7c\x69\x36\x24\x25\xe3\xbe\x8a\xde\xdc\x7e\xc5\x89\xcb\x3f\xff\xff\x31\x20\x4e\x6d\xe9\x21\x9c\x12\x42\xeb\xf3\xdd\x66\xea\xa1\x58\x57\x3c\x71\x93\x49\x67\x37\xed\x4f\x50\x5e\x83\x11\xfd\xc0\x56\xd1\x5c\x55\x97\xba\xc1\x58\x31\x95\x5d\x8b\xf7\x51\xd0\xc5\x52\x48\xec\x4c\x50\x96\xaa\xb8\xec\x3f\x70\xcb\x33\xe6\xe4\x17\xce\xa9\x94\x56\x08\x0d\x1a\xcc\xc3\xc8\x97\xeb\xe4\x4d\x9f\xaf\xe2\x9f\x49\x9f\xbe\x49\x98\x36\x89\x41\x38\x04\xdb\x08\x38\x8c\x71\xfe\x10\x00\x25\x15\xa3\x8e\x86\x61\xd3\xe5\x18\x98\xdd\xe4\x41\x4c\xa1\xcc\x55\x00\x3e\xbe\x0c\x23\x34\x7e\x54\x73\x0e\x14\xb2\x90\xa0\x9d\x0f\x31\x1e\xdc\xc4\x53\x48\x66\x16\x5d\x1a\xe7\x80\xdf\x40\x98\xc6\xd1\xf9\xb8\x87\x7f\x10\xcd\x93\x67\xac\xb9\x0e\x74\xb8\xd9\xc1\x14\x26\x99\x6d\x69\x1a\x4d\x52\xae\xa3\x52\x25\xf0\x26\x3a\x2a\xcf\x18\x42\xa2\xc4\xbd\x7f\x29\x60\xb2\x48\xb9\x30\xff\xe7\xc8\xe6\xd5\xca\x09\x83\xcd\xac\xc2\x2f\x45\xff\x6b\x09\x14\x1e\x23\x42\xe8\xb7\xbb\x81\x93\x85\xcf\x4a\xa7\xa7\x48\x10\xc9\x52\x40\xc9\x28\xb8\xa6\x02\x45\xbf\x50\xcf\x99\x73\xf3\x3e\xdb\x6e\x46\x52\xa9\x8e\x65\x9a\x1c\x37\xa1\xcc\xcd\xe7\xad\xb6\x4d\x46\x48\x20\x93\x63\x38\xcf\xf5\x3c\xbb\xf2\xfa\x01\xfe\xcf\xea\xfb\x93\xe3\x24\x01\x41\x9f\x3f\xa6\x10\xa1\xfc\xcd\x96\x70\x6d\xda\x1b\x81\xc5\x8a\xb2\x3c\x9c\x52\xa7\xb3\xe5\x6f\x9e\x0f\xd6\xde\xb4\x37\x94\x6c\x08\xf1\xce\xc1\xe8\x42\xd0\xe4\x79\x56\x24\x24\xce\x4b\x22\x66\x4e\xe5\x64\xf5\x7d\xc9\xf6\x28\x1b\x17\x4a\x21\xb0\x2a\xfb\x9e\xf9\x98\x74\xe7\xfd\x18\x7d\x98\x26\x03\x6c\x16\x88\xb6\xcc\x0d\x50\x4d\x51\xb0\xd3\x09\x92\x3e\x8b\x8a\x13\xc0\x4a\xed\xa3\xc3\x35\xf5\xb2\xae\x34\x0d\xb5\xcb\xc8\x13\xa2\xf2\x9b\x89\x2e\xad\x73\x2e\x39\x90\x15\x14\x17\xaa\x10\x1b\xed\xe3\xfc\x21\x0f\x2a\xd3\x39\xaf\x63\x9f\x23\x50\x16\xc6\x6e\x3d\x4f\x92\xa8\x8c\xa3\x34\xc5\x7f\xc3\x1b\x30\x90\xe6\x64\x5d\x4e\xb1\x0d\xcf\x3c\x41\x08\x49\xf6\x30\xd3\x55\x50\x39\x67\x50\x59\x4a\x5f\x21\x53\x4a\x41\x93\x75\x06\x2f\x81\xa2\x9f\x90\xd7\xd2\xc1\xad\x13\xea\x14\x90\xd9\x0d\xea\x2d\x4f\xcd\xbc\x94\x59\x57\x6f\xc4\x7a\x47\x0e\xc8\xb9\xa8\xad\xaa\xeb\xc9\xab\x88\x7b\xf8\xa6\x7d\x20\x5b\xdb\xee\x88\xac\xdd\xc6\x6c\xaf\x42\xbf\x05\xbe\xc4\x2e\xa9\xcd\xd3\x54\x88\x04\x6b\xe9\x50\xc2\x18\xce\xeb\x8e\x73\x90\xbb\xed\x75\xc6\xb1\x69\x9c\x5a\xb0\x27\xd7\x53\xa7\x1a\x6c\x6e\x56\x81\x65\xc7\x99\x44\xcc\x91\xe3\x2a\x9e\xc0\xcd\x2c\xaf\x3d\x06\x37\x79\x2a\xd4\x36\xa2\x0d\xfa\x88\xfb\xf3\x2d\x13\x37\x63\xc6\x62\xe8\x46\x6e\xf9\x0e\x3c\x72\xd8\x12\x00\x4d\x30\xaa\x57\x47\x0e\x9f\xc4\x8e\xed\x98\xbd\x28\xf1\xfb\x58\x41\xb8\xbd\xbd\x2d\x8a\x57\xe9\x4d\x42\x2b\x69\x37\x7f\x58\x20\x38\x0f\x7d\xe5\x01\x5e\x9e\xa4\x8e\x8c\x82\xe5\x5f\x7f\x97\x50\x5e\xdf\x94\x50\xfe\xf3\x5f\x25\x94\x4f\x9f\x96\x50\x5e\x5d\x95\x7b\xf8\xd1\xbb\xa3\x6e\xd6\x81\x7f\x43\x2a\x71\x7a\xa4\x5f\x1b\x32\x8b\x7f\xc0\x93\x1e\xaf\x3e\x60\xd7\xe4\x19\xf6\x02\xc3\x44\xe4\xc3\xdc\xda\x98\x74\x2e\x0f\x9b\xbd\xf6\xee\x64\xe8\xc0\x08\xc1\x0d\xeb\xcd\x45\xa5\xc2\x5a\x28\xf2\x4e\x6f\x0f\x2f\xa5\x29\x0f\x6e\x60\x3c\xb1\x52\x20\x1f\x70\x81\x57\x95\x14\x31\x8a\x76\x41\xca\x7c\x3b\x20\x5b\x25\x76\xf7\x1c\xfb\x05\x45\x7b\xec\x94\x6f\x0c\xb5\x00\xd7\x4a\xb7\x4d\xab\xc1\xc0\xc1\xff\xa0\xee\x10\x9f\xd4\xff\xa4\x38\x54\x48\x21\x42\x55\x73\xf2\xa7\xab\x00\xd7\xb6\xef\xc5\x4c\x2f\xed\x9c\x8f\x11\x0b\x52\x3f\x61\xb6\xbc\x31\xcd\x2d\x9e\x17\x08\x9b\x6d\x34\x14\xe7\xf7\x09\x8b\xc0\x3c\x1d\x04\xb7\x23\x52\xc8\x00\x6f\x27\x2a\x9d\x5e\x50\x09\xc0\x4d\xf4\x8b\x9c\x7a\x0b\x0c\x13\xad\xaf\xd6\x4a\x1b\xd5\x5b\xbc\x44\x87\xef\x25\x48\x7a\x6a\xf0\xd6\x11\x92\x28\x06\x55\xf7\xda\xe2\x2e\xcf\x31\xdc\xc1\xb9\xd6\x9f\x08\x99\xf4\xe1\x6f\x20\x7d\xb3\x2f\x8a\x67\xf0\x5a\x36\xbf\xe4\x32\xe9\xc5\xf9\xbb\xa2\xf8\x75\xbd\xc6\xa2\x8f\xc3\x4a\x13\x50\x33\x21\x59\x1b\x9b\x99\x7a\x00\x7f\x6d\xe6\x3d\x7c\x2b\x3f\x60\x40\x95\x2f\xc4\x36\xf2\x14\x77\xce\x5e\xc5\x13\x43\x9f\xdf\xbe\x9d\xda\x57\x7a\xa0\xd4\xdd\xd4\xf5\xb8\x90\x24\x34\xa6\x6d\x71\x69\xe7\xfc\x73\x5a\x37\xab\x9c\xfe\xab\xac\x3a\x6c\x2f\xbb\xe4\x2e\x6b\x49\x89\xf5\x2e\xaf\xd0\x96\xa7\x21\xa1\x48\x45\xe7\xcd\x7a\x8f\x23\x57\x79\x9b\xda\xb6\x59\xa0\xef\x92\xc0\xb8\x59\x97\x6f\x4e\xae\xcb\xef\x3d\xbc\x71\x05\x31\x5d\x85\x4c\x46\xdc\x71\x66\x95\x01\x23\x3f\x28\xb7\x00\x8c\x9e\x96\xfb\xa2\xf8\x26\x5d\x2c\x9d\x19\x6b\xd9\x85\x93\xe7\x78\x43\x30\x4e\x72\x69\x94\x13\x3d\xf1\xa0\xc2\x20\x37\x44\xb3\xb4\x6b\x52\x61\x2f\xb7\x9a\x5a\xba\x96\x60\xb9\x84\x1b\x09\xbb\x9d\x2d\x7d\x29\xb4\x69\x3c\x33\x26\x25\x37\xde\xd7\x38\x46\x78\xed\xe4\x3f\x5b\xa2\x58\x2e\x52\xe0\xc5\xe5\xe3\x3f\x4d\xd5\x2c\x4f\x0e\x45\x51\x96\x25\x29\x52\xfc\xc5\x35\xfe\xe9\xa7\xfb\xce\x3d\x3d\x80\xfc\xe3\x27\x5b\x11\x9e\x1e\x80\x2f\x6c\xf8\xed\xdf\xbb\xfc\x89\xaf\x1e\x7e\xa2\xdf\xe1\xd3\x03\x7c\x7e\x72\xf2\x8c\x14\xf5\xf2\xcd\x1b\xf9\xe2\x45\xf1\x37\xc9\x54\x14\x2f\xc3\xe6\x5e\x17\x41\x96\x44\x7f\x4e\x3a\x22\xa0\x0a\xb3\xac\xf4\x1e\x5a\x39\x6f\x53\x2e\x7b\x6a\x5f\xfc\x27\x00\x00\xff\xff\xf3\x31\xad\xad\x53\x1f\x00\x00") func runtimeHelpOptionsMdBytes() ([]byte, error) { return bindataRead( diff --git a/cmd/micro/settings.go b/cmd/micro/settings.go index 89c14b91..134ef68f 100644 --- a/cmd/micro/settings.go +++ b/cmd/micro/settings.go @@ -1,6 +1,7 @@ package main import ( + "crypto/md5" "encoding/json" "errors" "io/ioutil" @@ -198,10 +199,13 @@ func DefaultGlobalSettings() map[string]interface{} { "colorscheme": "default", "cursorline": true, "eofnewline": false, - "rmtrailingws": false, + "fastdirty": true, + "fileformat": "unix", "ignorecase": false, "indentchar": " ", "infobar": true, + "mouse": true, + "rmtrailingws": false, "ruler": true, "savecursor": false, "saveundo": false, @@ -221,8 +225,6 @@ func DefaultGlobalSettings() map[string]interface{} { }, "pluginrepos": []string{}, "useprimary": true, - "fileformat": "unix", - "mouse": true, } } @@ -236,10 +238,13 @@ func DefaultLocalSettings() map[string]interface{} { "colorcolumn": float64(0), "cursorline": true, "eofnewline": false, - "rmtrailingws": false, + "fastdirty": true, + "fileformat": "unix", "filetype": "Unknown", "ignorecase": false, "indentchar": " ", + "mouse": true, + "rmtrailingws": false, "ruler": true, "savecursor": false, "saveundo": false, @@ -254,8 +259,6 @@ func DefaultLocalSettings() map[string]interface{} { "tabsize": float64(4), "tabstospaces": false, "useprimary": true, - "fileformat": "unix", - "mouse": true, } } @@ -358,6 +361,26 @@ func SetLocalOption(option, value string, view *View) error { return err } + if option == "fastdirty" { + // If it is being turned off, we have to hash every open buffer + var empty [16]byte + for _, tab := range tabs { + for _, v := range tab.views { + if !nativeValue.(bool) { + if v.Buf.origHash == empty { + data, err := ioutil.ReadFile(v.Buf.AbsPath) + if err != nil { + data = []byte{} + } + v.Buf.origHash = md5.Sum(data) + } + } else { + v.Buf.IsModified = v.Buf.Modified() + } + } + } + } + buf.Settings[option] = nativeValue if option == "statusline" { diff --git a/cmd/micro/statusline.go b/cmd/micro/statusline.go index 2e2886d1..c1788955 100644 --- a/cmd/micro/statusline.go +++ b/cmd/micro/statusline.go @@ -20,7 +20,7 @@ func (sline *Statusline) Display() { file := sline.view.Buf.GetName() // If the buffer is dirty (has been modified) write a little '+' - if sline.view.Buf.IsModified { + if sline.view.Buf.Modified() { file += " +" } diff --git a/cmd/micro/tab.go b/cmd/micro/tab.go index 941e787a..f750205e 100644 --- a/cmd/micro/tab.go +++ b/cmd/micro/tab.go @@ -91,7 +91,7 @@ func TabbarString() (string, map[int]int) { } buf := t.views[t.CurView].Buf str += buf.GetName() - if buf.IsModified { + if buf.Modified() { str += " +" } if i == curTab { diff --git a/cmd/micro/view.go b/cmd/micro/view.go index b30e6e60..2fd3f3e4 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -199,7 +199,7 @@ func (v *View) ScrollDown(n int) { // If there are unsaved changes, the user will be asked if the view can be closed // causing them to lose the unsaved changes func (v *View) CanClose() bool { - if v.Type == vtDefault && v.Buf.IsModified { + if v.Type == vtDefault && v.Buf.Modified() { var choice bool var canceled bool if v.Buf.Settings["autosave"].(bool) { diff --git a/runtime/help/options.md b/runtime/help/options.md index 92d13b29..d6b1c5b0 100644 --- a/runtime/help/options.md +++ b/runtime/help/options.md @@ -161,6 +161,22 @@ Here are the options that you can set: default value: `on` +* `fileformat`: this determines what kind of line endings micro will use for the file. Unix line endings + are just `\n` (lf) whereas dos line endings are `\r\n` (crlf). The two possible values for this option + are `unix` and `dos`. The fileformat will be automatically detected and displayed on the statusline but + this option is useful if you would like to change the line endings or if you are starting a new file. + + default value: `unix` + +* `fastdirty`: this determines what kind of algorithm micro uses to determine if a buffer is modified or + not. When `fastdirty` is on, micro just uses a boolean `modified` that is set to `true` as soon as the user + makes an edit. This is fast, but can be inaccurate. If `fastdirty` is off, then micro will hash the current + buffer against a hash of the original file (created when the buffer was loaded). This is more accurate but + obviously more resource intensive. This option is only for people who really care about having accurate + modified status. + + default value: `on` + --- Default plugin options: @@ -179,13 +195,6 @@ Default plugin options: default value: `on` -* `fileformat`: this determines what kind of line endings micro will use for the file. Unix line endings - are just `\n` (lf) whereas dos line endings are `\r\n` (crlf). The two possible values for this option - are `unix` and `dos`. The fileformat will be automatically detected and displayed on the statusline but - this option is useful if you would like to change the line endings or if you are starting a new file. - - default value: `unix` - Any option you set in the editor will be saved to the file ~/.config/micro/settings.json so, in effect, your configuration file will be created for you. If you'd like to take your configuration with you to another