diff --git a/cmd/micro/cellview.go b/cmd/micro/cellview.go index a7dbff12..4f4853d9 100644 --- a/cmd/micro/cellview.go +++ b/cmd/micro/cellview.go @@ -65,7 +65,7 @@ type CellView struct { lines [][]*Char } -func (c *CellView) Draw(buf *Buffer, scrollInfo []*scrollInfo, top, height, left, width int) { +func (c *CellView) Draw(buf *Buffer, top, height, left, width int) { tabsize := int(buf.Settings["tabsize"].(float64)) softwrap := buf.Settings["softwrap"].(bool) indentchar := []rune(buf.Settings["indentchar"].(string))[0] @@ -96,9 +96,7 @@ func (c *CellView) Draw(buf *Buffer, scrollInfo []*scrollInfo, top, height, left lineStr := buf.Line(lineN) line := []rune(lineStr) - // colN, startOffset, startStyle := visualToCharPos(left, lineN, lineStr, buf, tabsize) - info := scrollInfo[lineN-top] - colN, startOffset, startStyle := info.left, info.offset, info.style + colN, startOffset, startStyle := visualToCharPos(left, lineN, lineStr, buf, tabsize) if colN < 0 { colN = len(line) } diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index e87dbab8..f876400d 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -2496,7 +2496,7 @@ func runtimeSyntaxSyntax_checkerGo() (*asset, error) { return a, nil } -var _runtimeSyntaxSyntax_converterGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x58\x5f\x6f\xdb\xb6\x16\x7f\x96\x3e\xc5\xb9\xbc\x28\x20\xd5\xaa\x8c\x26\xe9\x8b\xef\x35\x82\x61\x58\xd1\x0e\xe8\x56\xc4\xdb\x53\x64\x34\x8c\x45\xcb\x5c\x25\x4a\x20\xa9\x34\x41\x96\xef\x3e\x9c\x43\x4a\xf2\xff\x38\xdd\xb0\x17\x59\x3c\xe4\xf9\xf7\xe3\xf9\x1d\x91\x6e\xf8\xe2\x2b\x2f\x04\x54\x5c\xaa\x30\x94\x55\x53\x6b\x0b\x51\x18\xb0\x65\x65\x59\x18\x30\x59\x8f\x65\xdd\x5a\x59\xe2\xa0\x36\xf8\xd4\xa2\x10\xf7\x0d\xbe\x19\xab\xa5\x2a\x0c\x0b\xe3\x30\xb4\x0f\x8d\x80\x99\x54\x45\x29\xae\xda\x52\x80\xb1\xba\x5d\x58\x78\x0c\x83\x45\x5d\xd6\x1a\xdc\xda\x30\x20\xed\x6e\xf4\xe4\xf5\x3e\xb5\xa5\x95\x47\xd5\x8c\xe5\xda\xf6\x23\xa1\x72\x80\x35\x23\xe3\x31\xfc\x5c\x4b\x45\x16\x2c\xff\x2a\x0c\x70\x30\x0f\xca\xf2\x7b\xd0\x28\x8b\xbe\xad\xe4\x62\x05\x0b\xae\xe0\x56\x40\x85\xde\x9a\x52\x80\x16\x45\x5b\x72\x0d\xe2\xbe\xd1\xc2\x18\x59\x2b\x13\xa3\x2d\xae\x72\xf8\xa3\x96\xca\x80\xb4\x20\x95\xad\xa1\x56\xfb\x56\xc3\xed\x03\xfc\x7a\x25\x55\x01\xe2\x4e\xe8\x07\xbb\xc2\x57\x5b\x17\xc2\xae\x84\x0e\x97\xad\x5a\xf4\x61\x45\xda\x67\x27\x55\x11\xfb\x5f\xcc\xd2\x34\xa5\xb4\x30\x99\x7a\x91\x49\x67\x28\xa0\xd5\x09\xdc\x30\x60\x37\x71\x18\x60\x2c\x22\x5f\x5f\x85\x66\x23\xd2\x4d\x80\xfd\xc9\x86\x35\x53\x70\x2f\x08\xb4\x6d\xb5\xea\x86\x4f\xa1\x8b\xa7\xe1\xda\x88\xf7\xb2\x14\x91\x15\xf7\x36\x81\xa5\x2c\x85\xe2\xd5\x10\x5a\x84\x12\xdc\x94\xc4\x23\x98\xc0\x4a\xf0\x5c\x74\x5b\x91\x10\xa2\x06\xae\xe7\x52\x59\xa1\x97\x7c\x21\x1e\x9f\x62\x4c\xa5\x94\x4a\x98\xdd\x54\x9c\x1f\x96\x29\x16\x87\x61\x30\x1e\xc3\x15\x55\xc0\xb2\xd6\x14\x0c\xe2\xe0\xb7\xca\x58\x6e\x45\x25\x94\x35\x61\xe0\x44\x9f\x31\x5a\x8d\x36\x5d\xd1\xa5\x9f\x5a\x63\x7f\xac\xab\x06\x13\xb8\xf1\x6a\x2c\x4a\x5f\x5f\xc6\x2c\x33\x23\x7c\x8b\xd9\x08\x21\xdb\xeb\xa7\x4f\x64\xf0\xe3\x44\xc7\xfd\x78\x35\x67\xfd\xe6\x70\x16\x96\xab\x9c\xeb\x7c\xbd\xf2\x4c\x18\xe0\xcf\x71\xfb\xae\xd2\x29\x8b\xcc\x8c\xa2\xcb\x49\x16\x45\xe9\xe8\x32\xbe\xcc\x70\x1c\x5f\xf6\x8e\x8f\xa2\xe7\xb6\xe5\x9b\xb4\x2b\x20\xb2\x4c\x59\x9a\xa6\x0c\x84\xca\xdd\x9b\x8b\x64\x86\x53\x3f\xa9\xfc\xef\x45\xe4\x1d\x50\x5c\x99\x19\x91\x8f\x01\x1d\x0c\x0e\x8b\xe1\x97\xb6\x4a\xe8\x85\xdc\x70\x55\x08\x70\x35\xf2\x18\x06\x54\x2d\x30\xd4\xca\x6f\x5a\x56\xb3\x86\x2f\x44\x84\x13\x71\x18\x04\x72\xe9\x74\xa7\x53\x60\x8c\x54\x82\x45\xad\xac\x54\xad\x08\x83\xe0\xc9\xad\xe8\xd4\x3f\x70\xf3\x59\x8b\xa5\xbc\x27\xf5\x04\xd8\x7f\x59\xfc\x62\x1d\x07\x64\xa7\xe8\x46\x9f\xb8\x5d\xac\x7c\x59\xaf\x95\x64\xfa\x5e\xaa\x7c\xd6\xde\x56\x38\x1d\x5d\xcf\x6f\x1f\xac\x8f\x1c\x43\xa7\xd8\x85\x8a\x36\x4c\xc4\x98\xc9\xb9\xb3\x1d\x74\x24\xeb\x11\xd8\x5c\x7b\xfd\x76\x4e\x76\x7c\x10\x30\x1d\xfa\xc8\xde\xe5\x67\x73\xe7\xf7\x09\x44\x69\x44\xe7\xa3\xb2\xe9\x67\x2d\x95\x2d\x55\xd4\xd1\x3c\x19\x36\x86\xcd\xb6\x58\x07\xd2\x80\xaa\x2d\xdc\xf1\x52\xe6\x13\x60\xa3\x6e\x27\x36\x40\x24\x14\x9f\x43\xd2\x31\xa6\x43\x72\x3c\x86\x0f\x5b\xcc\x43\xb1\x5b\xb4\x06\xf0\x3a\x17\x4f\x03\x78\xc3\x04\x01\x7c\xe6\x93\xf7\x9c\xdd\x05\x6e\x43\x05\x71\x7e\x39\x70\xdb\xc9\xbc\x08\xb8\x90\xf0\x98\x0d\x9c\x4d\xe0\xb6\xb5\xf8\xa1\x59\xd4\x6d\x99\xe3\xf7\xa9\x6f\x24\xf4\xfd\xe3\xda\xbe\x11\x2a\x77\x88\x0f\xcd\x24\xa5\x14\x66\x2e\x29\x72\xd8\x83\x3d\xdb\xd3\x88\xfc\x14\xe9\x82\x5d\x39\x26\x52\x99\x7b\x8c\x89\xa3\x83\xf5\xe3\xf0\xdf\x71\x0d\x9b\xdf\x67\x27\xa3\x5e\x32\xb3\xdb\xe2\x65\xc9\x0b\xb3\x26\xeb\xe8\xe1\xed\xd3\xc6\x5d\x78\xf0\xc7\x63\xf8\x48\xd3\x88\xea\x05\x86\xaa\x28\xde\x16\xdb\x95\x69\xc4\x42\x2e\xa5\xc8\xc1\xd4\x95\x00\x9e\xe7\xd2\xca\x5a\xf1\xd2\xbb\xb0\x35\xae\xf3\xc8\x63\x78\x03\xbd\xbc\xaf\x9e\x59\x4e\x61\x77\xfe\xcc\xcf\xcb\xa5\xb7\xf9\x9f\xa1\xff\x04\x41\x9f\xe0\x14\x58\x74\xc9\x60\xe4\x17\x8d\x80\xc5\x38\xda\xa1\x69\x67\xf6\xdc\x17\xda\x66\xa5\xad\xdb\x3b\x41\x75\xad\x52\xf7\x41\x78\xbe\x0f\xc2\xf3\x04\x54\xbd\x8b\xd4\x37\xa1\x05\x14\xf2\x4e\xa8\x93\xd0\x3a\x25\xce\xbd\x4d\x68\x23\x16\x24\xc9\x39\x56\x35\xed\xab\x16\x28\xe3\xd0\xe8\xfa\xb6\x14\xd5\x49\xd4\xfb\xa8\x88\x64\x03\xf7\x8e\xd1\x0d\x9f\xee\xab\x38\x05\xde\x34\x42\xe5\x74\xae\x32\xc9\xda\x39\xf5\x91\x32\x4f\xfa\xca\x7d\x42\x43\x03\xc6\xbb\x9f\xcc\xe3\xbc\x73\x5c\xdd\x26\xde\x36\xc7\xb6\x2c\x7e\x1f\xd7\x36\x4f\xc4\x4e\x46\xbe\x7b\xc9\x78\x0c\xbf\x1b\x01\x15\x9d\x67\x8d\xdf\xf8\xdb\x07\xc8\xc5\x92\xb7\x25\xf5\x60\x27\x9b\x4c\x81\x55\x78\xb6\xdf\x4f\xcd\x77\xfb\xf6\xf2\xdd\xc0\xca\x46\xd7\x77\x32\x3f\x44\xca\x17\xb0\x71\x74\x98\x8e\x2e\xdb\xdd\xf9\x73\x3f\x8f\x99\xef\xce\x5e\xcc\xe3\x67\x38\x73\xb8\xed\xb8\xdc\x72\x99\x53\xd9\xfa\x1c\xbf\x2f\xbb\x43\xc1\x9f\x1d\x0d\xfe\x7c\x7e\x02\x9d\x2e\x90\x4e\xef\xfe\x35\x3a\x8d\xc7\xee\x9c\x79\x4d\x29\xcf\x0f\xb5\x41\x16\xe1\xd3\xa5\x8d\xb2\xf4\xf5\x25\x49\x30\x51\x5a\x73\x98\x9a\xfd\x55\xb0\x63\x26\x59\x49\x50\xd5\x71\x33\xa4\x50\xdc\xed\xa6\xbf\xd6\x14\x42\x09\xcd\xad\xbb\xd9\x7c\xdf\x0d\x66\xb8\x93\xd5\xad\x6d\x5a\xba\x94\x31\x16\xf6\xc3\xd1\x14\x10\xce\x59\x83\x78\x2e\x23\xd6\x79\x99\xc0\x2b\x93\xa9\x4c\x31\x77\x99\x42\x51\x7c\x50\x29\x17\x56\x2c\xec\x04\x32\x05\x00\xfd\xe5\x6b\x02\x19\x7b\x65\x32\x46\x46\xba\x43\xd5\x95\x68\x4a\x3c\x0f\x77\x39\xb0\x2c\x63\xf4\xa4\xdf\x37\x6f\x63\x3c\x6a\xcb\x65\x97\xdb\xf0\x99\x3a\xe0\x1a\x1d\xba\xb5\x47\xdd\xb9\x25\x7b\xdd\x11\xf0\x83\x75\x96\x29\x02\x72\x92\x29\xe6\x4f\xfd\x5f\x12\xd0\xc3\x61\xdf\xc1\xfc\x38\x9c\x5c\x12\xa8\xbf\xd2\x74\x1a\x0d\x1d\x38\xfe\x1f\x4a\xa9\xbc\x8f\x44\xfe\x06\x5e\x99\x8d\xb8\xd1\x5e\xda\x97\xc8\x16\x64\x5b\x63\x5a\x4b\x1d\x7e\x4f\x5e\x38\x60\x5e\xc4\xfa\x54\xb7\xbe\x01\x6b\x91\xf7\x05\xfa\x82\xc0\xb7\x22\x8e\x9f\xd1\x01\xfa\x73\x83\x6b\x7b\xbc\x30\xf6\x65\xe9\xd9\x72\x6a\x96\xcf\x45\x21\x54\xfe\xf2\x18\x84\xca\xff\xb9\x08\x5c\x89\xc1\xf5\x9c\x38\xb6\xd3\x01\xc0\xa9\xf7\x8d\xa0\xe2\x52\x45\xf4\x49\xf6\xdd\xbe\x36\xe9\x0f\xba\x30\x31\xfc\xdf\xdf\x0d\xd6\x7b\x22\xc3\xa3\x91\x2e\x0c\xd9\xf5\x2d\x85\x8c\xe7\xdc\xf2\x04\xbe\xe0\x96\xbb\xbf\xbf\xd2\x2b\xc1\x73\xea\x2e\xde\xa0\x6b\xee\xbd\xb1\x68\xa3\x03\x0d\xff\xb2\xf8\xa6\x8e\xf6\xe2\x04\xd6\x74\xe3\x38\x7c\x0a\xff\x0a\x00\x00\xff\xff\x3d\xed\xdf\xcd\x7e\x13\x00\x00") +var _runtimeSyntaxSyntax_converterGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x58\x5f\x6f\xdb\xb6\x16\x7f\x96\x3e\xc5\xb9\xbc\x28\x20\xd5\xaa\x8c\x26\xe9\x8b\xef\x35\x82\x61\x58\xd1\x0e\xe8\x56\xc4\xdb\x53\x64\x34\x8c\x45\xdb\x5c\x25\x4a\x20\xa9\x34\x41\xe6\xef\x3e\x9c\x43\x4a\xf2\xff\xd8\xdd\xb0\x17\x47\x3c\xe4\xf9\xf7\xe3\xf9\x1d\x92\xa9\xf9\xec\x2b\x5f\x08\x28\xb9\x54\x61\x28\xcb\xba\xd2\x16\xa2\x30\x60\xf3\xd2\xb2\x30\x60\xb2\x1a\xca\xaa\xb1\xb2\xc0\x41\x65\xf0\x57\x8b\x85\x78\xac\xf1\xcb\x58\x2d\xd5\xc2\xb0\x30\x0e\x43\xfb\x54\x0b\x98\x48\xb5\x28\xc4\x4d\x53\x08\x30\x56\x37\x33\x0b\xcf\x61\x30\xab\x8a\x4a\x83\x5b\x1b\x06\xa4\xdd\x8e\x56\x5e\xef\x53\x53\x58\x79\x54\xcd\x58\xae\x6d\x37\x12\x2a\x07\x58\x33\x32\x1c\xc2\xcf\x95\x54\x64\xc1\xf2\xaf\xc2\x00\x07\xf3\xa4\x2c\x7f\x04\x8d\xb2\xe8\xdb\x52\xce\x96\x30\xe3\x0a\xee\x05\x94\xe8\xad\x2e\x04\x68\xb1\x68\x0a\xae\x41\x3c\xd6\x5a\x18\x23\x2b\x65\x62\xb4\xc5\x55\x0e\x7f\x54\x52\x19\x90\x16\xa4\xb2\x15\x54\x6a\xdf\x6a\xb8\x7f\x82\x5f\x6f\xa4\x5a\x80\x78\x10\xfa\xc9\x2e\xf1\xd3\x56\x0b\x61\x97\x42\x87\xf3\x46\xcd\xba\xb0\x22\xed\xb3\x93\x6a\x11\xfb\xbf\x98\xa5\xa9\x0b\x69\x61\x34\xf6\x22\x93\x4e\x50\x40\xab\x13\xb8\x63\xc0\xee\xe2\x30\xc0\x58\x44\xbe\xbe\x0a\xcd\x46\xa4\x9b\x00\xfb\x93\xf5\x6b\xc6\xe0\x3e\x10\x68\xdb\x68\xd5\x0e\x57\xa1\x8b\xa7\xe6\xda\x88\xf7\xb2\x10\x91\x15\x8f\x36\x81\xb9\x2c\x84\xe2\x65\x1f\x5a\x84\x12\xdc\x94\xc4\x23\x98\xc0\x52\xf0\x5c\xb4\x5b\x91\x10\xa2\x06\x6e\xa7\x52\x59\xa1\xe7\x7c\x26\x9e\x57\x31\xa6\x52\x48\x25\xcc\x6e\x2a\xce\x0f\xcb\x14\x8b\xc3\x30\x18\x0e\xe1\x86\x2a\x60\x5e\x69\x0a\x06\x71\xf0\x5b\x65\x2c\xb7\xa2\x14\xca\x9a\x30\x70\xa2\xcf\x18\xad\x46\x9b\xae\xe8\xd2\x4f\x8d\xb1\x3f\x56\x65\x8d\x09\xdc\x79\x35\x16\xa5\xaf\xaf\x63\x96\x99\x01\x7e\xc5\x6c\x80\x90\xed\xf5\xd3\x25\xd2\xfb\x71\xa2\xe3\x7e\xbc\x9a\xb3\x7e\x77\x38\x0b\xcb\x55\xce\x75\xbe\x5e\x79\x26\x0c\xf0\xcf\x71\xfb\xae\xd2\x29\x8b\xcc\x0c\xa2\xeb\x51\x16\x45\xe9\xe0\x3a\xbe\xce\x70\x1c\x5f\x77\x8e\x8f\xa2\xe7\xb6\xe5\x9b\xb4\x4b\x20\xb2\x8c\x59\x9a\xa6\x0c\x84\xca\xdd\x97\x8b\x64\x82\x53\x3f\xa9\xfc\xef\x45\xe4\x1d\x50\x5c\x99\x19\x90\x8f\x1e\x1d\x0c\x0e\x8b\xe1\x97\xa6\x4c\xe8\x83\xdc\x70\xb5\x10\xe0\x6a\xe4\x39\x0c\xa8\x5a\xa0\xaf\x95\xdf\xb4\x2c\x27\x35\x9f\x89\x08\x27\xe2\x30\x08\xe4\xdc\xe9\x8e\xc7\xc0\x18\xa9\x04\xb3\x4a\x59\xa9\x1a\x11\x06\xc1\xca\xad\x68\xd5\x3f\x70\xf3\x59\x8b\xb9\x7c\x24\xf5\x04\xd8\x7f\x59\x7c\xb6\x8e\x03\xb2\x55\x74\xa3\x4f\xdc\xce\x96\xbe\xac\xd7\x4a\x32\x7d\x2f\x55\x3e\x69\xee\x4b\x9c\x8e\x6e\xa7\xf7\x4f\xd6\x47\x8e\xa1\x53\xec\x42\x45\x1b\x26\x62\xcc\xe4\xd2\xd9\x0e\x5a\x92\x75\x08\x6c\xae\xbd\x7d\x3b\x25\x3b\x3e\x08\x18\xf7\x7d\x64\xef\xf2\x8b\xa9\xf3\xbb\x02\x51\x18\xd1\xfa\x28\x6d\xfa\x59\x4b\x65\x0b\x15\xb5\x34\x4f\xfa\x8d\x61\x93\x2d\xd6\x81\x34\xa0\x2a\x0b\x0f\xbc\x90\xf9\x08\xd8\xa0\xdd\x89\x0d\x10\x09\xc5\x97\x90\x74\x8c\x69\x91\x1c\x0e\xe1\xc3\x16\xf3\x50\xec\x16\xad\x01\xbc\xce\xc5\xd3\x00\xde\x30\x41\x00\x5f\xf8\xe4\x3d\x67\x77\x81\xdb\x50\x41\x9c\xcf\x07\x6e\x3b\x99\xb3\x80\x0b\x09\x8f\x49\xcf\xd9\x04\xee\x1b\x8b\x07\xcd\xac\x6a\x8a\x1c\xcf\xa7\xae\x91\xd0\xf9\xc7\xb5\x7d\x23\x54\xee\x10\xef\x9b\x49\x4a\x29\x4c\x5c\x52\xe4\xb0\x03\x7b\xb2\xa7\x11\xf9\x29\xd2\x05\xbb\x74\x4c\xa4\x32\xf7\x18\x13\x47\x7b\xeb\xc7\xe1\x7f\xe0\x1a\x36\xcf\x67\x27\xa3\x5e\x32\xb1\xdb\xe2\x79\xc1\x17\x66\x4d\xd6\xd2\xc3\xdb\xa7\x8d\xbb\xf2\xe0\x0f\x87\xf0\x91\xa6\x11\xd5\x2b\x0c\x55\x51\xbc\x0d\xb6\x2b\x53\x8b\x99\x9c\x4b\x91\x83\xa9\x4a\x01\x3c\xcf\xa5\x95\x95\xe2\x85\x77\x61\x2b\x5c\xe7\x91\xc7\xf0\x7a\x7a\x79\x5f\x1d\xb3\x9c\xc2\xee\xfc\x85\x9f\x97\x73\x6f\xf3\x3f\x7d\xff\x09\x82\x2e\xc1\x31\xb0\xe8\x9a\xc1\xc0\x2f\x1a\x00\x8b\x71\xb4\x43\xd3\xd6\xec\xa5\x2f\xb4\xcd\x4a\x5b\xb7\x77\x82\xea\x5a\xa5\xee\x83\xf0\x72\x1f\x84\x97\x09\xa8\x6a\x17\xa9\x6f\x42\x0b\x58\xc8\x07\xa1\x4e\x42\xeb\x94\x38\xf7\x36\xa1\x8d\x58\x90\x24\x97\x58\xd5\xb4\xaf\x5a\xa0\x8c\x43\xad\xab\xfb\x42\x94\x27\x51\xef\xa3\x22\x92\xf5\xdc\x3b\x46\x37\xfc\x75\xa7\xe2\x18\x78\x5d\x0b\x95\xd3\xbd\xca\x24\x6b\xf7\xd4\x67\xca\x3c\xe9\x2a\x77\x85\x86\x7a\x8c\x77\x8f\xcc\xe3\xbc\x73\x5c\xdd\x26\xde\x36\xc7\xb6\x2c\x7e\x1f\xd7\x36\x6f\xc4\x4e\x46\xbe\x3b\xc9\x70\x08\xbf\x1b\x01\x25\xdd\x67\x8d\xdf\xf8\xfb\x27\xc8\xc5\x9c\x37\x05\xf5\x60\x27\x1b\x8d\x81\x95\x78\xb7\xdf\x4f\xcd\x77\xfb\xf6\xf2\x5d\xcf\xca\x5a\x57\x0f\x32\x3f\x44\xca\x33\xd8\x38\x38\x4c\x47\x97\xed\xee\xfc\xa5\x9f\xc7\xcc\x77\x67\xaf\xa6\xf1\x0b\x9c\x39\xdc\x76\x5c\x6e\xb9\xcc\xa9\x6c\x7d\x8e\xdf\x97\xdd\xa1\xe0\x2f\x8e\x06\x7f\x39\x3d\x81\x4e\x57\x48\xa7\x77\xff\x1a\x9d\x86\x43\x77\xcf\xbc\xa5\x94\xa7\x87\xda\x20\x8b\xf0\xd7\xa5\x8d\xb2\xf4\xf5\x35\x49\x30\x51\x5a\x73\x98\x9a\xdd\x53\xb0\x65\x26\x59\x49\x50\xd5\x71\x33\xa4\x50\xdc\xeb\xa6\x7b\xd6\x2c\x84\x12\x9a\x5b\xf7\xb2\xf9\xbe\x17\x4c\xff\x26\xab\x1a\x5b\x37\xf4\x28\x63\x2c\xec\x86\x83\x31\x20\x9c\x93\x1a\xf1\x9c\x47\xac\xf5\x32\x82\x57\x26\x53\x99\x62\xee\x31\x85\xa2\xf8\xa0\x52\x2e\xac\x98\xd9\x11\x64\x0a\x00\xba\xc7\xd7\x08\x32\xf6\xca\x64\x8c\x8c\xb4\x97\xaa\x1b\x51\x17\x78\x1f\xde\x19\xfb\x9c\x58\x96\x31\xfa\xa5\xbf\x6f\xde\xc6\x38\x60\x5e\xc4\x9c\x08\x6f\xe3\x72\xde\xa6\xdf\x9f\x64\x07\xa2\xc3\x98\xdc\xda\xb3\x22\x72\x2a\xa7\x46\x44\xdb\xd7\x07\xc0\x32\x45\xdb\x31\xca\x14\xf3\x6f\x87\x2f\x09\xe8\xfe\xc9\xe0\x36\xeb\xb9\xbf\xff\x24\x50\x7d\xa5\xe9\x34\xea\xfb\x78\xfc\x3f\x94\x12\x49\x8e\x24\xf7\x06\x5e\x99\x8d\xd4\xd0\x5e\xda\x15\xda\xf1\x34\x69\x2d\x9d\x13\x27\xa7\xba\x75\x92\xac\x45\xde\x95\xf9\x19\x81\x6f\x45\x1c\xbf\xa0\x03\xf4\x2f\x12\xae\xed\x59\x9b\x49\xf6\x3d\xe7\x4e\xcd\xf2\xa5\x28\x84\xca\xcf\x8f\x41\xa8\xfc\x9f\x8b\xc0\x95\x18\xdc\x4e\x89\xa9\x3b\x7d\x04\x9c\x7a\xd7\x4e\x4a\x2e\x55\x44\x07\xbb\x3f\x33\x2a\x93\xfe\xa0\x17\x26\x86\xff\xfb\x17\xc6\x7a\x67\x65\x78\xc1\xd2\x0b\x43\x76\x7d\x63\x22\xe3\x39\xb7\x3c\x81\x2f\xb8\xe5\xee\x9f\x68\xe9\x8d\xe0\x39\xf5\x28\x6f\xd0\x1d\x11\x9d\xb1\x68\xa3\x8f\xf5\xff\xab\xf1\x47\x03\xda\x8b\x13\x58\xd3\x8d\xe3\x70\x15\xfe\x15\x00\x00\xff\xff\x51\x4d\x1d\x2e\xc4\x13\x00\x00") func runtimeSyntaxSyntax_converterGoBytes() ([]byte, error) { return bindataRead( diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 722f42b0..52f975ca 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -22,12 +22,6 @@ var ( vtScratch = ViewType{false, true} ) -type scrollInfo struct { - left int - offset int - style *tcell.Style -} - // The View struct stores information about a view into a buffer. // It stores information about the cursor, and the viewport // that the user sees the buffer from. @@ -38,8 +32,7 @@ type View struct { // The topmost line, used for vertical scrolling Topline int // The leftmost column, used for horizontal scrolling - leftCol int - hScrollInfo []*scrollInfo + leftCol int // Specifies whether or not this view holds a help buffer Type ViewType @@ -166,23 +159,6 @@ func (v *View) ToggleTabbar() { } } -func (v *View) calcHScrollInfo() { - v.hScrollInfo = make([]*scrollInfo, v.Height) - for i := v.Topline; i < v.Topline+v.Height; i++ { - if i >= v.Buf.NumLines { - break - } - - left, offset, style := visualToCharPos(v.leftCol, i, v.Buf.Line(i), v.Buf, int(v.Buf.Settings["tabsize"].(float64))) - v.hScrollInfo[i-v.Topline] = &scrollInfo{left, offset, style} - } -} - -func (v *View) SetLeftCol(n int) { - v.leftCol = n - v.calcHScrollInfo() -} - func (v *View) paste(clip string) { leadingWS := GetLeadingWhitespace(v.Buf.Line(v.Cursor.Y)) @@ -251,8 +227,7 @@ func (v *View) OpenBuffer(buf *Buffer) { v.Buf = buf v.Cursor = &buf.Cursor v.Topline = 0 - // v.leftCol = 0 - v.SetLeftCol(0) + v.leftCol = 0 v.Cursor.ResetSelection() v.Relocate() v.Center(false) @@ -431,13 +406,11 @@ func (v *View) Relocate() bool { if !v.Buf.Settings["softwrap"].(bool) { cx := v.Cursor.GetVisualX() if cx < v.leftCol { - // v.leftCol = cx - v.SetLeftCol(cx) + v.leftCol = cx ret = true } if cx+v.lineNumOffset+1 > v.leftCol+v.Width { - // v.leftCol = cx - v.Width + v.lineNumOffset + 1 - v.SetLeftCol(cx - v.Width + v.lineNumOffset + 1) + v.leftCol = cx - v.Width + v.lineNumOffset + 1 ret = true } } @@ -715,7 +688,7 @@ func (v *View) DisplayView() { left := v.leftCol top := v.Topline - v.cellview.Draw(v.Buf, v.hScrollInfo, top, height, left, width-v.lineNumOffset) + v.cellview.Draw(v.Buf, top, height, left, width-v.lineNumOffset) screenX := v.x realLineN := top - 1