mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-05-28 00:21:57 +02:00
Compare commits
616 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4494783964 | |||
| 6f45b7a83c | |||
| 9352553da0 | |||
| 78330ec132 | |||
| 5c9e4f17bc | |||
| 86d7c475d6 | |||
| 9bd435daa1 | |||
| 21d545e55d | |||
| e4f9c806e5 | |||
| 07c2bd2d5e | |||
| f9905d3944 | |||
| aa5e59d5eb | |||
| c60da0b7b6 | |||
| 31f660b37a | |||
| 116d179fc0 | |||
| 1c7b224c37 | |||
| fc698b39fe | |||
| 5f81e8ad27 | |||
| 34d334c013 | |||
| 04820b04d6 | |||
| dae5f35607 | |||
| 10244aa84b | |||
| 313941f77d | |||
| 435935bf0b | |||
| 4888e4d704 | |||
| 0aef550233 | |||
| 01100ceedc | |||
| fb48afe434 | |||
| 1ebdd8968f | |||
| 2da8cec3c2 | |||
| e9f75c50c1 | |||
| b4d507b9d0 | |||
| ded90a7def | |||
| 44b0f3bc30 | |||
| c8a0b8cdfb | |||
| 99eb5f2c9c | |||
| b5688c3ef3 | |||
| 3ed1ee17eb | |||
| f9d04339ee | |||
| bc6c0f325c | |||
| 7092cfd2f8 | |||
| dbf3bcd840 | |||
| 4367811170 | |||
| a4f7e934f5 | |||
| bf9f50247f | |||
| 8d96449a24 | |||
| a6ce4014c4 | |||
| 1178591d1f | |||
| 073ba3f0e8 | |||
| 26f1599979 | |||
| 2dc63d8e16 | |||
| 5d7d4f9684 | |||
| 40c88bce6f | |||
| a409aa7c89 | |||
| ddd5a2bd4b | |||
| 5bc897df9d | |||
| 2f3a9d7740 | |||
| 3aaef67b85 | |||
| 9f957bcd6c | |||
| 9a01753529 | |||
| ac4412ace2 | |||
| b712dd06eb | |||
| 8cad670f16 | |||
| fe79caddfa | |||
| 33c4dd0eef | |||
| d5365574cc | |||
| 615d7dd609 | |||
| e411119903 | |||
| 1ab1bec908 | |||
| 770796042e | |||
| f5a8f4f083 | |||
| c36f69c013 | |||
| b05db8d377 | |||
| b262a38339 | |||
| 3b2784e277 | |||
| 04a6eb68d0 | |||
| 25d39a282a | |||
| fdd9622c00 | |||
| be45005f25 | |||
| 281f280eb1 | |||
| 9c1037f556 | |||
| 2b77fe974e | |||
| fc05fb5e3e | |||
| b7b4e364c4 | |||
| ed55437203 | |||
| b07059a739 | |||
| 00a63422ca | |||
| a3bc1d1a86 | |||
| 629eb02403 | |||
| a81d84df1f | |||
| 19314f214b | |||
| baeec8addc | |||
| 49c9e43d59 | |||
| 0b5eab9c89 | |||
| 49a5d8fbab | |||
| 5f972f11ac | |||
| 554448b77f | |||
| c8d08d3d53 | |||
| 9539d1240e | |||
| f6785cd6c8 | |||
| 2688634afb | |||
| 2a1aff523b | |||
| d2d8135617 | |||
| e33ea64952 | |||
| 6a36ea9a4f | |||
| 98d113300f | |||
| 814f3a5ed0 | |||
| 99805e6988 | |||
| fd2804b9df | |||
| 6f553b7ad5 | |||
| 67df700615 | |||
| ad7da68f84 | |||
| a396b2f7bf | |||
| bb28facdad | |||
| 25133f7d03 | |||
| 6907a6b43e | |||
| 6a87e8cc02 | |||
| d04263aee2 | |||
| 64d84c49fa | |||
| 823ab3d45a | |||
| 2a5bbeead5 | |||
| 935ea1a658 | |||
| bf68c50168 | |||
| 84c844a956 | |||
| 889b7064e3 | |||
| 7a5e3f51cb | |||
| f03063e1cf | |||
| 32c1d587d8 | |||
| 497535c098 | |||
| 8624d40d53 | |||
| dc8a6b7bec | |||
| c5d549a4e0 | |||
| 3eb0ca1305 | |||
| 6ab612e357 | |||
| 16caec3a2b | |||
| 3506261522 | |||
| 6cc607a2f4 | |||
| 4894e8fb74 | |||
| a2e0526744 | |||
| d69e140c24 | |||
| 7cae9e965c | |||
| 2d7c78f24c | |||
| a8da347a13 | |||
| 2e45751630 | |||
| 8cd984a56b | |||
| 650cb7ac61 | |||
| ae400c2dbb | |||
| 507a68ef81 | |||
| 271ef88821 | |||
| 9a248b819d | |||
| 6aeca470b5 | |||
| 936863de98 | |||
| d96b64262d | |||
| 200d3e5957 | |||
| 4ca28fccbd | |||
| 9c08729d42 | |||
| 8e0d50c1ed | |||
| 865619bc65 | |||
| 3b1a4d48f0 | |||
| 6c124f1604 | |||
| 44c21d0863 | |||
| ad1b34005d | |||
| 107a1cf7cc | |||
| cbe2f307b1 | |||
| 5213b783d7 | |||
| c6babee370 | |||
| b4b97fe905 | |||
| cd37d01770 | |||
| d8b193e98b | |||
| 629579e8a0 | |||
| 9d6d075726 | |||
| 7d6909d353 | |||
| b75c36581f | |||
| ae253a2dad | |||
| 21cced3fc6 | |||
| 29745cf124 | |||
| 699de3c049 | |||
| 5560396666 | |||
| 8570b5df1f | |||
| 7391be3977 | |||
| 7068f9086c | |||
| af2e8b9e3b | |||
| 7d87f83e26 | |||
| eb6512ab82 | |||
| c2d5277fc9 | |||
| e9d2694dce | |||
| 36154dd8c0 | |||
| 0d778b28a4 | |||
| fa7096a6ee | |||
| cc2b9e2245 | |||
| 2cd4c80953 | |||
| 8303ab1b1a | |||
| 3ef707c468 | |||
| b3ec0ad87a | |||
| 4486bb71fb | |||
| 176ab5d393 | |||
| aff8366139 | |||
| d05fb395d1 | |||
| e764e25045 | |||
| bd178a9659 | |||
| 5a5cd60221 | |||
| 7c3e218035 | |||
| 760e36dc8b | |||
| 941e7a992d | |||
| 7108d56061 | |||
| d5a9cdd9c8 | |||
| 60ed6e1213 | |||
| d628c3711d | |||
| 3344f11140 | |||
| f047b3aa3e | |||
| 31ad5d0472 | |||
| edbdca29e1 | |||
| 5433ca7d4c | |||
| 816ac0a441 | |||
| 90e4752df4 | |||
| 0978ebc1c6 | |||
| f486bb41d6 | |||
| 44227b9a93 | |||
| ad02696d27 | |||
| 87658a916a | |||
| 66299b9ed5 | |||
| fc072b7b61 | |||
| fef8272db2 | |||
| b04c78a6a0 | |||
| 99b7765c18 | |||
| c8e331a5f5 | |||
| 03f0a92f69 | |||
| ca96b60e9a | |||
| ea811731f0 | |||
| 11b068fc25 | |||
| 097577c351 | |||
| 250b62c9a8 | |||
| 54fea5fe67 | |||
| e63aad92b1 | |||
| 8ac99eed90 | |||
| 25b4e351c9 | |||
| 20da24a60c | |||
| 0873fb8f49 | |||
| 839717064f | |||
| cee529f197 | |||
| a3935654b8 | |||
| ff7ca495c1 | |||
| 335f08054d | |||
| fa0d5e0ba9 | |||
| 1f4d8dd8e1 | |||
| b465ee5bbe | |||
| 919b11d301 | |||
| f5cfc6a148 | |||
| 915fba8a25 | |||
| 6b64a62626 | |||
| 0ee0fbc2d4 | |||
| 8db81befc3 | |||
| 47b763090e | |||
| 99b962f986 | |||
| e6b7f4ff3b | |||
| 11f7764bd6 | |||
| 3f2fbccc21 | |||
| 84602997b6 | |||
| 19a1e1db6b | |||
| 0949ad4f8b | |||
| 8f5131b2d7 | |||
| 682e144672 | |||
| a05172e1db | |||
| 9b0f42ed24 | |||
| 7b900cf55a | |||
| 82c9ce9eeb | |||
| 104a7e6484 | |||
| 1e2844207d | |||
| b39439f386 | |||
| 185e34337d | |||
| e711158eed | |||
| f43ffacda1 | |||
| 160f5fa78f | |||
| 7ebc297d1d | |||
| 3a9b07d2d2 | |||
| 86d424677a | |||
| 1666886eaa | |||
| 7f3a4e21e7 | |||
| 49b3032c6d | |||
| 153c893e9e | |||
| e07aeca8c3 | |||
| 788aadad0a | |||
| 396732e9af | |||
| 1c74207cd6 | |||
| eb9ece5bf1 | |||
| 204e14b994 | |||
| 2e8bea32db | |||
| e70fb38670 | |||
| 3d56969f47 | |||
| 294d03baf6 | |||
| ac96dc67ba | |||
| 0413dcf3f1 | |||
| 40263195cb | |||
| dd76f85f0b | |||
| e93e9c4201 | |||
| a4a14b39ac | |||
| 49eeb133ac | |||
| 28de969ae3 | |||
| 6961a51e9a | |||
| f679af784b | |||
| fd8e8e0b4f | |||
| cd5ca1918d | |||
| 27d4ee55ae | |||
| 23e38c4298 | |||
| 0486075221 | |||
| 7a010c4a46 | |||
| 9aeade7147 | |||
| 5663536b1f | |||
| 95f42c734a | |||
| e1ece272fa | |||
| 73b5d1837c | |||
| 790f685006 | |||
| a680267d49 | |||
| 5f1547b288 | |||
| 9d9a5983f5 | |||
| 16e57e6189 | |||
| 5d45d4a4d2 | |||
| 0546647038 | |||
| c9ad0b6d4d | |||
| 25306ee0c5 | |||
| 2e024248fa | |||
| 85879328b0 | |||
| 9c530a8030 | |||
| 9105eb1fd0 | |||
| c49868a11f | |||
| 795860de7c | |||
| 90a729a8e4 | |||
| 1a328483b7 | |||
| 5e09d64d77 | |||
| 4591403b7e | |||
| e90f76c1aa | |||
| 8745e4380e | |||
| cd7a1f6539 | |||
| bb21f9f120 | |||
| 38c7ababf6 | |||
| 5aea857883 | |||
| 322b4eec7e | |||
| 886d3d7aed | |||
| b2f7a2f021 | |||
| 4374e9787e | |||
| 080a7c2c6c | |||
| ffef064005 | |||
| d23a68d047 | |||
| c973e12d3e | |||
| 5e0543116b | |||
| d9f633dbb3 | |||
| 32cb07dd61 | |||
| 40ae005819 | |||
| c4e8fcc338 | |||
| 9dbb79f942 | |||
| 031479c46b | |||
| 843a3a41bf | |||
| 01973d329c | |||
| bcfeb7c895 | |||
| 46b250b75f | |||
| 9b06b0a4b2 | |||
| 80b36e7995 | |||
| d29599b7ea | |||
| a63fc2427e | |||
| 393e47945b | |||
| 5100db4427 | |||
| 19ee857237 | |||
| 781ac5b687 | |||
| 9b52c915d9 | |||
| 7a68824771 | |||
| c2aed127ca | |||
| 12b3ecfdcd | |||
| 4143f69655 | |||
| 7a720947c8 | |||
| 9393a4151c | |||
| 95a678d204 | |||
| 68cec2f91b | |||
| 5ed292ebfb | |||
| 6d70e1a179 | |||
| 355d2ec231 | |||
| c6ceb6c969 | |||
| 60c1c58967 | |||
| ba43ddb524 | |||
| 2a032c05b7 | |||
| 8d8aecf662 | |||
| 380d7b2cbf | |||
| 30a12fc740 | |||
| 43050b40f8 | |||
| d5dfed9cfc | |||
| 0e2e98e570 | |||
| d0a875e3af | |||
| b770256474 | |||
| e14b8cd599 | |||
| 938149499b | |||
| 9245af7148 | |||
| a874eae869 | |||
| cca95bae41 | |||
| 243fcce65c | |||
| b8c8a68a5c | |||
| 8502d5f2b2 | |||
| da857362b0 | |||
| 4c50d72cdf | |||
| 9af39a7cb2 | |||
| d4038f59f4 | |||
| 9150d82be1 | |||
| 87694dc1bf | |||
| 22704e2bb4 | |||
| 95676cfcd4 | |||
| 1e901456a5 | |||
| 899f9a6260 | |||
| 6b989afdb1 | |||
| 4f48c32bc3 | |||
| c2ea4b240d | |||
| f81158c840 | |||
| 3950b3a6b1 | |||
| ae65cb89b3 | |||
| f90e3c31ab | |||
| 014700ca55 | |||
| f86423097b | |||
| a4cdb9b1c4 | |||
| 03a1a0ea74 | |||
| 4e1a1cad93 | |||
| e4abcd6741 | |||
| b0f34cac04 | |||
| dd243c8ab1 | |||
| 02592cfe41 | |||
| e706fca4d6 | |||
| 8d00a30b0a | |||
| 76200b7c03 | |||
| e648d3b011 | |||
| 1db4b7903b | |||
| e5e129b933 | |||
| 354968a9b9 | |||
| 87e4ef758b | |||
| 2b721c9e9c | |||
| c50143db47 | |||
| 2153ab22d7 | |||
| aefc975f1b | |||
| 79851d47b1 | |||
| 2c9f69f2bf | |||
| 9dc3e9172c | |||
| 2e69b16f67 | |||
| 462fb78a85 | |||
| d2dbd62e7b | |||
| e1c4adc8c9 | |||
| 2ffc552c25 | |||
| 7845992803 | |||
| 3142e74a3a | |||
| 1eb73428b0 | |||
| c5b2d1b5b4 | |||
| 2ab7e98bb8 | |||
| ebf311d2df | |||
| 88d6d362c3 | |||
| daf5b3430a | |||
| b13dede64d | |||
| bd1000809d | |||
| 2614f8ee3e | |||
| dd3577db8c | |||
| ff92260a55 | |||
| 90c9bf33a2 | |||
| 8f0b9d6525 | |||
| b9eb197443 | |||
| a61f1bf714 | |||
| c7323339d9 | |||
| 48fc2be299 | |||
| a5be20ba89 | |||
| 48874c704b | |||
| b8d2ad693a | |||
| d11de6c31d | |||
| 4c5d17ec00 | |||
| 34207703d8 | |||
| 8ff21dbb7c | |||
| 1cd2bd4a21 | |||
| 32561e2742 | |||
| fe0e293cb9 | |||
| dcaf01ff54 | |||
| adac29fc57 | |||
| 341e36b48d | |||
| 7b26c6980f | |||
| 668c778621 | |||
| 279e83bccc | |||
| c1a71eedb5 | |||
| 4dea3b30d0 | |||
| 05b47ac89e | |||
| 3965aefc79 | |||
| be089b8aa0 | |||
| 7aab071854 | |||
| cff1a9e3c9 | |||
| 7d03b73992 | |||
| 213d223679 | |||
| f00a001406 | |||
| 7ae32a1bef | |||
| 62b5aae721 | |||
| 1741da563b | |||
| c3239dd5e5 | |||
| 09eb973f44 | |||
| 1dfdf3ebaa | |||
| d50de2f2f0 | |||
| 233164a7d2 | |||
| ae96eb8469 | |||
| d676af07ec | |||
| 73827e6e15 | |||
| 8420566635 | |||
| e4c49238bd | |||
| 616f845128 | |||
| 09c7a21e4f | |||
| 9e75f31ff2 | |||
| 950ef8ff2f | |||
| 915d2e30ac | |||
| 6319b9c517 | |||
| 0dde2b7232 | |||
| 5d900f6f7e | |||
| 6907698f60 | |||
| ce49edcc1e | |||
| 911a34fed0 | |||
| a57ecd4e2e | |||
| 81a5c6dd4e | |||
| a53e7167fc | |||
| 6cf044c8fc | |||
| d0645670b5 | |||
| 3157d8636c | |||
| 8bb0169bd0 | |||
| 00d911af72 | |||
| 1111099ec1 | |||
| 9b4580c4dc | |||
| e63ff36e87 | |||
| 198610ad25 | |||
| a57332a176 | |||
| 9bd6777571 | |||
| aee4e6d6ca | |||
| 7112e2b5f7 | |||
| f9064e4c16 | |||
| 69c156faf4 | |||
| dd74c0b520 | |||
| f6ecb9aae9 | |||
| bc82e6d58e | |||
| 667279dbca | |||
| 331a21d0bd | |||
| 2cccddd458 | |||
| 49a52f9eff | |||
| f231eff6c2 | |||
| 3a8ce4e72c | |||
| 52f08cc6aa | |||
| 1a91b2a5c9 | |||
| 467b890d13 | |||
| fa6eedf24f | |||
| 0b546f60b1 | |||
| 1957b370bb | |||
| 275fc44523 | |||
| ee1fd606dd | |||
| ac3900639d | |||
| aa3ac2d303 | |||
| e84420f7d1 | |||
| 678ceed917 | |||
| f3c411fafe | |||
| 1506bb79d9 | |||
| d366864ff5 | |||
| 69742a596f | |||
| 3d2d6a810e | |||
| 6fb7a6f38b | |||
| cf7a0a71bd | |||
| 6e1e046cbb | |||
| 2d1fc65b0e | |||
| e378d7332b | |||
| 4879bdfc5e | |||
| 52bb6e960f | |||
| 0b018a5836 | |||
| ae2eb1cf48 | |||
| 597590c414 | |||
| 2a70805ffb | |||
| 86ae8db7d6 | |||
| dc9008674b | |||
| 99b9fe4a6d | |||
| 1d73dbfbe5 | |||
| 7d9d31e97d | |||
| 8bc680dd63 | |||
| 5da159c4eb | |||
| def2d1a9e4 | |||
| bdb7f8efa6 | |||
| db0d1f51a5 | |||
| 6b4059f69d | |||
| 232024f71d | |||
| d732c28bfc | |||
| e5bae4cb22 | |||
| bb36e94f24 | |||
| 2e22c44eab | |||
| f6f6f2c8f8 | |||
| ad6fe811e7 | |||
| deaae7e717 | |||
| e52ae8cbc0 | |||
| 8e7466bccc | |||
| 4100056f46 | |||
| df35270598 | |||
| b2e17cca75 | |||
| e25a17541d | |||
| e76375a3e9 | |||
| ea83ab3650 | |||
| c53513d4ac | |||
| 06c64fe88c | |||
| b39b209d02 | |||
| 3e5bc79f11 | |||
| 96e61949b3 | |||
| ce613d4671 | |||
| b2e259fb62 | |||
| 28132658b2 | |||
| 92ed496e29 | |||
| 91ed612ac0 | |||
| cec4f8b9ee | |||
| 22799739f5 | |||
| 053d76dc13 | |||
| 38a0fd10d1 | |||
| 325a3db78d | |||
| 27c683092d | |||
| 0b896e4f59 | |||
| 6fcd21f338 | |||
| 316034e1db | |||
| dd46cfc500 | |||
| 28c43bdc64 | |||
| 97b5e3c119 | |||
| 17f08c9776 | |||
| 9e2f853d00 |
+16
@@ -3,9 +3,25 @@
|
||||
src/MacVim/MacVim.xcodeproj/*.mode1
|
||||
src/MacVim/MacVim.xcodeproj/*.mode1v3
|
||||
src/MacVim/MacVim.xcodeproj/*.pbxuser
|
||||
src/MacVim/icons/*.pyc
|
||||
src/MacVim/icons/*.ttf
|
||||
src/MacVim/icons/*.reg
|
||||
src/MacVim/icons/*.zip
|
||||
src/MacVim/icons/*.txt
|
||||
src/MacVim/icons/*.so
|
||||
src/MacVim/icons/*.egg-info
|
||||
src/MacVim/icons/build
|
||||
src/MacVim/icons/makeicns/*.o
|
||||
src/MacVim/icons/makeicns/makeicns
|
||||
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1
|
||||
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1v3
|
||||
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.pbxuser
|
||||
src/MacVim/PSMTabBarControl/build
|
||||
src/MacVim/edit-in-odb/Edit in ODBEditor.xcodeproj/*.mode1
|
||||
src/MacVim/edit-in-odb/Edit in ODBEditor.xcodeproj/*.mode1v3
|
||||
src/MacVim/edit-in-odb/Edit in ODBEditor.xcodeproj/*.pbxuser
|
||||
src/MacVim/edit-in-odb/build
|
||||
src/MacVim/PSMTabBarControl/build
|
||||
src/MacVim/build
|
||||
src/TAGS
|
||||
src/Vim
|
||||
|
||||
@@ -285,6 +285,7 @@ SRC_DOS = \
|
||||
src/proto/os_win32.pro \
|
||||
src/proto/os_mswin.pro \
|
||||
src/testdir/Make_dos.mak \
|
||||
src/testdir/Make_ming.mak \
|
||||
src/testdir/dos.vim \
|
||||
src/uninstal.c \
|
||||
src/vim.def \
|
||||
@@ -682,9 +683,7 @@ LANG_GEN = \
|
||||
runtime/spell/??/main.aap \
|
||||
runtime/spell/yi/README.txt \
|
||||
runtime/spell/main.aap \
|
||||
runtime/spell/cleanadd.vim \
|
||||
runtime/spell/*.vim \
|
||||
runtime/spell/fixdup \
|
||||
|
||||
# generic language files, binary
|
||||
LANG_GEN_BIN = \
|
||||
|
||||
+10
-2
@@ -335,6 +335,8 @@ BufDelete Before deleting a buffer from the buffer list.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>" and "<abuf>".
|
||||
Don't change to another buffer, it will cause
|
||||
problems.
|
||||
*BufEnter*
|
||||
BufEnter After entering a buffer. Useful for setting
|
||||
options for a file type. Also executed when
|
||||
@@ -397,6 +399,8 @@ BufUnload Before unloading a buffer. This is when the
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
Don't change to another buffer, it will cause
|
||||
problems.
|
||||
*BufWinEnter*
|
||||
BufWinEnter After a buffer is displayed in a window. This
|
||||
can be when the buffer is loaded (after
|
||||
@@ -428,6 +432,8 @@ BufWipeout Before completely deleting a buffer. The
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
Don't change to another buffer, it will cause
|
||||
problems.
|
||||
*BufWrite* *BufWritePre*
|
||||
BufWrite or BufWritePre Before writing the whole buffer to a file.
|
||||
*BufWriteCmd*
|
||||
@@ -748,8 +754,10 @@ SwapExists Detected an existing swap file when starting
|
||||
'a' abort, like hitting CTRL-C
|
||||
When set to an empty string the user will be
|
||||
asked, as if there was no SwapExists autocmd.
|
||||
Note: Do not try to change the buffer, the
|
||||
results are unpredictable.
|
||||
*E812*
|
||||
It is not allowed to change to another buffer,
|
||||
change a buffer name or change directory
|
||||
here.
|
||||
*Syntax*
|
||||
Syntax When the 'syntax' option has been set. The
|
||||
pattern is matched against the syntax name.
|
||||
|
||||
@@ -806,13 +806,13 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
|
||||
:promptf[ind] [string]
|
||||
Put up a Search dialog. When [string] is given, it is
|
||||
used as the initial search string.
|
||||
{only for Win32, Motif and GTK GUI}
|
||||
{only for Win32, Motif, GTK and MacVim GUI}
|
||||
|
||||
*:promptr* *:promptrepl*
|
||||
:promptr[epl] [string]
|
||||
Put up a Search/Replace dialog. When [string] is
|
||||
given, it is used as the initial search string.
|
||||
{only for Win32, Motif and GTK GUI}
|
||||
{only for Win32, Motif, GTK and MacVim GUI}
|
||||
|
||||
|
||||
4.4 Changing tabs *change-tabs*
|
||||
|
||||
+32
-10
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29
|
||||
*cmdline.txt* For Vim version 7.2. Last change: 2008 Sep 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -157,6 +157,11 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
|
||||
(doesn't work at the expression prompt; some
|
||||
things such as changing the buffer or current
|
||||
window are not allowed to avoid side effects)
|
||||
When the result is a |List| the items are used
|
||||
as lines. They can have line breaks inside
|
||||
too.
|
||||
When the result is a Float it's automatically
|
||||
converted to a String.
|
||||
See |registers| about registers. {not in Vi}
|
||||
Implementation detail: When using the |expression| register
|
||||
and invoking setcmdpos(), this sets the position before
|
||||
@@ -436,13 +441,20 @@ between files with almost the same name. If there are multiple matches,
|
||||
those files with an extension that is in the 'suffixes' option are ignored.
|
||||
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
||||
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
||||
It is impossible to ignore suffixes with two dots. Examples:
|
||||
|
||||
An empty entry, two consecutive commas, match a file name that does not
|
||||
contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer
|
||||
"prog.c".
|
||||
|
||||
Examples:
|
||||
|
||||
pattern: files: match: ~
|
||||
test* test.c test.h test.o test.c
|
||||
test* test.h test.o test.h and test.o
|
||||
test* test.i test.h test.c test.i and test.c
|
||||
|
||||
It is impossible to ignore suffixes with two dots.
|
||||
|
||||
If there is more than one matching file (after ignoring the ones matching
|
||||
the 'suffixes' option) the first file name is inserted. You can see that
|
||||
there is only one match when you type 'wildchar' twice and the completed
|
||||
@@ -730,19 +742,29 @@ to use |fnameescape()|.
|
||||
In Ex commands, at places where a file name can be used, the following
|
||||
characters have a special meaning. These can also be used in the expression
|
||||
function expand() |expand()|.
|
||||
% is replaced with the current file name *:_%*
|
||||
# is replaced with the alternate file name *:_#*
|
||||
% Is replaced with the current file name. *:_%* *c_%*
|
||||
# Is replaced with the alternate file name. *:_#* *c_#*
|
||||
#n (where n is a number) is replaced with the file name of
|
||||
buffer n. "#0" is the same as "#"
|
||||
## is replaced with all names in the argument list *:_##*
|
||||
buffer n. "#0" is the same as "#".
|
||||
## Is replaced with all names in the argument list *:_##* *c_##*
|
||||
concatenated, separated by spaces. Each space in a name
|
||||
is preceded with a backslash.
|
||||
Note that these give the file name as it was typed. If an absolute path is
|
||||
needed (when using the file name from a different directory), you need to add
|
||||
":p". See |filename-modifiers|.
|
||||
#<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
|
||||
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||
number. *E809*
|
||||
{only when compiled with the +eval and +viminfo features}
|
||||
|
||||
Note that these, except "#<n", give the file name as it was typed. If an
|
||||
absolute path is needed (when using the file name from a different directory),
|
||||
you need to add ":p". See |filename-modifiers|.
|
||||
|
||||
The "#<n" item returns an absolute path, but it will start with "~/" for files
|
||||
below your home directory.
|
||||
|
||||
Note that backslashes are inserted before spaces, so that the command will
|
||||
correctly interpret the file name. But this doesn't happen for shell
|
||||
commands. For those you probably have to use quotes: >
|
||||
commands. For those you probably have to use quotes (this fails for files
|
||||
that contain a quote and wildcards): >
|
||||
:!ls "%"
|
||||
:r !spell "%"
|
||||
|
||||
|
||||
+38
-15
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.2. Last change: 2008 Aug 09
|
||||
*eval.txt* For Vim version 7.2. Last change: 2008 Nov 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1484,6 +1484,17 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
|
||||
This is the screen column number, like with |virtcol()|. The
|
||||
value is zero when there was no mouse button click.
|
||||
|
||||
*v:oldfiles* *oldfiles-variable*
|
||||
v:oldfiles List of file names that is loaded from the |viminfo| file on
|
||||
startup. These are the files that Vim remembers marks for.
|
||||
The length of the List is limited by the ' argument of the
|
||||
'viminfo' option (default is 100).
|
||||
Also see |:oldfiles| and |c_#<|.
|
||||
The List can be modified, but this has no effect on what is
|
||||
stored in the |viminfo| file later. If you use values other
|
||||
than String this will cause trouble.
|
||||
{only when compiled with the +viminfo feature}
|
||||
|
||||
*v:operator* *operator-variable*
|
||||
v:operator The last operator given in Normal mode. This is a single
|
||||
character except for commands starting with <g> or <z>,
|
||||
@@ -1695,7 +1706,7 @@ executable( {expr}) Number 1 if executable {expr} exists
|
||||
exists( {expr}) Number TRUE if {expr} exists
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
expand( {expr}) String expand special keywords in {expr}
|
||||
expand( {expr} [, {flag}]) String expand special keywords in {expr}
|
||||
feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filereadable( {file}) Number TRUE if {file} is a readable file
|
||||
filewritable( {file}) Number TRUE if {file} is a writable file
|
||||
@@ -1747,8 +1758,9 @@ gettabwinvar( {tabnr}, {winnr}, {name})
|
||||
getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar( {nr}, {varname}) any variable {varname} in window {nr}
|
||||
glob( {expr}) String expand file wildcards in {expr}
|
||||
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
|
||||
glob( {expr} [, {flag}]) String expand file wildcards in {expr}
|
||||
globpath( {path}, {expr} [, {flag}])
|
||||
String do glob({expr}) for all dirs in {path}
|
||||
has( {feature}) Number TRUE if feature {feature} supported
|
||||
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
||||
haslocaldir() Number TRUE if current window executed |:lcd|
|
||||
@@ -2402,6 +2414,7 @@ cursor({list})
|
||||
When 'virtualedit' is used {off} specifies the offset in
|
||||
screen columns from the start of the character. E.g., a
|
||||
position within a <Tab> or after the last character.
|
||||
Returns 0 when the position could be set, -1 otherwise.
|
||||
|
||||
|
||||
deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
|
||||
@@ -3275,14 +3288,16 @@ getwinvar({winnr}, {varname}) *getwinvar()*
|
||||
:let list_is_on = getwinvar(2, '&list')
|
||||
:echo "myvar = " . getwinvar(1, 'myvar')
|
||||
<
|
||||
*glob()*
|
||||
glob({expr}) Expand the file wildcards in {expr}. See |wildcards| for the
|
||||
glob({expr} [, {flag}]) *glob()*
|
||||
Expand the file wildcards in {expr}. See |wildcards| for the
|
||||
use of special characters.
|
||||
The result is a String.
|
||||
When there are several matches, they are separated by <NL>
|
||||
characters.
|
||||
The 'wildignore' option applies: Names matching one of the
|
||||
patterns in 'wildignore' will be skipped.
|
||||
Unless the optional {flag} argument is given and is non-zero,
|
||||
the 'suffixes' and 'wildignore' options apply: Names matching
|
||||
one of the patterns in 'wildignore' will be skipped and
|
||||
'suffixes' affect the ordering of matches.
|
||||
If the expansion fails, the result is an empty string.
|
||||
A name for a non-existing file is not included.
|
||||
|
||||
@@ -3296,20 +3311,22 @@ glob({expr}) Expand the file wildcards in {expr}. See |wildcards| for the
|
||||
See |expand()| for expanding special Vim variables. See
|
||||
|system()| for getting the raw output of an external command.
|
||||
|
||||
globpath({path}, {expr}) *globpath()*
|
||||
globpath({path}, {expr} [, {flag}]) *globpath()*
|
||||
Perform glob() on all directories in {path} and concatenate
|
||||
the results. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim")
|
||||
< {path} is a comma-separated list of directory names. Each
|
||||
directory name is prepended to {expr} and expanded like with
|
||||
glob(). A path separator is inserted when needed.
|
||||
|glob()|. A path separator is inserted when needed.
|
||||
To add a comma inside a directory name escape it with a
|
||||
backslash. Note that on MS-Windows a directory may have a
|
||||
trailing backslash, remove it if you put a comma after it.
|
||||
If the expansion fails for one of the directories, there is no
|
||||
error message.
|
||||
The 'wildignore' option applies: Names matching one of the
|
||||
patterns in 'wildignore' will be skipped.
|
||||
Unless the optional {flag} argument is given and is non-zero,
|
||||
the 'suffixes' and 'wildignore' options apply: Names matching
|
||||
one of the patterns in 'wildignore' will be skipped and
|
||||
'suffixes' affect the ordering of matches.
|
||||
|
||||
The "**" item can be used to search in a directory tree.
|
||||
For example, to find all "README.txt" files in the directories
|
||||
@@ -3785,7 +3802,8 @@ map({expr}, {string}) *map()*
|
||||
Replace each item in {expr} with the result of evaluating
|
||||
{string}.
|
||||
Inside {string} |v:val| has the value of the current item.
|
||||
For a |Dictionary| |v:key| has the key of the current item.
|
||||
For a |Dictionary| |v:key| has the key of the current item
|
||||
and for a |List| |v:key| has the index of the current item.
|
||||
Example: >
|
||||
:call map(mylist, '"> " . v:val . " <"')
|
||||
< This puts "> " before and " <" after each item in "mylist".
|
||||
@@ -4500,6 +4518,7 @@ rename({from}, {to}) *rename()*
|
||||
should also work to move files across file systems. The
|
||||
result is a Number, which is 0 if the file was renamed
|
||||
successfully, and non-zero when the renaming failed.
|
||||
NOTE: If {to} exists it is overwritten without warning.
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
repeat({expr}, {count}) *repeat()*
|
||||
@@ -5332,10 +5351,12 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
"fg" foreground color (GUI: color name used to set
|
||||
the color, cterm: color number as a string,
|
||||
term: empty string)
|
||||
"bg" background color (like "fg")
|
||||
"bg" background color (as with "fg")
|
||||
"sp" special color (as with "fg") |highlight-guisp|
|
||||
"fg#" like "fg", but for the GUI and the GUI is
|
||||
running the name in "#RRGGBB" form
|
||||
"bg#" like "fg#" for "bg"
|
||||
"sp#" like "fg#" for "sp"
|
||||
"bold" "1" if bold
|
||||
"italic" "1" if italic
|
||||
"reverse" "1" if reverse
|
||||
@@ -5825,7 +5846,8 @@ mouse_netterm Compiled with support for netterm mouse.
|
||||
mouse_pterm Compiled with support for qnx pterm mouse.
|
||||
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
|
||||
mouse_xterm Compiled with support for xterm mouse.
|
||||
multi_byte Compiled with support for editing Korean et al.
|
||||
multi_byte Compiled with support for 'encoding'
|
||||
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
|
||||
multi_byte_ime Compiled with support for IME input method.
|
||||
multi_lang Compiled with support for multiple languages.
|
||||
mzscheme Compiled with MzScheme interface |mzscheme|.
|
||||
@@ -5851,6 +5873,7 @@ showcmd Compiled with 'showcmd' support.
|
||||
signs Compiled with |:sign| support.
|
||||
smartindent Compiled with 'smartindent' support.
|
||||
sniff Compiled with SNiFF interface support.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
statusline Compiled with support for 'statusline', 'rulerformat'
|
||||
and special formats of 'titlestring' and 'iconstring'.
|
||||
sun_workshop Compiled with support for Sun |workshop|.
|
||||
|
||||
+262
-61
@@ -1,4 +1,4 @@
|
||||
*gui_mac.txt* For Vim version 7.2. Last change: 2008 Jul 12
|
||||
*gui_mac.txt* For Vim version 7.2. Last change: 2009 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
@@ -15,12 +15,14 @@ The MacVim Graphical User Interface *macvim* *gui-macvim*
|
||||
6. Toolbar |macvim-toolbar|
|
||||
7. Dialogs |macvim-dialogs|
|
||||
8. System services |macvim-services|
|
||||
9. Known bugs/missing features |macvim-todo|
|
||||
10. Hints |macvim-hints|
|
||||
9. mvim:// URL handler |macvim-url-handler|
|
||||
10. Keyboard shortcuts |macvim-shortcuts|
|
||||
11. International |macvim-international|
|
||||
12. Known bugs/missing features |macvim-todo|
|
||||
13. Hints |macvim-hints|
|
||||
|
||||
Other relevant documentation:
|
||||
|gui.txt| For generic items of the GUI.
|
||||
|os_mac.txt| For Mac specific items.
|
||||
|
||||
{Vi does not have a GUI}
|
||||
|
||||
@@ -76,16 +78,6 @@ file at all. In this situation, you will need to set both 'encoding' and
|
||||
'fileencodings' to a simple single-byte encoding such as Latin1 so that when
|
||||
the file is read into memory, the original bytes are left untouched.
|
||||
|
||||
*macvim-movement*
|
||||
Some Mac OS X standard key mappings involving Cmd or Option and an arrow key
|
||||
are set up by default in "$VIM/gvimrc". You can quickly disable all of these
|
||||
by adding the following lines to your "~/.vimrc" (not .gvimrc) file: >
|
||||
if has("gui_macvim")
|
||||
let macvim_skip_cmd_opt_movement = 1
|
||||
endif
|
||||
Note: These are the only key mappings that MacVim makes (not counting menu key
|
||||
equivalents which are not set up with :map).
|
||||
|
||||
*macvim-shift-movement*
|
||||
Text editors on Mac OS X lets the user hold down shift+movement key to extend
|
||||
the selection. Also, pressing a printable key whilst selecting replaces the
|
||||
@@ -108,6 +100,10 @@ If a file is dropped on the Dock icon, it is always opened in a new tab
|
||||
regardless of the mode Vim is currently in. The same holds if you
|
||||
double-click on a file in the Finder.
|
||||
|
||||
The "Open files from applications" preference in the General preference pane
|
||||
gives more options on how dropped files should open, in case tabs are not
|
||||
desired.
|
||||
|
||||
*macvim-default-menu*
|
||||
The default menu in MacVim has been changed to conform better with the Apple
|
||||
Human Interface Guidelines (HIG). At the moment this breaks the localized
|
||||
@@ -122,9 +118,19 @@ really bad once you start using tabs. For example, dropping two files, then
|
||||
dropping two more, and switching back to the first tab would cause weird
|
||||
strings like "((3) of 2)" to appear in the window title.
|
||||
|
||||
*macvim-tablabel*
|
||||
Tab labels only show the tail of the file name to make the tabs more readable
|
||||
when editing files in deeply nested folders. Add the line "set guitablabel="
|
||||
to your .gvimrc file to revert back to the default Vim tab label.
|
||||
|
||||
*macvim-options*
|
||||
These are the non-standard options that MacVim supports:
|
||||
'fullscreen' 'fuoptions' 'toolbariconsize' 'transparency' 'antialias'
|
||||
'antialias' 'fullscreen' 'fuoptions'
|
||||
'macmeta' 'toolbariconsize' 'transparency'
|
||||
|
||||
*macvim-commands*
|
||||
These are the non-standard commands that MacVim supports:
|
||||
|:macaction| |:macmenu|
|
||||
|
||||
*macvim-find*
|
||||
Whenever you search for something in Vim (e.g. using "/") the search query is
|
||||
@@ -161,8 +167,10 @@ formats. This enables you to double-click a file to open it with MacVim (if
|
||||
it is not associated with another program), or to right-click a file to bring
|
||||
up the "Open with" menu. You can also drag and drop files onto the Dock icon
|
||||
to open them in tabs in a new window, or you can drop them in an already open
|
||||
window to open the files in tabs in that specific window. Finally, you can
|
||||
use Mac OS X System Services to open files in MacVim, see |macvim-services|.
|
||||
window to open the files in tabs in that specific window (it is possible to
|
||||
have files open in e.g. splits by changing the "Open files from applications"
|
||||
option in the General preference pane). Finally, you can use Mac OS X System
|
||||
Services to open files in MacVim, see |macvim-services|.
|
||||
|
||||
There are essentially two ways to start MacVim from Terminal: either call the
|
||||
Vim binary with the -g switch >
|
||||
@@ -171,18 +179,19 @@ or use the "open" command (this method can not be used to pass parameters to
|
||||
Vim) >
|
||||
open -a MacVim file ...
|
||||
The advantage of using the latter method is that the settings relating to file
|
||||
opening in the preferences panel are respected, and files open significantly
|
||||
faster if preloading of Vim processes is enabled (i.e. if the user default
|
||||
MMPreloadCacheSize is positive, see |macvim-user-defaults|).
|
||||
opening in the preferences panel are respected, and files open instantly if
|
||||
|Quickstart| is enabled.
|
||||
|
||||
*mvim*
|
||||
To save yourself from having to type the entire path to the Vim binary each
|
||||
time you start MacVim, you could create an alias such as >
|
||||
alias gvim='/Applications/MacVim.app/Contents/MacOS/Vim -g'
|
||||
and add that to "~/.profile". A more flexible way to start MacVim is to use
|
||||
the shell script "mvim" which comes bundled with MacVim. Put this script in a
|
||||
folder in your path and then simply type "mvim" to start MacVim. This script
|
||||
will try to find MacVim.app in various typical folders such as >
|
||||
and add that to "~/.profile".
|
||||
|
||||
*mvim*
|
||||
A more flexible way to start MacVim is to use the shell script "mvim" which
|
||||
comes bundled with MacVim. Put this script in a folder in your path and then
|
||||
simply type "mvim" to start MacVim. This script will try to find MacVim.app
|
||||
in various typical folders such as >
|
||||
~/Applications ~/Applications/vim
|
||||
/Applications /Applications/vim
|
||||
/Applications/Utilities /Applications/Utilities/vim
|
||||
@@ -190,6 +199,17 @@ If you would rather put MacVim.app in some other directory then that is also
|
||||
possible, simply set the environment variable VIM_APP_DIR to whatever folder
|
||||
you have placed MacVim.app in.
|
||||
|
||||
The "mvim" script can be symlinked to in order to start up MacVim in different
|
||||
modes as follows (assuming you placed "mvim" in "/usr/local/bin"): >
|
||||
* Diff: ln -s /usr/local/bin/mvim mvimdiff
|
||||
* Read-only: ln -s /usr/local/bin/mvim mview
|
||||
* Ex: ln -s /usr/local/bin/mvim mex
|
||||
* Restricted: ln -s /usr/local/bin/mvim rmvim
|
||||
If the symlink destination starts with "m" (or "g"), Vim will start in GUI
|
||||
mode. Removing the initial "m" from the above destination names makes Vim
|
||||
start without the GUI. (In the last case, the destination name can be
|
||||
"rmvim", "rgvim" or "rvim".)
|
||||
|
||||
Note: Starting MacVim by creating a symlink to >
|
||||
.../MacVim.app/Contents/MacOS/Vim
|
||||
with 'ln -s' does not work.
|
||||
@@ -199,6 +219,20 @@ command:
|
||||
:gui [++opt] [+cmd] [-f|-b] [files...]
|
||||
Note: Forking ("-b") currently does not work.
|
||||
|
||||
*Quickstart*
|
||||
Quickstart ensures that new windows open instantaneously e.g. when <D-n> is
|
||||
pressed. This feature can be enabled from the Advanced preferences pane (it
|
||||
is disabled by default). Note that this setting does not affect the speed
|
||||
with which windows open when using the |mvim| command.
|
||||
|
||||
The main reason why this feature is not enabled by default is because on OS X
|
||||
10.4 changes to runtime files (e.g. those in "~/.vim") are not detected. For
|
||||
example, if you install a new plugin and then press <D-n> to open a new
|
||||
window, then that first window will not notice the plugin (but any consecutive
|
||||
windows after the first one will). On OS X 10.5 and later all modifications
|
||||
to runtime files in "~/.vim" are detected, so unless you keep runtime files in
|
||||
another folder there should be no problems.
|
||||
|
||||
*odbeditor* *external-editor*
|
||||
MacVim can act as an 'external editor' for Mac OS X applications that support
|
||||
the ODB Editor Protocol (or the 'external editor' protocol). Each application
|
||||
@@ -230,13 +264,13 @@ as general information regarding Mac OS X user defaults.
|
||||
Here is a list of relevant dictionary entries:
|
||||
|
||||
KEY VALUE ~
|
||||
MMAtsuiRenderer enable ATSUI renderer [bool]
|
||||
MMCellWidthMultiplier width of a normal glyph in em units [float]
|
||||
MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool]
|
||||
MMLoadDefaultFont load font (disable for faster startup) [bool]
|
||||
MMLoginShellArgument login shell parameter [string]
|
||||
MMLoginShellCommand which shell to use to launch Vim [string]
|
||||
MMNoFontSubstitution disable automatic font substitution [bool]
|
||||
MMPreloadCacheSize number of Vim processes to preload [int]
|
||||
MMShowAddTabButton enable "add tab" button on tabline [bool]
|
||||
MMTabMaxWidth maximum width of a tab [int]
|
||||
MMTabMinWidth minimum width of a tab [int]
|
||||
MMTabOptimumWidth default width of a tab [int]
|
||||
@@ -262,7 +296,7 @@ Terminal and type: >
|
||||
Applications opened from the Finder do not automatically source the user's
|
||||
environment variables (which are typically set in .profile or .bashrc). This
|
||||
presents a problem when using |:!| to execute commands in the shell since e.g.
|
||||
$PATH might not be set properly. To work around this problem MacVim can start
|
||||
$PATH might not be set properly. To work around this problem MacVim starts
|
||||
new Vim processes via a login shell so that all environment variables are set.
|
||||
|
||||
By default MacVim uses the $SHELL environment variable to determine which
|
||||
@@ -317,7 +351,7 @@ The color scheme uses the the system "Highlight Color", which can be changed in
|
||||
the "Appearance" pane of the System Preferences. It also changes the
|
||||
highlight color when a window becomes inactive.
|
||||
|
||||
If you have any comments regarding this colors cheme (is it better or worse
|
||||
If you have any comments regarding this color scheme (is it better or worse
|
||||
than the default?) then post them to |vim_mac|.
|
||||
|
||||
==============================================================================
|
||||
@@ -351,7 +385,7 @@ can be used to send action messages.
|
||||
property list file called |Actions.plist|.
|
||||
|
||||
*:macm* *:macmenu*
|
||||
:mac[menu] {menu} {key}={arg} ...
|
||||
:macm[enu] {menu} {key}={arg} ...
|
||||
Set Mac specific properties for {menu}. The
|
||||
properties that can be set are:
|
||||
action the action this menu sends
|
||||
@@ -369,9 +403,11 @@ can be used to send action messages.
|
||||
":maca name:".
|
||||
|
||||
The key equivalent is specified with the <D-..>
|
||||
syntax. Note that key equivalents must contain the
|
||||
Cmd modifier flag (<D-...>), and they take precedence
|
||||
over normal mappings.
|
||||
syntax. This is case-sensitive, so <D-a> means Cmd-a
|
||||
whereas <D-A> means Cmd-Shift-a.
|
||||
Note that key equivalents must contain the Cmd
|
||||
modifier flag (<D-..>), and they take precedence over
|
||||
normal mappings.
|
||||
Use the syntax "key=<nop>" to clear the key equivalent
|
||||
of a menu. This can be used to free up a key
|
||||
combination that is set in the system gvimrc so that
|
||||
@@ -395,7 +431,12 @@ equivalent Cmd-n, which opens a new window when selected: >
|
||||
:macm Window.Next\ Tab key=<D-Right>
|
||||
3. Create a mapping in normal mode which closes the current tab/window: >
|
||||
:map <C-w> :maca performClose:<CR>
|
||||
>
|
||||
4. Free up Cmd-t and remap it to open a file browser in a split view: >
|
||||
macm File.New\ Tab key=<nop>
|
||||
nmap <D-t> :sp .<CR>
|
||||
Note: These two lines must be added to .gvimrc else the first line will fail.
|
||||
The second line is case sensitive, so <D-T> (Cmd-Shift-t) is not the same as
|
||||
<D-t> (Cmd-t)!
|
||||
|
||||
The standard Vim menus are modified in "$VIM/gvimrc". Take a look at that
|
||||
file for more examples on how to set up menus. Note: When no window is open a
|
||||
@@ -463,15 +504,16 @@ icon can be found a warning triangle is displayed instead.
|
||||
|
||||
Dialogs can be controlled with the keyboard in two ways. By default each
|
||||
button in a dialog is bound to a key. The button that is highlighted by blue
|
||||
is bound to Enter, and any button with the title "Cancel" is bound to Escape.
|
||||
Other buttons are usually bound to the first letter in the title of the
|
||||
button. There is no visual feedback to indicate which letter a button is
|
||||
bound to, so sometimes some experimentation might be required in order to
|
||||
figure out which key to press.
|
||||
is bound to Enter, any button with the title "Cancel" is bound to Escape, and
|
||||
any button with the title "Don't Save" is bound to <D-d>. Other buttons are
|
||||
usually bound to the first letter in the title of the button. There is no
|
||||
visual feedback to indicate which letter a button is bound to, so sometimes
|
||||
some experimentation might be required in order to figure out which key to
|
||||
press.
|
||||
|
||||
The second way of controlling dialogs with the keyboard is to enable "Full
|
||||
keyboard access" in the "Keyboard & Mouse" pane of the System Preferences (you
|
||||
can also toggle this on or off by pressing Ctrl-F7). Once keyboard access is
|
||||
keyboard access" in the "Keyboard" pane of the System Preferences (you can
|
||||
also toggle this on or off by pressing Ctrl-F7). Once keyboard access is
|
||||
enabled it is possible to move between buttons with Tab and pressing Space to
|
||||
select the current button. The current button is indicated with a blue
|
||||
outline.
|
||||
@@ -485,20 +527,130 @@ located in the /Applications folder. (You might have to logout and then login
|
||||
again before Mac OS X detects the MacVim services.)
|
||||
|
||||
These are the currently supported services:
|
||||
* New Tab Containing Selection: Opens a new tab in the topmost window and
|
||||
pastes the currently selected text in that tab. A new window will be
|
||||
opened if necessary.
|
||||
* Open Selected File in Tab: If the selected text represents a file
|
||||
name, then the corresponding file is opened in a new tab in the topmost
|
||||
window.
|
||||
* Open Selected File in Window: Same as the above, but always open in a new
|
||||
window.
|
||||
* New Document Containing Selection: Open a new window and paste the
|
||||
currently selected text.
|
||||
* New Document Here: Open a new window and set the current directory
|
||||
to that of the selected text. This is intended to be used from a
|
||||
Finder window to open an empty document in the currently selected
|
||||
folder.
|
||||
* Open Selected File: If the selected text represents a file name,
|
||||
then the corresponding file is opened in a new window.
|
||||
|
||||
If new files are set to open in the current window (in the General preference
|
||||
pane) then the above services will also reuse the topmost window, instead of
|
||||
opening a new window.
|
||||
|
||||
==============================================================================
|
||||
9. Known bugs/missing features *macvim-todo*
|
||||
9. mvim:// URL handler *mvim://* *macvim-url-handler*
|
||||
|
||||
Here are some of the bigger bugs in MacVim. Of course there are others, but
|
||||
these are ones that are know and/or which were judged major.
|
||||
MacVim supports a custom URL handler for "mvim://" URLs. The handler is
|
||||
supposed to be compatible to TextMate's URL scheme as documented at
|
||||
http://blog.macromates.com/2007/the-textmate-url-scheme/.
|
||||
|
||||
Currently, this means that the format is >
|
||||
mvim://open?<arguments>
|
||||
where "arguments" can be:
|
||||
* url — the actual file to open (i.e. a file://... URL), if you leave
|
||||
out this argument, the frontmost document is implied
|
||||
* line — line number to go to (one based)
|
||||
* column — column number to go to (one based)
|
||||
|
||||
For example, the link >
|
||||
mvim://open?url=file:///etc/profile&line=20
|
||||
will open the file /etc/profile on line 20 when clicked in a web browser.
|
||||
|
||||
Note that url has to be a file:// url pointing to an existing local file.
|
||||
|
||||
==============================================================================
|
||||
10. Keyboard shortcuts *macvim-shortcuts*
|
||||
|
||||
Most keyboard shortcuts in MacVim are bound to menu items and can be
|
||||
discovered by looking through the menus (see |macvim-menus| on how to create
|
||||
your own menu shortcuts). The remaining shortcuts are listed here:
|
||||
|
||||
*Cmd-.* *<D-.>*
|
||||
Cmd-. Interrupt Vim. Unlike Ctrl-C which is sent as normal
|
||||
keyboard input (and hence has to be received and then
|
||||
interpreted) this sends a SIGINT signal to the Vim
|
||||
process. Use this shortcut if the Vim process appears
|
||||
to have locked up and is not responding to key presses.
|
||||
This Cmd-key combination cannot be unmapped.
|
||||
|
||||
*Cmd-`* *<D-`>*
|
||||
Cmd-` Cycle to the next window. On an American keyboard the
|
||||
`-key is located under the Esc-key. On European
|
||||
keyboards this key is often adjacent to the left
|
||||
Shift-key and it may be not even be marked with "`".
|
||||
This Cmd-key combination can only be unmapped via the
|
||||
"Keyboard" System Preferences.
|
||||
|
||||
*Cmd-Left* *<D-Left>*
|
||||
Cmd-Left Move cursor to the beginning of the line
|
||||
(see |cmd-movement|).
|
||||
|
||||
*Cmd-Right* *<D-Right>*
|
||||
Cmd-Right Move cursor to the end of the line (see |cmd-movement|).
|
||||
|
||||
*Cmd-Up* *<D-Up>*
|
||||
Cmd-Up Move cursor to the first line (see |cmd-movement|).
|
||||
|
||||
*Cmd-Down* *<D-Down>*
|
||||
Cmd-Down Move cursor to the last line (see |cmd-movement|).
|
||||
|
||||
*Alt-Left* *<M-Left>*
|
||||
Alt-Left Move cursor to the beginning of the previous word
|
||||
(see |alt-movement|).
|
||||
|
||||
*Alt-Right* *<M-Right>*
|
||||
Alt-Right Move cursor to the beginning of the next word
|
||||
(see |alt-movement|).
|
||||
|
||||
*Alt-Up* *<M-Up>*
|
||||
Alt-Up Move cursor one paragraph forward (see |alt-movement|).
|
||||
|
||||
*Alt-Down* *<M-Down>*
|
||||
Alt-Down Move cursor to the previous paragraph
|
||||
(see |alt-movement|).
|
||||
|
||||
*cmd-movement* *alt-movement*
|
||||
The above mappings involving Cmd/Alt + arrow key are enabled by default in the
|
||||
system gvimrc file "$VIM/gvimrc". You can quickly disable all of these by
|
||||
adding the following lines to your "~/.vimrc" (not .gvimrc) file: >
|
||||
if has("gui_macvim")
|
||||
let macvim_skip_cmd_opt_movement = 1
|
||||
endif
|
||||
Note: These are the only key mappings that MacVim makes (not counting menu key
|
||||
equivalents which are not set up with :map).
|
||||
|
||||
See |macvim-shift-movement| if you want Shift to select text when used in
|
||||
conjunction with the above Cmd/Alt movement shortcuts.
|
||||
|
||||
==============================================================================
|
||||
11. International *macvim-international*
|
||||
|
||||
When editing non-English text it may be convenient to keep separate keyboard
|
||||
layouts for normal and insert mode. This is supported via the 'imd' option on
|
||||
Mac OS X 10.5 or later (on 10.4 the 'imd' option support is not as useful as
|
||||
it only switches between Roman and non-Roman input sources and it has been
|
||||
known not to work very reliably).
|
||||
|
||||
For example: When 'noimd' is enabled (i.e. IM is enabled) the input source is
|
||||
saved when toggling between normal and insert mode, so you can use a US layout
|
||||
in normal mode then switch to insert mode and choose a Swedish layout. When
|
||||
you go back to normal mode the US layout will be selected and when you enter
|
||||
insert mode the Swedish layout is selected. This also works when searching
|
||||
for text etc. see 'imc', 'imi', 'ims'.
|
||||
|
||||
Note that the layout used in normal mode is the layout used when 'noimd' is
|
||||
set (i.e when IM is enabled). If you find that MacVim switches to the
|
||||
wrong layout when going back to normal mode, then select the layout you want
|
||||
to use in normal mode and type ":set imd" followed by ":set noimd".
|
||||
|
||||
==============================================================================
|
||||
12. Known bugs/missing features *macvim-todo*
|
||||
|
||||
This list is by no means exhaustive, it only enumerates some of the more
|
||||
prominent bugs/missing features.
|
||||
|
||||
- Localized menus are not supported. Choosing anything but "English" in the
|
||||
"International" pane of "System Prefences" may break the menus (and
|
||||
@@ -507,8 +659,9 @@ these are ones that are know and/or which were judged major.
|
||||
- Sometimes multibyte characters look "too wide", i.e. they overlap the
|
||||
following character. It might help to change 'ambiwidth', or override the
|
||||
automatic font substitution by setting 'guifontwide' manually.
|
||||
- Printing
|
||||
- No find/replace dialog
|
||||
- Printing. As a temporary solution <D-p> creates a PostScript file which is
|
||||
then opened in Preview where it may be printed.
|
||||
- The toolbar looks ugly and is not very useful.
|
||||
|
||||
If you find new bugs then add a new issue at http://code.google.com/p/macvim/
|
||||
or post your findings to the |vim_mac| mailing list. If you are missing
|
||||
@@ -517,7 +670,7 @@ might be simple to implement, but unless somebody asks for a particular
|
||||
feature then there is little incentive to add it.
|
||||
|
||||
==============================================================================
|
||||
10. Hints *macvim-hints*
|
||||
13. Hints *macvim-hints*
|
||||
|
||||
In this section some general (not necessarily MacVim specific) hints are
|
||||
given.
|
||||
@@ -551,7 +704,7 @@ See |macvim-shift-movement|.
|
||||
Scenario: ~
|
||||
You do not want MacVim to set up any key mappings.
|
||||
Solution: ~
|
||||
See |macvim-movement|.
|
||||
See |cmd-movement|.
|
||||
|
||||
Scenario: ~
|
||||
Enabling localized menus breaks the toolbar and the menus as well.
|
||||
@@ -561,11 +714,11 @@ This is a known problem, see |macvim-todo|.
|
||||
Scenario: ~
|
||||
You dislike the default font (DejaVu Sans Mono).
|
||||
Solution: ~
|
||||
The standard fixed width font on other Mac OS X applications is Monaco. If
|
||||
you prefer this font then add the following line to your "~/.gvimrc" (note
|
||||
that Monaco does not come in italic and bold variants): >
|
||||
set guifont=Monaco:h10
|
||||
The suffix ":h10" specifies the point size of the font should be "10" (see
|
||||
The standard fixed width font on Mac OS X is Menlo (it used to be Monaco prior
|
||||
to OS X 10.6). If you prefer this font then add the following line to your
|
||||
"~/.gvimrc": >
|
||||
set guifont=Menlo:h11
|
||||
The suffix ":h11" specifies the point size of the font should be "11" (see
|
||||
'guifont' for more information on how to set the font).
|
||||
|
||||
Scenario: ~
|
||||
@@ -584,6 +737,54 @@ If that helps, then you can permanently disable "matchparen" by adding the
|
||||
following line to your "~/.vimrc": >
|
||||
let loaded_matchparen=1
|
||||
<
|
||||
Scenario: ~
|
||||
You want to use MacVim as an editor for some external application.
|
||||
Solution: ~
|
||||
If the external application lets you set a program to execute then something
|
||||
like "mvim -f" might be all you need (the "-f" switch ensures that the "mvim"
|
||||
script returns only after you close the editor window, otherwise "mvim"
|
||||
returns immediately). If the external program honors the EDITOR environment
|
||||
variable (e.g Git does this) then you may get away by adding the following
|
||||
line to your "~/.profile": >
|
||||
export EDITOR='mvim -f'
|
||||
If you have not installed the "mvim" script in your path you can provide the
|
||||
path to the Vim binary instead. Thus, if "MacVim.app" resides in the
|
||||
Applications folder then you would use the following line: >
|
||||
export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim -g -f'
|
||||
|
||||
Scenario: ~
|
||||
You have set MacVim to open from an external program and when you finish
|
||||
editing (by closing the MacVim window) you want the external program to regain
|
||||
focus.
|
||||
Solution: ~
|
||||
Use the VimLeave autocommand to hide MacVim when the window closes: >
|
||||
au VimLeave * maca hide:
|
||||
Assuming your external program has a setting for which command to execute to
|
||||
bring up an editor, you would set that option to something like: >
|
||||
mvim -f -c "au VimLeave * maca hide:"
|
||||
(See the above Scenario for an explanation of the "-f" switch.)
|
||||
|
||||
Scenario: ~
|
||||
You would like to remap Caps Lock to Esc.
|
||||
Solution: ~
|
||||
The app "PCKeyboardHack" can be used to remap Caps Lock. It is available as a
|
||||
free download from:
|
||||
http://www.pqrs.org/tekezo/macosx/keyremap4macbook/extra.html
|
||||
On some Apple keyboards the Caps Lock key doesn't immediately register and
|
||||
this makes Caps Lock "drop" key presses. To work around this problem go into
|
||||
the "Keyboard" System Preference and remap Caps Lock to Ctrl first (click the
|
||||
"Modifier Keys..." button). This trick may also be necessary if the Caps Lock
|
||||
light turns on/off despite having remapped to Esc.
|
||||
|
||||
Scenario: ~
|
||||
You have problems creating custom mappings involving the Cmd key.
|
||||
Solution: ~
|
||||
To bind to a key involving Cmd you use the "<D-..>" syntax. Many Cmd-key
|
||||
mappings are already used by the menus so if your mapping doesn't work then
|
||||
the solution is usually to first unmap the menu binding (see |macvim-menus|,
|
||||
in particular read the end of that section). Also see the section on
|
||||
|macvim-shortcuts| for some Cmd-key combinations which are not used by the
|
||||
menus but still need to be freed up before they can be used in custom bindings.
|
||||
|
||||
Scenario: ~
|
||||
You can't find the information on MacVim you thought should be in this manual
|
||||
|
||||
@@ -63,7 +63,8 @@ already running vim will never fork in MacVim.
|
||||
"gvim --nofork" does the same as "gvim -f".
|
||||
|
||||
If you want the GUI to run in the foreground always, include the 'f'
|
||||
flag in 'guioptions'. |-f|.
|
||||
flag in 'guioptions'. |-f|. MacVim does not support this flag in
|
||||
'guioptions'.
|
||||
|
||||
==============================================================================
|
||||
2. GUI Resources *gui-resources* *.Xdefaults*
|
||||
|
||||
+18
-11
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*if_cscop.txt* For Vim version 7.2. Last change: 2009 Mar 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
@@ -131,11 +131,22 @@ The available subcommands are:
|
||||
7 or f: Find this file
|
||||
8 or i: Find files #including this file
|
||||
|
||||
For all types, except 4 and 6, leading white space for {name} is
|
||||
removed. For 4 and 6 there is exactly one space between {querytype}
|
||||
and {name}. Further white space is included in {name}.
|
||||
|
||||
EXAMPLES >
|
||||
:cscope find c vim_free
|
||||
:cscope find 3 vim_free
|
||||
:cscope find 3 vim_free
|
||||
<
|
||||
These two examples perform the same query. >
|
||||
These two examples perform the same query: functions calling
|
||||
"vim_free". >
|
||||
|
||||
:cscope find t initOnce
|
||||
:cscope find t initOnce
|
||||
<
|
||||
The first one searches for the text "initOnce", the second one for
|
||||
" initOnce". >
|
||||
|
||||
:cscope find 0 DEFAULT_TERM
|
||||
<
|
||||
@@ -344,13 +355,8 @@ cscope version for Win32 see:
|
||||
The DJGPP-built version from http://cscope.sourceforge.net is known to not
|
||||
work with Vim.
|
||||
|
||||
There are a couple of hard-coded limitations:
|
||||
|
||||
1. The maximum number of cscope connections allowed is 8. Do you
|
||||
really need more?
|
||||
|
||||
2. Doing a |:tjump| when |:cstag| searches the tag files is not
|
||||
configurable (e.g., you can't do a tselect instead).
|
||||
Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
|
||||
is not configurable (e.g., you can't do a tselect instead).
|
||||
|
||||
==============================================================================
|
||||
6. Suggested usage *cscope-suggestions*
|
||||
@@ -475,7 +481,8 @@ bit of code) was adapted from the cscope interface in nvi. Please report
|
||||
any problems, suggestions, patches, et al., you have for the usage of
|
||||
cscope within Vim to him.
|
||||
*cscope-win32*
|
||||
For a cscope version for Win32 see: http://iamphet.nm.ru/cscope/index.html
|
||||
For a cscope version for Win32 see:
|
||||
http://code.google.com/p/cscope-win32/
|
||||
|
||||
Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
|
||||
him if you have Win32-specific issues.
|
||||
|
||||
+39
-58
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28
|
||||
*if_mzsch.txt* For Vim version 7.2. Last change: 2009 Jun 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -42,10 +42,6 @@ Note: On FreeBSD you should use the "drscheme" port.
|
||||
|
||||
*:mzfile* *:mzf*
|
||||
:[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
|
||||
All statements are executed in the namespace of the
|
||||
buffer that was current during :mzfile start.
|
||||
If you want to access other namespaces, use
|
||||
'parameterize'.
|
||||
|
||||
All of these commands do essentially the same thing - they execute a piece of
|
||||
MzScheme code, with the "current range" set to the given line
|
||||
@@ -54,8 +50,6 @@ range.
|
||||
In the case of :mzscheme, the code to execute is in the command-line.
|
||||
In the case of :mzfile, the code to execute is the contents of the given file.
|
||||
|
||||
Each buffer has its own MzScheme namespace. Global namespace is bound to
|
||||
the "global-namespace" value from the 'vimext' module.
|
||||
MzScheme interface defines exception exn:vim, derived from exn.
|
||||
It is raised for various Vim errors.
|
||||
|
||||
@@ -79,40 +73,8 @@ To avoid clashes with MzScheme, consider using prefix when requiring module,
|
||||
e.g.: >
|
||||
:mzscheme (require (prefix vim- vimext))
|
||||
<
|
||||
All the examples below assume this naming scheme. Note that you need to do
|
||||
this again for every buffer.
|
||||
All the examples below assume this naming scheme.
|
||||
|
||||
The auto-instantiation can be achieved with autocommands, e.g. you can put
|
||||
something like this in your .vimrc (EOFs should not have indentation): >
|
||||
function s:MzRequire()
|
||||
if has("mzscheme")
|
||||
:mz << EOF
|
||||
(require (prefix vim- vimext))
|
||||
(let ((buf (vim-get-buff-by-name (vim-eval "expand(\"<afile>\")"))))
|
||||
(when (and buf (not (eq? buf (vim-curr-buff))))
|
||||
(parameterize ((current-namespace (vim-get-buff-namespace buf)))
|
||||
(namespace-attach-module vim-global-namespace 'vimext)
|
||||
(namespace-require '(prefix vim vimext)))))
|
||||
EOF
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function s:MzStartup()
|
||||
if has("mzscheme")
|
||||
au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire()
|
||||
:mz << EOF
|
||||
(current-library-collection-paths
|
||||
(cons
|
||||
(build-path (find-system-path 'addon-dir) (version) "collects")
|
||||
(current-library-collection-paths)))
|
||||
EOF
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call s:MzStartup()
|
||||
<
|
||||
|
||||
The global namespace just instantiated this module with the prefix "vimext:".
|
||||
*mzscheme-sandbox*
|
||||
When executed in the |sandbox|, access to some filesystem and Vim interface
|
||||
procedures is restricted.
|
||||
@@ -121,15 +83,20 @@ procedures is restricted.
|
||||
2. Examples *mzscheme-examples*
|
||||
>
|
||||
:mzscheme (display "Hello")
|
||||
:mz (display (string-append "Using MzScheme version " (version)))
|
||||
:mzscheme (require (prefix vim- vimext)) ; for MzScheme < 4.x
|
||||
:mzscheme (require (prefix-in vim- 'vimext)) ; MzScheme 4.x
|
||||
:mzscheme (vim-set-buff-line 10 "This is line #10")
|
||||
<
|
||||
Inline script usage: >
|
||||
function! <SID>SetFirstLine()
|
||||
:mz << EOF
|
||||
(display "!!!")
|
||||
(require (prefix vim- vimext))
|
||||
; for newer versions (require (prefix-in vim- 'vimext))
|
||||
(vim-set-buff-line 1 "This is line #1")
|
||||
(vim-beep)
|
||||
EOF
|
||||
EOF
|
||||
endfunction
|
||||
|
||||
nmap <F9> :call <SID>SetFirstLine() <CR>
|
||||
@@ -137,17 +104,33 @@ Inline script usage: >
|
||||
File execution: >
|
||||
:mzfile supascript.scm
|
||||
<
|
||||
Accessing the current buffer namespace from an MzScheme program running in
|
||||
another buffer within |:mzfile|-executed script : >
|
||||
; Move to the window below
|
||||
(vim-command "wincmd j")
|
||||
; execute in the context of buffer, to which window belongs
|
||||
; assume that buffer has 'textstring' defined
|
||||
(parameterize ((current-namespace
|
||||
(vim-get-buff-namespace (vim-curr-buff))))
|
||||
(eval '(vim-set-buff-line 1 textstring)))
|
||||
Vim exception handling: >
|
||||
:mz << EOF
|
||||
(require (prefix vim- vimext))
|
||||
; for newer versions (require (prefix-in vim- 'vimext))
|
||||
(with-handlers
|
||||
([exn:vim? (lambda (e) (display (exn-message e)))])
|
||||
(vim-eval "nonsense-string"))
|
||||
EOF
|
||||
<
|
||||
Auto-instantiation of vimext module (can be placed in your |vimrc|): >
|
||||
function! MzRequire()
|
||||
:redir => l:mzversion
|
||||
:mz (version)
|
||||
:redir END
|
||||
if strpart(l:mzversion, 1, 1) < "4"
|
||||
" MzScheme versions < 4.x:
|
||||
:mz (require (prefix vim- vimext))
|
||||
else
|
||||
" newer versions:
|
||||
:mz (require (prefix-in vim- 'vimext))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if has("mzscheme")
|
||||
silent call MzRequire()
|
||||
endif
|
||||
<
|
||||
==============================================================================
|
||||
3. Threads *mzscheme-threads*
|
||||
|
||||
@@ -168,11 +151,11 @@ interface.
|
||||
Common
|
||||
------
|
||||
(command {command-string}) Perform the vim ":Ex" style command.
|
||||
(eval {expr-string}) Evaluate the vim expression to a string.
|
||||
A |List| is turned into a string by
|
||||
joining the items and inserting line
|
||||
breaks.
|
||||
NOTE clashes with MzScheme eval
|
||||
(eval {expr-string}) Evaluate the vim expression into
|
||||
respective MzScheme object: |Lists| are
|
||||
represented as Scheme lists,
|
||||
|Dictionaries| as hash tables.
|
||||
NOTE the name clashes with MzScheme eval
|
||||
(range-start) Start/End of the range passed with
|
||||
(range-end) the Scheme command.
|
||||
(beep) beep
|
||||
@@ -186,7 +169,6 @@ Common
|
||||
be set. The symbol 'global can be passed
|
||||
as {buffer-or-window}. Then |:setglobal|
|
||||
will be used.
|
||||
global-namespace The MzScheme main namespace.
|
||||
|
||||
Buffers *mzscheme-buffer*
|
||||
-------
|
||||
@@ -228,7 +210,6 @@ Buffers *mzscheme-buffer*
|
||||
if there is no such buffer.
|
||||
(get-buff-by-num {buffernum}) Get a buffer by its number (return #f if
|
||||
there is no buffer with this number).
|
||||
(get-buff-namespace [buffer]) Get buffer namespace.
|
||||
|
||||
Windows *mzscheme-window*
|
||||
------
|
||||
@@ -250,7 +231,7 @@ Windows *mzscheme-window*
|
||||
(set-cursor (line . col) [window]) Set cursor position.
|
||||
|
||||
==============================================================================
|
||||
5. Dynamic loading *mzscheme-dynamic*
|
||||
5. Dynamic loading *mzscheme-dynamic* *E815*
|
||||
|
||||
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
|
||||
output then includes |+mzscheme/dyn|.
|
||||
|
||||
@@ -224,6 +224,10 @@ expression is evaluated to obtain the {rhs} that is used. Example: >
|
||||
The result of the InsertDot() function will be inserted. It could check the
|
||||
text before the cursor and start omni completion when some condition is met.
|
||||
|
||||
For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
can't change v:char and you should not insert it.
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
For this reason the following is blocked:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.2. Last change: 2008 Jun 28
|
||||
*netbeans.txt* For Vim version 7.2. Last change: 2009 Jan 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -722,8 +722,10 @@ keyAtPos keyName lnum/col
|
||||
of the cursor.
|
||||
New in version 2.1.
|
||||
|
||||
killed A file was closed by the user. Only for files that have been
|
||||
assigned a number by the IDE.
|
||||
killed A file was deleted or wiped out by the user and the buffer
|
||||
annotations have been removed. The bufID number for this
|
||||
buffer has become invalid. Only for files that have been
|
||||
assigned a bufID number by the IDE.
|
||||
|
||||
newDotAndMark off off
|
||||
Reports the position of the cursor being at "off" bytes into
|
||||
|
||||
+43
-12
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.2. Last change: 2008 Aug 06
|
||||
*options.txt* For Vim version 7.2. Last change: 2008 Nov 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1448,6 +1448,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
autoselectml Like "autoselect", but for the modeless selection
|
||||
only. Compare to the 'A' flag in 'guioptions'.
|
||||
|
||||
html When the clipboard contains HTML, use this when
|
||||
pasting. When putting text on the clipboard, mark it
|
||||
as HTML. This works to copy rendered HTML from
|
||||
Firefox, paste it as raw HTML in Vim, select the HTML
|
||||
in Vim and paste it in a rich edit box in Firefox.
|
||||
Only supported for GTK version 2 and later.
|
||||
Only available with the |+multi_byte| feature.
|
||||
|
||||
exclude:{pattern}
|
||||
Defines a pattern that is matched against the name of
|
||||
the terminal 'term'. If there is a match, no
|
||||
@@ -3081,6 +3089,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See 'fuoptions' for how Vim resizes and colors the background when
|
||||
entering and leaving fullscreen mode.
|
||||
|
||||
Note: Setting 'fullscreen' usually changes the size of the Vim
|
||||
control. However, for technical reasons, 'lines' and 'columns' will
|
||||
currently only be updated when Vim runs its event loop. As a
|
||||
consequence, if you set 'fullscreen' and 'lines' or 'columns' in a
|
||||
Vim script file, you should always set 'fullscreen' after setting
|
||||
'lines' and 'columns', else 'lines' and 'columns' will be overwritten
|
||||
with the values 'fullscreen' sets after the script has been executed
|
||||
and the event loop is ran again.
|
||||
|
||||
XXX: Add fuenter/fuleave autocommands? You might want to display
|
||||
a NERDTree or a Tlist only in fullscreen for example. Then again, this
|
||||
could probably be in a sizechanged autocommand that triggers if the
|
||||
@@ -3481,6 +3498,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
foreground. |gui-fork|
|
||||
Note: Set this option in the vimrc file. The forking may have
|
||||
happened already when the |gvimrc| file is read.
|
||||
MacVim does not support this flag due to limitations with
|
||||
forking on Mac OS X.
|
||||
*'go-i'*
|
||||
'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
|
||||
corner of the window. It's black&white on non-GTK, because of
|
||||
@@ -3499,7 +3518,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Exception: Athena will always use grey menu items.
|
||||
*'go-t'*
|
||||
't' Include tearoff menu items. Currently only works for Win32,
|
||||
GTK+, and Motif 1.2 GUI.
|
||||
GTK+, MacVim, and Motif 1.2 GUI.
|
||||
*'go-T'*
|
||||
'T' Include Toolbar. Currently only in Win32, GTK+, Motif, Photon
|
||||
and Athena GUIs.
|
||||
@@ -3858,15 +3877,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
characters with dead keys.
|
||||
|
||||
*'imdisable'* *'imd'* *'nodisable'* *'noimd'*
|
||||
'imdisable' 'imd' boolean (default off, on for some systems (SGI))
|
||||
'imdisable' 'imd' boolean (default off, on for SGI and MacVim)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+xim|
|
||||
|+multi_byte_ime| or |global-ime| feature}
|
||||
|+multi_byte_ime| or |global-ime| feature, always
|
||||
available in MacVim}
|
||||
When set the Input Method is never used. This is useful to disable
|
||||
the IM when it doesn't work properly.
|
||||
Currently this option is on by default for SGI/IRIX machines. This
|
||||
may change in later releases.
|
||||
Currently this option is on by default for SGI/IRIX. This may change
|
||||
in later releases.
|
||||
|
||||
*'iminsert'* *'imi'*
|
||||
'iminsert' 'imi' number (default 0, 2 when an input method is supported)
|
||||
@@ -4264,9 +4284,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be able to execute Normal mode commands.
|
||||
This is the opposite of the 'keymap' option, where characters are
|
||||
mapped in Insert mode.
|
||||
This only works for 8-bit characters. The value of 'langmap' may be
|
||||
specified with multi-byte characters (e.g., UTF-8), but only the lower
|
||||
8 bits of each character will be used.
|
||||
|
||||
Example (for Greek, in UTF-8): *greek* >
|
||||
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
|
||||
@@ -4484,6 +4501,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'termencoding'.
|
||||
Note: MacVim does not use this option.
|
||||
|
||||
*'macmeta'* *'mmta'* *'nomacmeta'* *'nommta'*
|
||||
'macmeta' boolean (default off)
|
||||
local to buffer
|
||||
{only available in MacVim GUI}
|
||||
Use option (alt) as meta key. When on, option-key presses are not
|
||||
interpreted, thus enabling bindings to <M-..>. When off, option-key
|
||||
presses are interpreted by the selected input method and inserted as
|
||||
text.
|
||||
Note: Some keys (e.g. <M-F1>, <M-Tab>, <M-Return>, <M-Left>) can be
|
||||
bound with the Meta flag even when this option is disabled, but this
|
||||
is not the case for the majority of keys (e.g. <M-a>, <M-`>).
|
||||
|
||||
*'magic'* *'nomagic'*
|
||||
'magic' boolean (default on)
|
||||
global
|
||||
@@ -5430,7 +5459,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<
|
||||
*'runtimepath'* *'rtp'* *vimfiles*
|
||||
'runtimepath' 'rtp' string (default:
|
||||
Unix: "$HOME/.vim,
|
||||
Unix, Mac OS X: "$HOME/.vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@@ -5445,7 +5474,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$HOME/vimfiles/after"
|
||||
Macintosh: "$VIM:vimfiles,
|
||||
Macintosh (pre-OS X): "$VIM:vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM:vimfiles:after"
|
||||
RISC-OS: "Choices:vimfiles,
|
||||
@@ -7574,7 +7603,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+wildignore|
|
||||
feature}
|
||||
A list of file patterns. A file that matches with one of these
|
||||
patterns is ignored when completing file or directory names.
|
||||
patterns is ignored when completing file or directory names, and
|
||||
influences the result of |expand()|, |glob()| and |globpath()| unless
|
||||
a flag is passed to disable this.
|
||||
The pattern is used like with |:autocmd|, see |autocmd-patterns|.
|
||||
Also see 'suffixes'.
|
||||
Example: >
|
||||
|
||||
+125
-4
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.2. Last change: 2006 Nov 18
|
||||
*os_vms.txt* For Vim version 7.2. Last change: 2008 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -312,7 +312,7 @@ features, it is worth to choose non GUI executables.
|
||||
|
||||
8. Useful notes *vms-notes*
|
||||
|
||||
8.1 backspace/delete
|
||||
8.1 Backspace/delete
|
||||
8.2 Filters
|
||||
8.3 VMS file version numbers
|
||||
8.4 Directory conversion
|
||||
@@ -326,8 +326,10 @@ features, it is worth to choose non GUI executables.
|
||||
8.12 diff-mode
|
||||
8.13 Allow '$' in C keywords
|
||||
8.14 VIMTUTOR for beginners
|
||||
8.15 Slow start in console mode issue
|
||||
8.16 Common VIM directory - different architectures
|
||||
|
||||
8.1 backspace/delete
|
||||
8.1 Backspace/delete
|
||||
|
||||
There are backspace/delete key inconsistencies with VMS.
|
||||
:fixdel doesn't do the trick, but the solution is: >
|
||||
@@ -663,12 +665,130 @@ start it with: >
|
||||
|
||||
(Thomas.R.Wyant III, Vim 6.1)
|
||||
|
||||
8.14 Slow start in console mode issue
|
||||
|
||||
As GUI/GTK Vim works equally well in console mode, many administartors
|
||||
deploy those executables system wide.
|
||||
Unfortunately, on a remote slow connections GUI/GTK executables behave rather
|
||||
slow when user wants to run Vim just in the console mode - because of X environment detection timeout.
|
||||
|
||||
Luckily, there is a simple solution for that. Administrators need to deploy
|
||||
both GUI/GTK build and just console build executables, like below: >
|
||||
|
||||
|- vim72
|
||||
|----- doc
|
||||
|----- syntax
|
||||
vimrc (system rc files)
|
||||
gvimrc
|
||||
gvim.exe (the remaned GUI or GTK built vim.exe)
|
||||
vim.exe (the console only executable)
|
||||
|
||||
Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
||||
|
||||
$ define/nolog VIM RF10:[UTIL.VIM72] ! where you VIM directory is
|
||||
$ vi*m :== mcr VIM:VIM.EXE
|
||||
$ gvi*m :== mcr VIM:GVIM.EXE
|
||||
$ ! or you can try to spawn with
|
||||
$ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40
|
||||
|
||||
|
||||
Like this, users that do not have X environment and want to use Vim just in
|
||||
console mode can avoid performance problems.
|
||||
|
||||
(Zoltan Arpadffy, Vim 7.2)
|
||||
|
||||
8.15 Common VIM directory - different architectures
|
||||
|
||||
In a cluster that contains nodes with different architectures like below:
|
||||
|
||||
$show cluster
|
||||
View of Cluster from system ID 11655 node: TOR 18-AUG-2008 11:58:31
|
||||
+---------------------------------+
|
||||
¦ SYSTEMS ¦ MEMBERS ¦
|
||||
+-----------------------+---------¦
|
||||
¦ NODE ¦ SOFTWARE ¦ STATUS ¦
|
||||
+--------+--------------+---------¦
|
||||
¦ TOR ¦ VMS V7.3-2 ¦ MEMBER ¦
|
||||
¦ TITAN2 ¦ VMS V8.3 ¦ MEMBER ¦
|
||||
¦ ODIN ¦ VMS V7.3-2 ¦ MEMBER ¦
|
||||
+---------------------------------+
|
||||
|
||||
It is convinient to have a common VIM directory but execute different
|
||||
executables.
|
||||
There are more solutions for this problem:
|
||||
|
||||
solution 1. all executables in the same directory with different names
|
||||
This is easily done with the following script that can be added
|
||||
to the login.com or sylogin.com: >
|
||||
|
||||
$ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
|
||||
$ then
|
||||
$ say "VAX platform"
|
||||
$ vi*m:== mcr vim:VIM.EXE_VAX
|
||||
$ endif
|
||||
$ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
|
||||
$ then
|
||||
$ say "ALPHA platform"
|
||||
$ vi*m :== mcr vim:VIM.EXE_AXP
|
||||
$ endif
|
||||
$ if f$getsyi("ARCH_NAME") .eqs. "IA64"
|
||||
$ then
|
||||
$ say "IA64 platform"
|
||||
$ vi*m :== mcr vim:VIM.EXE_IA64
|
||||
$ endif
|
||||
|
||||
solution 2. different directories: >
|
||||
|
||||
$ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
|
||||
$ then
|
||||
$ say "VAX platform"
|
||||
$ define/nolog VIM RF10:[UTIL.VAX_EXE] ! VAX executables
|
||||
$ endif
|
||||
$ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
|
||||
$ then
|
||||
$ say "ALPHA platform"
|
||||
$ define/nolog VIM RF10:[UTIL.AXP_EXE] ! AXP executables
|
||||
$ endif
|
||||
$ if f$getsyi("ARCH_NAME") .eqs. "IA64"
|
||||
$ then
|
||||
$ say "IA64 platform"
|
||||
$ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables
|
||||
$ endif
|
||||
$! VIMRUNTIME must be defined in order to find runtime files
|
||||
$ define/nolog VIMRUNTIME RF10:[UTIL.VIM72]
|
||||
|
||||
A good examle for this approach is the [GNU]gnu_tools.com script from GNU_TOOLS.ZIP
|
||||
package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
(Zoltan Arpadffy, Vim 7.2)
|
||||
|
||||
==============================================================================
|
||||
|
||||
9. VMS related changes *vms-changes*
|
||||
|
||||
Version 7
|
||||
Recent changes
|
||||
- The following plugins are included into VMS runtime:
|
||||
genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3,
|
||||
bufexplorer 7.1.7, taglist 4.5
|
||||
- minor changes in vimrc (just in VMS runtime)
|
||||
- make_vms.mms - HUGE model is the default
|
||||
- [TESTDIR]make_vms.mms include as many tests possible
|
||||
- modify test30 and test54 for VMS
|
||||
- enable FLOAT feature in VMS port
|
||||
- os_vms.txt updated
|
||||
|
||||
Version 7.2 (2008 Aug 9)
|
||||
- VCF files write corrected
|
||||
- CTAGS 5.7 included
|
||||
- corrected make_vms.mms (on VAX gave syntax error)
|
||||
|
||||
Version 7.1 (2007 Jun 15)
|
||||
- create TAGS file from menu
|
||||
|
||||
Version 7 (2006 May 8)
|
||||
- Improved low level char input (affects just console mode)
|
||||
- Fixed plugin bug
|
||||
- CTAGS 5.6 included
|
||||
|
||||
Version 6.4 (2005 Oct 15)
|
||||
- GTKLIB and Vim build on IA64
|
||||
@@ -806,6 +926,7 @@ Version 4.5 (1996 Dec 16)
|
||||
|
||||
OpenVMS documentation and executables are maintained by:
|
||||
Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
OpenVMS Vim page: http://www.polarhome.com/vim/
|
||||
|
||||
This document uses parts and remarks from earlier authors and contributors
|
||||
of OS_VMS.TXT:
|
||||
|
||||
@@ -767,6 +767,7 @@ Short explanation of each option: *option-list*
|
||||
'listchars' 'lcs' characters for displaying in list mode
|
||||
'loadplugins' 'lpl' load plugin scripts when starting up
|
||||
'macatsui' Mac GUI: use ATSUI text drawing
|
||||
'macmeta' 'mmta' use option as meta key (MacVim GUI only)
|
||||
'magic' changes special characters in search patterns
|
||||
'makeef' 'mef' name of the errorfile for ":make"
|
||||
'makeprg' 'mp' program to use for the ":make" command
|
||||
|
||||
@@ -208,7 +208,7 @@ When using gvim, the --remote-wait only works properly this way: >
|
||||
MacVim uses distributed objects for interprocess communication. A server
|
||||
listens to a named port for new connections, and clients connect to this port
|
||||
to send messages. Server listings are made possible by the frontend (MacVim)
|
||||
keeping a list of all currently running servers. Thus, server are not aware
|
||||
keeping a list of all currently running servers. Thus, servers are not aware
|
||||
of each other directly; only MacVim knows which servers are running.
|
||||
|
||||
A client is any object which implements the MMVimClientProtocol (see
|
||||
|
||||
+43
-13
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.2. Last change: 2008 Jun 21
|
||||
*spell.txt* For Vim version 7.2. Last change: 2008 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -831,8 +831,11 @@ Comment lines in the .aff file start with a '#':
|
||||
|
||||
# comment line ~
|
||||
|
||||
With some items it's also possible to put a comment after it, but this isn't
|
||||
supported in general.
|
||||
Items with a fixed number of arguments can be followed by a comment. But only
|
||||
if none of the arguments can contain white space. The comment must start with
|
||||
a "#" character. Example:
|
||||
|
||||
KEEPCASE = # fix case for words with this flag ~
|
||||
|
||||
|
||||
ENCODING *spell-SET*
|
||||
@@ -965,6 +968,9 @@ common items and two-character flags for uncommon items.
|
||||
|
||||
Note: When using utf-8 only characters up to 65000 may be used for flags.
|
||||
|
||||
Note: even when using "num" or "long" the number of flags available to
|
||||
compounding and prefixes is limited to about 250.
|
||||
|
||||
|
||||
AFFIXES
|
||||
*spell-PFX* *spell-SFX*
|
||||
@@ -1178,6 +1184,9 @@ word as good.
|
||||
The flag also applies to the word with affixes, thus this can be used to mark
|
||||
a whole bunch of related words as bad.
|
||||
|
||||
*spell-FORBIDDENWORD*
|
||||
FORBIDDENWORD can be used just like BAD. For compatibility with Hunspell.
|
||||
|
||||
*spell-NEEDAFFIX*
|
||||
The NEEDAFFIX flag is used to require that a word is used with an affix. The
|
||||
word itself is not a good word (unless there is an empty affix). Example:
|
||||
@@ -1268,6 +1277,10 @@ compound word. The word itself is not a good word. Example:
|
||||
|
||||
NEEDCOMPOUND & ~
|
||||
|
||||
*spell-ONLYINCOMPOUND*
|
||||
The ONLYINCOMPOUND does exactly the same as NEEDCOMPOUND. Supported for
|
||||
compatiblity with Hunspell.
|
||||
|
||||
*spell-COMPOUNDMIN*
|
||||
The minimal character length of a word used for compounding is specified with
|
||||
COMPOUNDMIN. Example:
|
||||
@@ -1328,6 +1341,20 @@ compound. This means it counts for two words when checking the compounding
|
||||
rules. Can also be used for an affix to count the affix as a compounding
|
||||
word.
|
||||
|
||||
*spell-CHECKCOMPOUNDPATTERN*
|
||||
CHECKCOMPOUNDPATTERN is used to define patterns that, when matching at the
|
||||
position where two words are compounded together forbids the compound.
|
||||
For example:
|
||||
CHECKCOMPOUNDPATTERN o e ~
|
||||
|
||||
This forbids compounding if the first word ends in "o" and the second word
|
||||
starts with "e".
|
||||
|
||||
The arguments must be plain text, no patterns are actually supported, despite
|
||||
the item name. Case is always ignored.
|
||||
|
||||
The Hunspell feature to use three arguments and flags is not supported.
|
||||
|
||||
*spell-SYLLABLE*
|
||||
The SYLLABLE item defines characters or character sequences that are used to
|
||||
count the number of syllables in a word. Example:
|
||||
@@ -1496,6 +1523,10 @@ ignored, not supported or defined in another way.
|
||||
ACCENT (Hunspell) *spell-ACCENT*
|
||||
Use MAP instead. |spell-MAP|
|
||||
|
||||
BREAK (Hunspell) *spell-BREAK*
|
||||
Define break points. Unclear how it works exactly.
|
||||
Not supported.
|
||||
|
||||
CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE*
|
||||
Disallow uppercase letters at compound word boundaries.
|
||||
Not supported.
|
||||
@@ -1512,9 +1543,6 @@ CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
|
||||
Forbid three identical characters when compounding. Not
|
||||
supported.
|
||||
|
||||
CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN*
|
||||
Forbid compounding when patterns match. Not supported.
|
||||
|
||||
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
|
||||
Enables using two prefixes. Not supported.
|
||||
|
||||
@@ -1536,13 +1564,18 @@ COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
|
||||
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
|
||||
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
||||
|
||||
COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES*
|
||||
Number of COMPOUNDRULE lines following. Ignored, but the
|
||||
argument must be a number.
|
||||
|
||||
COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE*
|
||||
Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE|
|
||||
|spell-COMPOUNDSYLMAX|
|
||||
|
||||
FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
|
||||
Use BAD instead. |spell-BAD|
|
||||
|
||||
KEY (Hunspell) *spell-KEY*
|
||||
Define characters that are close together on the keyboard.
|
||||
Used to give better suggestions. Not supported.
|
||||
|
||||
LANG (Hunspell) *spell-LANG*
|
||||
This specifies language-specific behavior. This actually
|
||||
moves part of the language knowledge into the program,
|
||||
@@ -1553,10 +1586,7 @@ LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
|
||||
Only needed for morphological analysis.
|
||||
|
||||
MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
|
||||
Not supported.
|
||||
|
||||
ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
|
||||
Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
|
||||
Set number of n-gram suggestions. Not supported.
|
||||
|
||||
PSEUDOROOT (Hunspell) *spell-PSEUDOROOT*
|
||||
Use NEEDAFFIX instead. |spell-NEEDAFFIX|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.2. Last change: 2008 Jun 21
|
||||
*starting.txt* For Vim version 7.2. Last change: 2008 Nov 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -144,6 +144,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
-u NORC no yes
|
||||
--noplugin yes no
|
||||
|
||||
--startuptime {fname} *--startuptime*
|
||||
During startup write timing messages to the file {fname}.
|
||||
This can be used to find out where time is spent while loading
|
||||
your .vimrc, plugins and opening the first file.
|
||||
When {fname} already exists new messages are appended.
|
||||
(Only available when compiled with the |+startuptime|
|
||||
feature).
|
||||
|
||||
*--literal*
|
||||
--literal Take file names literally, don't expand wildcards. Not needed
|
||||
for Unix, because Vim always takes file names literally (the
|
||||
@@ -471,6 +479,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
window title and copy/paste using the X clipboard. This
|
||||
avoids a long startup time when running Vim in a terminal
|
||||
emulator and the connection to the X server is slow.
|
||||
See |--startuptime| to find out if affects you.
|
||||
Only makes a difference on Unix or VMS, when compiled with the
|
||||
|+X11| feature. Otherwise it's ignored.
|
||||
To disable the connection only for specific terminals, see the
|
||||
@@ -1338,8 +1347,9 @@ enter Vim and directly start working in your desired setup. |session-file|
|
||||
*viminfo-read*
|
||||
When Vim is started and the 'viminfo' option is non-empty, the contents of
|
||||
the viminfo file are read and the info can be used in the appropriate places.
|
||||
The marks are not read in at startup (but file marks are). See
|
||||
|initialization| for how to set the 'viminfo' option upon startup.
|
||||
The |v:oldfiles| variable is filled. The marks are not read in at startup
|
||||
(but file marks are). See |initialization| for how to set the 'viminfo'
|
||||
option upon startup.
|
||||
|
||||
*viminfo-write*
|
||||
When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo
|
||||
@@ -1373,6 +1383,8 @@ cursor position when the file was last exited. No marks are saved for files
|
||||
that start with any string given with the "r" flag in 'viminfo'. This can be
|
||||
used to avoid saving marks for files on removable media (for MS-DOS you would
|
||||
use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:").
|
||||
The |v:oldfiles| variable is filled with the file names that the viminfo file
|
||||
has marks for.
|
||||
|
||||
*viminfo-file-marks*
|
||||
Uppercase marks ('A to 'Z) are stored when writing the viminfo file. The
|
||||
@@ -1464,8 +1476,8 @@ most of the information will be restored).
|
||||
*:rv* *:rviminfo* *E195*
|
||||
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
|
||||
If [!] is given, then any information that is
|
||||
already set (registers, marks, etc.) will be
|
||||
overwritten. {not in Vi}
|
||||
already set (registers, marks, |v:oldfiles|, etc.)
|
||||
will be overwritten {not in Vi}
|
||||
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574*
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
|
||||
@@ -1480,4 +1492,20 @@ most of the information will be restored).
|
||||
the .viminfo file.
|
||||
{not in Vi}
|
||||
|
||||
*:ol* *:oldfiles*
|
||||
:ol[dfiles] List the files that have marks stored in the viminfo
|
||||
file. This list is read on startup and only changes
|
||||
afterwards with ":rviminfo!". Also see |v:oldfiles|.
|
||||
The number can be used with |c_#<|.
|
||||
{not in Vi, only when compiled with the +eval feature}
|
||||
|
||||
:bro[wse] ol[dfiles][!]
|
||||
List file names as with |:oldfiles|, and then prompt
|
||||
for a number. When the number is valid that file from
|
||||
the list is edited.
|
||||
If you get the |press-enter| prompt you can press "q"
|
||||
and still get the prompt to enter a file number.
|
||||
Use ! to abondon a modified buffer. |abandon|
|
||||
{not when compiled with tiny or small features}
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
+44
-2
@@ -1,4 +1,4 @@
|
||||
*usr_21.txt* For Vim version 7.2. Last change: 2007 May 01
|
||||
*usr_21.txt* For Vim version 7.2. Last change: 2008 Nov 09
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -153,7 +153,7 @@ information. This may cause information that previously exiting Vims stored
|
||||
to be lost. Each item can be remembered only once.
|
||||
|
||||
|
||||
GETTING BACK TO WHERE YOU WERE
|
||||
GETTING BACK TO WHERE YOU STOPPED VIM
|
||||
|
||||
You are halfway editing a file and it's time to leave for holidays. You exit
|
||||
Vim and go enjoy yourselves, forgetting all about your work. After a couple
|
||||
@@ -168,6 +168,48 @@ Mark '9 is lost.
|
||||
The |:marks| command is useful to find out where '0 to '9 will take you.
|
||||
|
||||
|
||||
GETTING BACK TO SOME FILE
|
||||
|
||||
If you want to go back to a file that you edited recently, but not when
|
||||
exiting Vim, there is a slightly more complicated way. You can see a list of
|
||||
files by typing the command: >
|
||||
|
||||
:oldfiles
|
||||
< 1: ~/.viminfo ~
|
||||
2: ~/text/resume.txt ~
|
||||
3: /tmp/draft ~
|
||||
|
||||
Now you would like to edit the second file, which is in the list preceded by
|
||||
"2:". You type: >
|
||||
|
||||
:e #<2
|
||||
|
||||
Instead of ":e" you can use any command that has a file name argument, the
|
||||
"#<2" item works in the same place as "%" (current file name) and "#"
|
||||
(alternate file name). So you can also split the window to edit the third
|
||||
file: >
|
||||
|
||||
:split #<3
|
||||
|
||||
That #<123 thing is a bit complicated when you just want to edit a file.
|
||||
Fortunately there is a simpler way: >
|
||||
|
||||
:browse oldfiles
|
||||
< 1: ~/.viminfo ~
|
||||
2: ~/text/resume.txt ~
|
||||
3: /tmp/draft ~
|
||||
-- More --
|
||||
|
||||
You get the same list of files as with |:oldfiles|. If you want to edit
|
||||
"resume.txt" first press "q" to stop the listing. You will get a prompt:
|
||||
|
||||
Type number and <Enter> (empty cancels): ~
|
||||
|
||||
Type "2" and press <Enter> to edit the second file.
|
||||
|
||||
More info at |:oldfiles|, |v:oldfiles| and |c_#<|.
|
||||
|
||||
|
||||
MOVE INFO FROM ONE VIM TO ANOTHER
|
||||
|
||||
You can use the ":wviminfo" and ":rviminfo" commands to save and restore the
|
||||
|
||||
@@ -376,6 +376,7 @@ N *+scrollbind* |'scrollbind'|
|
||||
B *+signs* |:sign|
|
||||
N *+smartindent* |'smartindent'|
|
||||
m *+sniff* SniFF interface |sniff|
|
||||
N *+startuptime* |--startuptime| argument
|
||||
N *+statusline* Options 'statusline', 'rulerformat' and special
|
||||
formats of 'titlestring' and 'iconstring'
|
||||
m *+sun_workshop* |workshop|
|
||||
@@ -511,6 +512,17 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
messages though. Use ":silent" in the command itself
|
||||
to avoid that: ":silent menu .... :silent command".
|
||||
|
||||
*:uns* *:unsilent*
|
||||
:uns[ilent] {command} Execute {command} not silently. Only makes a
|
||||
difference when |:silent| was used to get to this
|
||||
command.
|
||||
Use this for giving a message even when |:silent| was
|
||||
used. In this example |:silent| is used to avoid the
|
||||
message about reading the file and |:unsilent| to be
|
||||
able to list the first line of each file. >
|
||||
:silent argdo unsilent echo expand('%') . ": " . getline(1)
|
||||
<
|
||||
|
||||
*:verb* *:verbose*
|
||||
:[count]verb[ose] {command}
|
||||
Execute {command} with 'verbose' set to [count]. If
|
||||
|
||||
+134
-15
@@ -17,8 +17,7 @@ if !exists("did_install_default_menus")
|
||||
let did_install_default_menus = 1
|
||||
|
||||
|
||||
" Localized menus currently not supported in MacVim
|
||||
if !has("gui_macvim") && (exists("v:lang") || &langmenu != "")
|
||||
if (exists("v:lang") || &langmenu != "")
|
||||
" Try to find a menu translation file for the current language.
|
||||
if &langmenu != ""
|
||||
if &langmenu =~ "none"
|
||||
@@ -68,7 +67,27 @@ if !has("gui_macvim") && (exists("v:lang") || &langmenu != "")
|
||||
endif
|
||||
|
||||
|
||||
" MacVim Window menu (should be next to Help so give it a high priority)
|
||||
if has("gui_macvim")
|
||||
an <silent> 9998.300 Window.Minimize <Nop>
|
||||
an <silent> 9998.301 Window.Minimize\ All <Nop>
|
||||
an <silent> 9998.310 Window.Zoom <Nop>
|
||||
an <silent> 9998.311 Window.Zoom\ All <Nop>
|
||||
an <silent> 9998.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen<CR>
|
||||
an 9998.330 Window.-SEP1- <Nop>
|
||||
" TODO! Grey out if no tabs are visible.
|
||||
an <silent> 9998.340 Window.Select\ Next\ Tab :tabnext<CR>
|
||||
an <silent> 9998.350 Window.Select\ Previous\ Tab :tabprevious<CR>
|
||||
an 9998.360 Window.-SEP2- <Nop>
|
||||
an <silent> 9998.370 Window.Bring\ All\ To\ Front <Nop>
|
||||
endif
|
||||
|
||||
" Help menu
|
||||
if has("gui_macvim")
|
||||
an 9999.1 &Help.MacVim\ Help :h gui_mac<CR>
|
||||
an <silent> 9999.2 Help.MacVim\ Website <Nop>
|
||||
an 9999.3 &Help.-sep0- <Nop>
|
||||
endif
|
||||
an 9999.10 &Help.&Overview<Tab><F1> :help<CR>
|
||||
an 9999.20 &Help.&User\ Manual :help usr_toc<CR>
|
||||
an 9999.30 &Help.&How-to\ links :help how-to<CR>
|
||||
@@ -97,16 +116,32 @@ fun! s:Helpfind()
|
||||
endfun
|
||||
|
||||
" File menu
|
||||
an 10.310 &File.&Open\.\.\.<Tab>:e :browse confirm e<CR>
|
||||
if has("gui_macvim")
|
||||
an <silent> 10.290 &File.New\ Window <Nop>
|
||||
an 10.295 &File.New\ Tab :tabnew<CR>
|
||||
an <silent> 10.310 &File.Open\.\.\. <Nop>
|
||||
an <silent> 10.325 &File.Open\ Recent <Nop>
|
||||
an 10.328 &File.-SEP0- <Nop>
|
||||
an <silent> 10.330 &File.Close\ Window<Tab>:qa :conf qa<CR>
|
||||
an <silent> 10.332 &File.Close :conf q<CR>
|
||||
an <silent> 10.341 &File.Save\ All :browse conf wa<CR>
|
||||
an 10.350 &File.Save\ As\.\.\.<Tab>:sav :browse confirm saveas<CR>
|
||||
else
|
||||
endif
|
||||
if !has("gui_macvim")
|
||||
an 10.310 &File.&Open\.\.\.<Tab>:e :browse confirm e<CR>
|
||||
endif
|
||||
an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp :browse sp<CR>
|
||||
an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew :browse tabnew<CR>
|
||||
an 10.325 &File.&New<Tab>:enew :confirm enew<CR>
|
||||
an <silent> 10.330 &File.&Close<Tab>:close
|
||||
if !has("gui_macvim")
|
||||
an 10.325 &File.&New<Tab>:enew :confirm enew<CR>
|
||||
an <silent> 10.330 &File.&Close<Tab>:close
|
||||
\ :if winheight(2) < 0 <Bar>
|
||||
\ confirm enew <Bar>
|
||||
\ else <Bar>
|
||||
\ confirm close <Bar>
|
||||
\ endif<CR>
|
||||
endif
|
||||
an 10.335 &File.-SEP1- <Nop>
|
||||
an <silent> 10.340 &File.&Save<Tab>:w :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR>
|
||||
an 10.350 &File.Save\ &As\.\.\.<Tab>:sav :browse confirm saveas<CR>
|
||||
@@ -128,9 +163,11 @@ elseif has("unix")
|
||||
vunmenu &File.&Print
|
||||
vnoremenu &File.&Print :w !lpr<CR>
|
||||
endif
|
||||
an 10.600 &File.-SEP4- <Nop>
|
||||
an 10.610 &File.Sa&ve-Exit<Tab>:wqa :confirm wqa<CR>
|
||||
an 10.620 &File.E&xit<Tab>:qa :confirm qa<CR>
|
||||
if !has("gui_macvim")
|
||||
an 10.600 &File.-SEP4- <Nop>
|
||||
an 10.610 &File.Sa&ve-Exit<Tab>:wqa :confirm wqa<CR>
|
||||
an 10.620 &File.E&xit<Tab>:qa :confirm qa<CR>
|
||||
endif
|
||||
|
||||
func! <SID>SelectAll()
|
||||
exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
|
||||
@@ -167,13 +204,20 @@ inoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-O>:call <SID>S
|
||||
cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR>
|
||||
|
||||
an 20.405 &Edit.-SEP2- <Nop>
|
||||
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
|
||||
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
|
||||
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
|
||||
vunmenu &Edit.&Find\.\.\.
|
||||
vnoremenu <silent> &Edit.&Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
|
||||
an 20.420 &Edit.Find\ and\ Rep&lace\.\.\. :promptrepl<CR>
|
||||
vunmenu &Edit.Find\ and\ Rep&lace\.\.\.
|
||||
vnoremenu <silent> &Edit.Find\ and\ Rep&lace\.\.\. y:promptrepl <C-R>=<SID>FixFText()<CR><CR>
|
||||
elseif has("gui_macvim")
|
||||
an <silent> 20.410.10 &Edit.Find.Find\.\.\. :promptfind<CR>
|
||||
vunmenu &Edit.Find.Find\.\.\.
|
||||
vnoremenu <silent> &Edit.Find.Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
|
||||
an 20.410.20 &Edit.Find.Find\ Next <Nop>
|
||||
an 20.410.30 &Edit.Find.Find\ Previous <Nop>
|
||||
vmenu 20.410.35 &Edit.Find.Use\ Selection\ for\ Find y:let @/=@"<CR>:<BS>
|
||||
else
|
||||
an 20.410 &Edit.&Find<Tab>/ /
|
||||
an 20.420 &Edit.Find\ and\ Rep&lace<Tab>:%s :%s/
|
||||
@@ -386,6 +430,13 @@ if has("keymap")
|
||||
endif
|
||||
if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
|
||||
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
|
||||
elseif has("gui_macvim")
|
||||
an 20.470 &Edit.-SEP4- <Nop>
|
||||
an 20.475.10 &Edit.Font.Show\ Fonts <Nop>
|
||||
an 20.475.20 &Edit.Font.-SEP5- <Nop>
|
||||
an 20.475.30 &Edit.Font.Bigger <Nop>
|
||||
an 20.475.40 &Edit.Font.Smaller <Nop>
|
||||
an 20.480 &Edit.Special\ Characters\.\.\. <Nop>
|
||||
endif
|
||||
|
||||
" Programming menu
|
||||
@@ -803,6 +854,7 @@ endif
|
||||
endif " !exists("no_buffers_menu")
|
||||
|
||||
" Window menu
|
||||
if !has("gui_macvim")
|
||||
an 70.300 &Window.&New<Tab>^Wn <C-W>n
|
||||
an 70.310 &Window.S&plit<Tab>^Ws <C-W>s
|
||||
an 70.320 &Window.Sp&lit\ To\ #<Tab>^W^^ <C-W><C-^>
|
||||
@@ -835,6 +887,7 @@ an 70.380 &Window.&Max\ Height<Tab>^W_ <C-W>_
|
||||
an 70.390 &Window.M&in\ Height<Tab>^W1_ <C-W>1_
|
||||
an 70.400 &Window.Max\ &Width<Tab>^W\| <C-W>\|
|
||||
an 70.410 &Window.Min\ Widt&h<Tab>^W1\| <C-W>1\|
|
||||
endif " !has("gui_macvim")
|
||||
|
||||
" The popup menu
|
||||
an 1.10 PopUp.&Undo u
|
||||
@@ -980,7 +1033,7 @@ if has("toolbar")
|
||||
exe 'vnoremenu <script> ToolBar.Paste ' . paste#paste_cmd['v']
|
||||
exe 'inoremenu <script> ToolBar.Paste ' . paste#paste_cmd['i']
|
||||
|
||||
if !has("gui_athena")
|
||||
if !has("gui_athena") && !has("gui_macvim")
|
||||
an 1.95 ToolBar.-sep3- <Nop>
|
||||
an 1.100 ToolBar.Replace :promptrepl<CR>
|
||||
vunmenu ToolBar.Replace
|
||||
@@ -989,19 +1042,27 @@ if has("toolbar")
|
||||
an 1.120 ToolBar.FindPrev N
|
||||
endif
|
||||
|
||||
an 1.215 ToolBar.-sep5- <Nop>
|
||||
if !has("gui_macvim")
|
||||
an 1.215 ToolBar.-sep5- <Nop>
|
||||
endif
|
||||
an <silent> 1.220 ToolBar.LoadSesn :call <SID>LoadVimSesn()<CR>
|
||||
an <silent> 1.230 ToolBar.SaveSesn :call <SID>SaveVimSesn()<CR>
|
||||
an 1.240 ToolBar.RunScript :browse so<CR>
|
||||
|
||||
an 1.245 ToolBar.-sep6- <Nop>
|
||||
if !has("gui_macvim")
|
||||
an 1.245 ToolBar.-sep6- <Nop>
|
||||
endif
|
||||
an 1.250 ToolBar.Make :make<CR>
|
||||
an 1.270 ToolBar.RunCtags :exe "!" . g:ctags_command<CR>
|
||||
an 1.280 ToolBar.TagJump g<C-]>
|
||||
if !has("gui_macvim")
|
||||
an 1.270 ToolBar.RunCtags :exe "!" . g:ctags_command<CR>
|
||||
an 1.280 ToolBar.TagJump g<C-]>
|
||||
endif
|
||||
|
||||
an 1.295 ToolBar.-sep7- <Nop>
|
||||
an 1.300 ToolBar.Help :help<CR>
|
||||
an <silent> 1.310 ToolBar.FindHelp :call <SID>Helpfind()<CR>
|
||||
if !has("gui_macvim")
|
||||
an <silent> 1.310 ToolBar.FindHelp :call <SID>Helpfind()<CR>
|
||||
endif
|
||||
|
||||
" Only set the tooltips here if not done in a language menu file
|
||||
if exists("*Do_toolbar_tmenu")
|
||||
@@ -1104,4 +1165,62 @@ endif " !exists("did_install_syntax_menu")
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
if has("gui_macvim")
|
||||
"
|
||||
" Set up menu key equivalents (these should always have the 'D' modifier
|
||||
" set), action bindings, and alternate items.
|
||||
"
|
||||
" Note: menu items which should execute an action are bound to <Nop>; the
|
||||
" action message is specified here via the :macmenu command.
|
||||
"
|
||||
macm File.New\ Window key=<D-n> action=newWindow:
|
||||
macm File.New\ Tab key=<D-t>
|
||||
macm File.Open\.\.\. key=<D-o> action=fileOpen:
|
||||
macm File.Open\ Tab\.\.\.<Tab>:tabnew key=<D-T>
|
||||
macm File.Open\ Recent action=recentFilesDummy:
|
||||
macm File.Close\ Window<Tab>:qa key=<D-W>
|
||||
macm File.Close key=<D-w> action=performClose:
|
||||
macm File.Save<Tab>:w key=<D-s>
|
||||
macm File.Save\ All key=<D-M-s> alt=YES
|
||||
macm File.Save\ As\.\.\.<Tab>:sav key=<D-S>
|
||||
macm File.Print key=<D-p>
|
||||
|
||||
macm Edit.Undo<Tab>u key=<D-z> action=undo:
|
||||
macm Edit.Redo<Tab>^R key=<D-Z> action=redo:
|
||||
macm Edit.Cut<Tab>"+x key=<D-x> action=cut:
|
||||
macm Edit.Copy<Tab>"+y key=<D-c> action=copy:
|
||||
macm Edit.Paste<Tab>"+gP key=<D-v> action=paste:
|
||||
macm Edit.Select\ All<Tab>ggVG key=<D-a> action=selectAll:
|
||||
macm Edit.Find.Find\.\.\. key=<D-f>
|
||||
macm Edit.Find.Find\ Next key=<D-g> action=findNext:
|
||||
macm Edit.Find.Find\ Previous key=<D-G> action=findPrevious:
|
||||
macm Edit.Find.Use\ Selection\ for\ Find key=<D-e>
|
||||
macm Edit.Font.Show\ Fonts action=orderFrontFontPanel:
|
||||
macm Edit.Font.Bigger key=<D-=> action=fontSizeUp:
|
||||
macm Edit.Font.Smaller key=<D--> action=fontSizeDown:
|
||||
macm Edit.Special\ Characters\.\.\. key=<D-M-t> action=orderFrontCharacterPalette:
|
||||
|
||||
macm Tools.Spelling.To\ Next\ error<Tab>]s key=<D-;>
|
||||
macm Tools.Spelling.Suggest\ Corrections<Tab>z= key=<D-:>
|
||||
macm Tools.Make<Tab>:make key=<D-b>
|
||||
macm Tools.List\ Errors<Tab>:cl key=<D-l>
|
||||
macm Tools.Next\ Error<Tab>:cn key=<D-C-Right>
|
||||
macm Tools.Previous\ Error<Tab>:cp key=<D-C-Left>
|
||||
macm Tools.Older\ List<Tab>:cold key=<D-C-Up>
|
||||
macm Tools.Newer\ List<Tab>:cnew key=<D-C-Down>
|
||||
|
||||
macm Window.Minimize key=<D-m> action=performMiniaturize:
|
||||
macm Window.Minimize\ All key=<D-M-m> action=miniaturizeAll: alt=YES
|
||||
macm Window.Zoom key=<D-C-z> action=performZoom:
|
||||
macm Window.Zoom\ All key=<D-M-C-z> action=zoomAll: alt=YES
|
||||
macm Window.Toggle\ Full\ Screen\ Mode key=<D-F>
|
||||
macm Window.Select\ Next\ Tab key=<D-}>
|
||||
macm Window.Select\ Previous\ Tab key=<D-{>
|
||||
macm Window.Bring\ All\ To\ Front action=arrangeInFront:
|
||||
|
||||
macm Help.MacVim\ Help key=<D-?>
|
||||
macm Help.MacVim\ Website action=openWebsite:
|
||||
endif
|
||||
|
||||
" vim: set sw=2 :
|
||||
|
||||
@@ -623,6 +623,9 @@ if has("gui")
|
||||
call <SID>BinOptionG("fullscreen", &fullscreen)
|
||||
call append("$", "fuoptions\tcontrol how fullscreen mode should behave")
|
||||
call <SID>OptionG("fuoptions", &fuoptions)
|
||||
call append("$", "macmeta\tuse option as meta key")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("mmta")
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -234,6 +234,10 @@ else
|
||||
elseif s:line1 =~ '\<DTD\s\+XHTML\s'
|
||||
set ft=xhtml
|
||||
|
||||
" HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
|
||||
elseif s:line1 =~? '\<DOCTYPE\s\+html\>'
|
||||
set ft=html
|
||||
|
||||
" PDF
|
||||
elseif s:line1 =~ '^%PDF-'
|
||||
set ft=pdf
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
" Vim script to fix duplicate words in a .dic file vim: set ft=vim:
|
||||
"
|
||||
" Usage: Edit the .dic file and source this script.
|
||||
|
||||
let deleted = 0
|
||||
|
||||
" Start below the word count.
|
||||
let lnum = 2
|
||||
while lnum <= line('$')
|
||||
let word = getline(lnum)
|
||||
if word !~ '/'
|
||||
if search('^' . word . '/', 'w') != 0
|
||||
let deleted += 1
|
||||
exe lnum . "d"
|
||||
continue " don't increment lnum, it's already at the next word
|
||||
endif
|
||||
endif
|
||||
let lnum += 1
|
||||
endwhile
|
||||
|
||||
if deleted == 0
|
||||
echomsg "No duplicate words found"
|
||||
elseif deleted == 1
|
||||
echomsg "Deleted 1 duplicate word"
|
||||
else
|
||||
echomsg printf("Deleted %d duplicate words", deleted)
|
||||
endif
|
||||
@@ -635,7 +635,9 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
}
|
||||
// Now concatenate
|
||||
strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1);
|
||||
strncat(temp, title, BUFSIZE - 1);
|
||||
temp[BUFSIZE - 1] = '\0';
|
||||
strncat(temp, title, BUFSIZE - 1 - strlen(temp));
|
||||
temp[BUFSIZE - 1] = '\0';
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
NSEnumerator* myIterator = [commands objectEnumerator];
|
||||
NSDictionary* currCommand;
|
||||
|
||||
while (currCommand = [myIterator nextObject])
|
||||
{
|
||||
while ((currCommand = [myIterator nextObject])) {
|
||||
/* do something useful with currCommand */
|
||||
FILE *ioPipe = NULL;
|
||||
char junk[256];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// Released into public domain on 4/10/08.
|
||||
//
|
||||
// Version: 1.8
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
|
||||
#import "CTGradient.h"
|
||||
|
||||
@@ -1266,3 +1267,5 @@ void resolveHSV(float *color1, float *color2) //H value may be undefined (i.e. g
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // MM_ENABLE_PLUGINS
|
||||
|
||||
+464
-461
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\vieww9000\viewh8400\viewkind0
|
||||
@@ -29,6 +29,9 @@ Enno L\'fcbbers\
|
||||
Kyle Lippincott\
|
||||
Matt Tolton\
|
||||
Kaoru Yoshida\
|
||||
Ron Olson\
|
||||
Jonathon Mah\
|
||||
Kazuki Sakamoto\
|
||||
|
||||
\i0 \
|
||||
...and many others who have helped by reporting bugs etc.\
|
||||
@@ -38,8 +41,6 @@ Thank you to {\field{\*\fldinst{HYPERLINK "http://www.positivespinmedia.com"}}{\
|
||||
\
|
||||
Toolbar icons by {\field{\*\fldinst{HYPERLINK "http://www.mattballdesign.com/"}}{\fldrslt Matt Ball}} (free Developer Icons), {\field{\*\fldinst{HYPERLINK "http://www.jonasraskdesign.com/"}}{\fldrslt Jonas Rask}} (Danish Royalty Free icon set), and {\field{\*\fldinst{HYPERLINK "http://www.everaldo.com"}}{\fldrslt Everaldo Coelho}} (Crystal Project Icons, released under LGPL license).\
|
||||
\
|
||||
Vim icons made by {\field{\*\fldinst{HYPERLINK "http://www.cs.princeton.edu/~mtwebb/vim_icon/vim_icons.html"}}{\fldrslt Matthew Webb}}.\
|
||||
\
|
||||
The default font in MacVim, DejaVu Sans Mono, is based on the Bitstream Vera\'99 and Arev fonts. Bitstream Vera\'99 is \'a9 2003 by Bitstream, Inc. Arev is \'a9 2006 by Tavmjong Bah. The DejaVu changes to these fonts are in the public domain.\
|
||||
\
|
||||
Thanks to Andy Matuschak for {\field{\*\fldinst{HYPERLINK "http://sparkle.andymatuschak.org/"}}{\fldrslt Sparkle}}.\
|
||||
@@ -50,4 +51,6 @@ Thanks to Allan Odgaard for making the "Edit in TextMate" input manager source c
|
||||
\
|
||||
Thanks to Rainer Brockerhoff for RBSplitView.\
|
||||
\
|
||||
Thanks to Chad Weider for CTGradient.}
|
||||
Thanks to Chad Weider for CTGradient.\
|
||||
\
|
||||
Thanks to Damien Guard for {\field{\*\fldinst{HYPERLINK "http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released"}}{\fldrslt Envy Code R}} (used in MacVim's 16x16 document icons).}
|
||||
@@ -42,7 +42,12 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface DBPrefsWindowController : NSWindowController {
|
||||
@interface DBPrefsWindowController : NSWindowController
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
|
||||
// 10.6 has turned delegate messages into formal protocols
|
||||
<NSAnimationDelegate, NSToolbarDelegate>
|
||||
#endif
|
||||
{
|
||||
NSMutableArray *toolbarIdentifiers;
|
||||
NSMutableDictionary *toolbarViews;
|
||||
NSMutableDictionary *toolbarItems;
|
||||
|
||||
+21
-50
@@ -4,44 +4,6 @@
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>changePreloadCacheSize</key>
|
||||
<string>id</string>
|
||||
<key>installOdb</key>
|
||||
<string>id</string>
|
||||
<key>openInCurrentWindowSelectionChanged</key>
|
||||
<string>id</string>
|
||||
<key>uninstallOdb</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>MMPreferenceController</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>advancedPreferences</key>
|
||||
<string>NSView</string>
|
||||
<key>editors</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>generalPreferences</key>
|
||||
<string>NSView</string>
|
||||
<key>installOdbButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>integrationPreferences</key>
|
||||
<string>NSView</string>
|
||||
<key>layoutPopUpButton</key>
|
||||
<string>NSPopUpButton</string>
|
||||
<key>obdBundleVersionLabel</key>
|
||||
<string>NSTextField</string>
|
||||
<key>uninstallOdbButton</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>DBPrefsWindowController</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>RBSplitView</string>
|
||||
@@ -64,25 +26,21 @@
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>findAndReplace</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSMenu</string>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>atsuiButtonClicked</key>
|
||||
<string>id</string>
|
||||
<key>loginShellButtonClicked</key>
|
||||
<string>id</string>
|
||||
<key>quickstartButtonClicked</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<string>NSMenu</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
@@ -103,9 +61,22 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>DBPrefsWindowController</string>
|
||||
<string>MMFindReplaceController</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>backwardButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>findBox</key>
|
||||
<string>NSTextField</string>
|
||||
<key>ignoreCaseButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>matchWordButton</key>
|
||||
<string>NSButton</string>
|
||||
<key>replaceBox</key>
|
||||
<string>NSTextField</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSWindowController</string>
|
||||
</dict>
|
||||
+3
-3
@@ -5,15 +5,15 @@
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../MacVim.xcodeproj</string>
|
||||
<string>../MacVim.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>115</integer>
|
||||
<integer>7</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9E17</string>
|
||||
<string>9F33</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
Binary file not shown.
+50
-120
@@ -1,120 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBClasses</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>fileOpen</key>
|
||||
<string>id</string>
|
||||
<key>fontSizeDown</key>
|
||||
<string>id</string>
|
||||
<key>fontSizeUp</key>
|
||||
<string>id</string>
|
||||
<key>forceNewWindow</key>
|
||||
<string>id</string>
|
||||
<key>newWindow</key>
|
||||
<string>id</string>
|
||||
<key>newWindowAndActivate</key>
|
||||
<string>id</string>
|
||||
<key>openWebsite</key>
|
||||
<string>id</string>
|
||||
<key>orderFrontPreferencePanel</key>
|
||||
<string>id</string>
|
||||
<key>selectNextWindow</key>
|
||||
<string>id</string>
|
||||
<key>selectPreviousWindow</key>
|
||||
<string>id</string>
|
||||
<key>showHelp</key>
|
||||
<string>id</string>
|
||||
<key>showVimHelp</key>
|
||||
<string>id</string>
|
||||
<key>zoomAll</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>MMAppController</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>RBSplitView</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>OUTLETS</key>
|
||||
<dict>
|
||||
<key>delegate</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>RBSplitSubview</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>RBSplitSubview</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSMenu</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>_cycleWindows</key>
|
||||
<string>id</string>
|
||||
<key>_cycleWindowsBackwards</key>
|
||||
<string>id</string>
|
||||
<key>addNewTab</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>FirstResponder</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>didAdjustSubviews</key>
|
||||
<string>RBSplitView</string>
|
||||
<key>willAdjustSubviews</key>
|
||||
<string>RBSplitView</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>NSObject</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
<key>checkForUpdates</key>
|
||||
<string>id</string>
|
||||
</dict>
|
||||
<key>CLASS</key>
|
||||
<string>SUUpdater</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
{
|
||||
IBClasses = (
|
||||
{
|
||||
ACTIONS = {"_cycleWindows" = id; "_cycleWindowsBackwards" = id; addNewTab = id; };
|
||||
CLASS = FirstResponder;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
fileOpen = id;
|
||||
fontSizeDown = id;
|
||||
fontSizeUp = id;
|
||||
forceNewWindow = id;
|
||||
newWindow = id;
|
||||
newWindowAndActivate = id;
|
||||
openWebsite = id;
|
||||
orderFrontPreferencePanel = id;
|
||||
selectNextWindow = id;
|
||||
selectPreviousWindow = id;
|
||||
showHelp = id;
|
||||
showVimHelp = id;
|
||||
zoomAll = id;
|
||||
};
|
||||
CLASS = MMAppController;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = NSMenu; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {didAdjustSubviews = RBSplitView; willAdjustSubviews = RBSplitView; };
|
||||
CLASS = NSObject;
|
||||
LANGUAGE = ObjC;
|
||||
},
|
||||
{CLASS = RBSplitSubview; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
CLASS = RBSplitView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {delegate = id; };
|
||||
SUPERCLASS = RBSplitSubview;
|
||||
},
|
||||
{
|
||||
ACTIONS = {checkForUpdates = id; };
|
||||
CLASS = SUUpdater;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSObject;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
+13
-4
@@ -1,17 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>84 130 356 240 0 0 1024 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>84 375 281 44 0 0 1024 746 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<string>489.0</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../MacVim.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array/>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9E17</string>
|
||||
<string>8S165</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCocoaFramework</string>
|
||||
</dict>
|
||||
|
||||
Binary file not shown.
+2573
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+2023
-57
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,532 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- These keys are needed to prevent Cocoa from inserting them as
|
||||
normal text (missing from StandardKeyBinding.dict below).
|
||||
-->
|
||||
<key>$</key>
|
||||
<string>deleteBackward:</string>
|
||||
<key>$
|
||||
</key>
|
||||
<string>insertNewline:</string>
|
||||
<key>^~
|
||||
</key>
|
||||
<string>insertNewline:</string>
|
||||
<key>$</key>
|
||||
<string>insertNewline:</string>
|
||||
<key>^~</key>
|
||||
<string>insertNewline:</string>
|
||||
<key>^</key>
|
||||
<string>cancelOperation:</string>
|
||||
<key>$</key>
|
||||
<string>cancelOperation:</string>
|
||||
<key>^~</key>
|
||||
<string>cancelOperation:</string>
|
||||
<key>^~ </key>
|
||||
<string>insertTab:</string>
|
||||
<key>~</key>
|
||||
<string>insertBackTab:</string>
|
||||
<key>^~</key>
|
||||
<string>insertBackTab:</string>
|
||||
<key>^ </key>
|
||||
<string>keySpace:</string>
|
||||
<key>~ </key>
|
||||
<string>keySpace:</string>
|
||||
<key>$ </key>
|
||||
<string>keySpace:</string>
|
||||
<key>^~ </key>
|
||||
<string>keySpace:</string>
|
||||
|
||||
<!-- The following keys involving Command (@) are here to make sure
|
||||
interpretKeyEvents: does not block Command+Alt+.. and
|
||||
Command+Ctrl+.. key events. -->
|
||||
<key>@~</key>
|
||||
<string>noop:</string>
|
||||
<key>@^</key>
|
||||
<string>noop:</string>
|
||||
<key>@^~</key>
|
||||
<string>noop:</string>
|
||||
|
||||
|
||||
<!-- These keys are used to convert certain keys so that we don't have
|
||||
to do it manually.
|
||||
-->
|
||||
<!-- Turn Ctrl-2 into Ctrl-@ -->
|
||||
<key>^2</key>
|
||||
<string>keyCtrlAt:</string>
|
||||
<!-- Turn Ctrl-6 into Ctrl-^ -->
|
||||
<key>^6</key>
|
||||
<string>keyCtrlHat:</string>
|
||||
|
||||
|
||||
<!-- These are copied from AppKit.framework/StandardKeyBinding.dict
|
||||
-->
|
||||
<key></key>
|
||||
<string>insertNewline:</string>
|
||||
<key></key>
|
||||
<string>deleteBackward:</string>
|
||||
<key> </key>
|
||||
<string>insertTab:</string>
|
||||
<key>
|
||||
</key>
|
||||
<string>insertNewline:</string>
|
||||
<key>
|
||||
</key>
|
||||
<string>insertNewline:</string>
|
||||
<key></key>
|
||||
<string>insertBacktab:</string>
|
||||
<key></key>
|
||||
<string>cancelOperation:</string>
|
||||
<key>$</key>
|
||||
<string>moveUpAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>moveDownAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>moveLeftAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>moveRightAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>moveToEndOfDocumentAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>pageUpAndModifySelection:</string>
|
||||
<key>$</key>
|
||||
<string>pageDownAndModifySelection:</string>
|
||||
<key>@</key>
|
||||
<string>noop:</string>
|
||||
<key>@ </key>
|
||||
<string>cycleToNextInputScript:</string>
|
||||
<key>@.</key>
|
||||
<string>cancelOperation:</string>
|
||||
<key>@^ </key>
|
||||
<string>togglePlatformInputSystem:</string>
|
||||
<key>@~ </key>
|
||||
<string>cycleToNextInputKeyboardLayout:</string>
|
||||
<key>^</key>
|
||||
<string>noop:</string>
|
||||
<key>^</key>
|
||||
<string>insertLineBreak:</string>
|
||||
<key>^ </key>
|
||||
<string>selectNextKeyView:</string>
|
||||
<key>^
|
||||
</key>
|
||||
<string>insertLineBreak:</string>
|
||||
<key>^
|
||||
</key>
|
||||
<string>insertLineBreak:</string>
|
||||
<key>^</key>
|
||||
<string>selectPreviousKeyView:</string>
|
||||
<key>^"</key>
|
||||
<string>insertDoubleQuoteIgnoringSubstitution:</string>
|
||||
<key>^'</key>
|
||||
<string>insertSingleQuoteIgnoringSubstitution:</string>
|
||||
<key>^A</key>
|
||||
<string>moveToBeginningOfParagraphAndModifySelection:</string>
|
||||
<key>^B</key>
|
||||
<string>moveBackwardAndModifySelection:</string>
|
||||
<key>^E</key>
|
||||
<string>moveToEndOfParagraphAndModifySelection:</string>
|
||||
<key>^F</key>
|
||||
<string>moveForwardAndModifySelection:</string>
|
||||
<key>^N</key>
|
||||
<string>moveDownAndModifySelection:</string>
|
||||
<key>^P</key>
|
||||
<string>moveUpAndModifySelection:</string>
|
||||
<key>^V</key>
|
||||
<string>pageDownAndModifySelection:</string>
|
||||
<key>^a</key>
|
||||
<string>moveToBeginningOfParagraph:</string>
|
||||
<key>^b</key>
|
||||
<string>moveBackward:</string>
|
||||
<key>^d</key>
|
||||
<string>deleteForward:</string>
|
||||
<key>^e</key>
|
||||
<string>moveToEndOfParagraph:</string>
|
||||
<key>^f</key>
|
||||
<string>moveForward:</string>
|
||||
<key>^h</key>
|
||||
<string>deleteBackward:</string>
|
||||
<key>^k</key>
|
||||
<string>deleteToEndOfParagraph:</string>
|
||||
<key>^l</key>
|
||||
<string>centerSelectionInVisibleArea:</string>
|
||||
<key>^n</key>
|
||||
<string>moveDown:</string>
|
||||
<!-- <key>^o</key>
|
||||
<array>
|
||||
<string>insertNewlineIgnoringFieldEditor:</string>
|
||||
<string>moveBackward:</string>
|
||||
</array> -->
|
||||
<key>^p</key>
|
||||
<string>moveUp:</string>
|
||||
<key>^t</key>
|
||||
<string>transpose:</string>
|
||||
<key>^v</key>
|
||||
<string>pageDown:</string>
|
||||
<key>^y</key>
|
||||
<string>yank:</string>
|
||||
<key>^~</key>
|
||||
<string>deleteWordBackward:</string>
|
||||
<key>^</key>
|
||||
<string>deleteBackwardByDecomposingPreviousCharacter:</string>
|
||||
<key>~</key>
|
||||
<string>insertNewlineIgnoringFieldEditor:</string>
|
||||
<key>~</key>
|
||||
<string>deleteWordBackward:</string>
|
||||
<key>~ </key>
|
||||
<string>insertTabIgnoringFieldEditor:</string>
|
||||
<key>~
|
||||
</key>
|
||||
<string>insertNewlineIgnoringFieldEditor:</string>
|
||||
<key>~
|
||||
</key>
|
||||
<string>insertNewlineIgnoringFieldEditor:</string>
|
||||
<key>~</key>
|
||||
<string>complete:</string>
|
||||
<key>~^B</key>
|
||||
<string>moveWordBackwardAndModifySelection:</string>
|
||||
<key>~^F</key>
|
||||
<string>moveWordForwardAndModifySelection:</string>
|
||||
<key>~^b</key>
|
||||
<string>moveWordBackward:</string>
|
||||
<key>~^f</key>
|
||||
<string>moveWordForward:</string>
|
||||
<key>~</key>
|
||||
<string>deleteWordBackward:</string>
|
||||
<key></key>
|
||||
<string>deleteBackward:</string>
|
||||
<key></key>
|
||||
<string>moveUp:</string>
|
||||
<key></key>
|
||||
<string>moveDown:</string>
|
||||
<key></key>
|
||||
<string>moveLeft:</string>
|
||||
<key></key>
|
||||
<string>moveRight:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>complete:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>deleteForward:</string>
|
||||
<key></key>
|
||||
<string>scrollToBeginningOfDocument:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>scrollToEndOfDocument:</string>
|
||||
<key></key>
|
||||
<string>scrollPageUp:</string>
|
||||
<key></key>
|
||||
<string>scrollPageDown:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key>@</key>
|
||||
<string>moveToBeginningOfDocument:</string>
|
||||
<key>@</key>
|
||||
<string>moveToEndOfDocument:</string>
|
||||
<key>@</key>
|
||||
<string>moveToBeginningOfLine:</string>
|
||||
<key>@</key>
|
||||
<string>moveToEndOfLine:</string>
|
||||
<key>@$</key>
|
||||
<string>moveToBeginningOfDocumentAndModifySelection:</string>
|
||||
<key>@$</key>
|
||||
<string>moveToEndOfDocumentAndModifySelection:</string>
|
||||
<key>@$</key>
|
||||
<string>moveToBeginningOfLineAndModifySelection:</string>
|
||||
<key>@$</key>
|
||||
<string>moveToEndOfLineAndModifySelection:</string>
|
||||
<key>@^</key>
|
||||
<string>changeBaseWritingDirectionToRTL:</string>
|
||||
<key>@^</key>
|
||||
<string>changeBaseWritingDirectionToLTR:</string>
|
||||
<key>@</key>
|
||||
<string>deleteToBeginningOfLine:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key></key>
|
||||
<string>noop:</string>
|
||||
<key>^</key>
|
||||
<string>scrollPageUp:</string>
|
||||
<key>^</key>
|
||||
<string>scrollPageDown:</string>
|
||||
<key>^</key>
|
||||
<string>moveToBeginningOfLine:</string>
|
||||
<key>^</key>
|
||||
<string>moveToEndOfLine:</string>
|
||||
<key>^$</key>
|
||||
<string>moveToBeginningOfLineAndModifySelection:</string>
|
||||
<key>^$</key>
|
||||
<string>moveToEndOfLineAndModifySelection:</string>
|
||||
<!-- <key>~</key>
|
||||
<array>
|
||||
<string>moveBackward:</string>
|
||||
<string>moveToBeginningOfParagraph:</string>
|
||||
</array>
|
||||
<key>~</key>
|
||||
<array>
|
||||
<string>moveForward:</string>
|
||||
<string>moveToEndOfParagraph:</string>
|
||||
</array> -->
|
||||
<key>~</key>
|
||||
<string>moveWordLeft:</string>
|
||||
<key>~</key>
|
||||
<string>moveWordRight:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~$</key>
|
||||
<string>moveParagraphBackwardAndModifySelection:</string>
|
||||
<key>~$</key>
|
||||
<string>moveParagraphForwardAndModifySelection:</string>
|
||||
<key>~$</key>
|
||||
<string>moveWordLeftAndModifySelection:</string>
|
||||
<key>~$</key>
|
||||
<string>moveWordRightAndModifySelection:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>deleteWordForward:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>pageUp:</string>
|
||||
<key>~</key>
|
||||
<string>pageDown:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
<string>noop:</string>
|
||||
<key>~</key>
|
||||
@@ -28,6 +28,9 @@
|
||||
NSMutableArray *cachedVimControllers;
|
||||
int preloadPid;
|
||||
BOOL shouldActivateWhenNextWindowOpens;
|
||||
int numChildProcesses;
|
||||
NSMutableDictionary *inputQueues;
|
||||
int processingFlag;
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
|
||||
FSEventStreamRef fsEventStream;
|
||||
@@ -46,6 +49,8 @@
|
||||
- (void)windowControllerWillOpen:(MMWindowController *)windowController;
|
||||
- (void)setMainMenu:(NSMenu *)mainMenu;
|
||||
- (NSArray *)filterOpenFiles:(NSArray *)filenames;
|
||||
- (BOOL)openFiles:(NSArray *)filenames withArguments:(NSDictionary *)args;
|
||||
|
||||
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
- (void)addItemToPlugInMenu:(NSMenuItem *)item;
|
||||
|
||||
+942
-340
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
||||
#import "MMApplication.h"
|
||||
|
||||
// Ctrl-Tab is broken on pre 10.5, so we add a hack to make it work.
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
# import "MMTextView.h"
|
||||
# define MM_CTRL_TAB_HACK 1
|
||||
#endif
|
||||
|
||||
@@ -8,21 +8,24 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#if ENABLE_ATSUI
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MMTextView.h"
|
||||
|
||||
enum { MMMaxCellsPerChar = 2 };
|
||||
|
||||
@class MMTextViewHelper;
|
||||
|
||||
|
||||
@interface MMAtsuiTextView : NSView {
|
||||
@interface MMAtsuiTextView : NSView <NSTextInput> {
|
||||
// From MMTextStorage
|
||||
int maxRows, maxColumns;
|
||||
NSColor *defaultBackgroundColor;
|
||||
NSColor *defaultForegroundColor;
|
||||
NSSize cellSize;
|
||||
NSFont *font;
|
||||
NSFont *fontWide;
|
||||
float linespace;
|
||||
float ascender;
|
||||
|
||||
@@ -44,28 +47,35 @@ enum { MMMaxCellsPerChar = 2 };
|
||||
// MMTextStorage methods
|
||||
//
|
||||
- (int)maxRows;
|
||||
- (int)maxColumns;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
- (void)setMaxRows:(int)rows columns:(int)cols;
|
||||
- (void)setDefaultColorsBackground:(NSColor *)bgColor
|
||||
foreground:(NSColor *)fgColor;
|
||||
- (NSColor *)defaultBackgroundColor;
|
||||
- (NSColor *)defaultForegroundColor;
|
||||
- (NSRect)rectForRowsInRange:(NSRange)range;
|
||||
- (NSRect)rectForColumnsInRange:(NSRange)range;
|
||||
|
||||
- (void)setFont:(NSFont *)newFont;
|
||||
- (void)setWideFont:(NSFont *)newFont;
|
||||
- (NSFont *)font;
|
||||
- (NSFont *)fontWide;
|
||||
- (NSSize)cellSize;
|
||||
- (void)setLinespace:(float)newLinespace;
|
||||
|
||||
//
|
||||
// MMTextView methods
|
||||
//
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on;
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
- (void)hideMarkedTextField;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)setAntialias:(BOOL)state;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSPoint)pointForRow:(int)row column:(int)col;
|
||||
- (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
|
||||
numColumns:(int)nc;
|
||||
|
||||
//
|
||||
// NSTextView methods
|
||||
@@ -89,3 +99,5 @@ enum { MMMaxCellsPerChar = 2 };
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
|
||||
|
||||
@end
|
||||
|
||||
#endif // ENABLE_ATSUI
|
||||
|
||||
+232
-70
@@ -25,6 +25,8 @@
|
||||
* resized.
|
||||
*/
|
||||
|
||||
#if ENABLE_ATSUI
|
||||
|
||||
#import "MMAppController.h"
|
||||
#import "MMAtsuiTextView.h"
|
||||
#import "MMTextViewHelper.h"
|
||||
@@ -42,6 +44,7 @@
|
||||
#define DRAW_UNDERC 0x08 /* draw undercurl text */
|
||||
#define DRAW_ITALIC 0x10 /* draw italic text */
|
||||
#define DRAW_CURSOR 0x20
|
||||
#define DRAW_WIDE 0x40 /* draw wide text */
|
||||
|
||||
#define kUnderlineOffset (-2)
|
||||
#define kUnderlineHeight 1
|
||||
@@ -87,7 +90,7 @@
|
||||
column:(int)col2 color:(NSColor *)color;
|
||||
- (void)clearAll;
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(NSColor *)color;
|
||||
fraction:(int)percent;
|
||||
- (void)drawInvertedRectAtRow:(int)row column:(int)col numRows:(int)nrows
|
||||
numColumns:(int)ncols;
|
||||
@end
|
||||
@@ -139,13 +142,15 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
ASLogDebug(@"");
|
||||
|
||||
[self disposeAtsuStyles];
|
||||
[font release]; font = nil;
|
||||
[defaultBackgroundColor release]; defaultBackgroundColor = nil;
|
||||
[defaultForegroundColor release]; defaultForegroundColor = nil;
|
||||
|
||||
[helper setTextView:nil];
|
||||
[helper dealloc]; helper = nil;
|
||||
[helper release]; helper = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -155,6 +160,11 @@ defaultLineHeightForFont(NSFont *font)
|
||||
return maxRows;
|
||||
}
|
||||
|
||||
- (int)maxColumns
|
||||
{
|
||||
return maxColumns;
|
||||
}
|
||||
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols
|
||||
{
|
||||
if (rows) *rows = maxRows;
|
||||
@@ -176,15 +186,22 @@ defaultLineHeightForFont(NSFont *font)
|
||||
defaultBackgroundColor = bgColor ? [bgColor retain] : nil;
|
||||
}
|
||||
|
||||
// NOTE: The default foreground color isn't actually used for anything, but
|
||||
// other class instances might want to be able to access it so it is stored
|
||||
// here.
|
||||
if (defaultForegroundColor != fgColor) {
|
||||
[defaultForegroundColor release];
|
||||
defaultForegroundColor = fgColor ? [fgColor retain] : nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSColor *)defaultBackgroundColor
|
||||
{
|
||||
return defaultBackgroundColor;
|
||||
}
|
||||
|
||||
- (NSColor *)defaultForegroundColor
|
||||
{
|
||||
return defaultForegroundColor;
|
||||
}
|
||||
|
||||
- (void)setTextContainerInset:(NSSize)size
|
||||
{
|
||||
insetSize = size;
|
||||
@@ -247,6 +264,18 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (void)setWideFont:(NSFont *)newFont
|
||||
{
|
||||
if (!newFont) {
|
||||
if (font) [self setWideFont:font];
|
||||
} else if (newFont != fontWide) {
|
||||
float pointSize = [newFont pointSize];
|
||||
NSFontDescriptor *desc = [newFont fontDescriptor];
|
||||
NSDictionary *dictWide = [NSDictionary
|
||||
dictionaryWithObject:[NSNumber numberWithFloat:2*cellSize.width]
|
||||
forKey:NSFontFixedAdvanceAttribute];
|
||||
desc = [desc fontDescriptorByAddingAttributes:dictWide];
|
||||
fontWide = [NSFont fontWithDescriptor:desc size:pointSize];
|
||||
[fontWide retain];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSFont *)font
|
||||
@@ -254,6 +283,11 @@ defaultLineHeightForFont(NSFont *font)
|
||||
return font;
|
||||
}
|
||||
|
||||
- (NSFont *)fontWide
|
||||
{
|
||||
return fontWide;
|
||||
}
|
||||
|
||||
- (NSSize)cellSize
|
||||
{
|
||||
return cellSize;
|
||||
@@ -274,17 +308,13 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setPreEditRow:(int)row column:(int)col
|
||||
{
|
||||
}
|
||||
|
||||
- (void)hideMarkedTextField
|
||||
{
|
||||
[helper setPreEditRow:row column:col];
|
||||
}
|
||||
|
||||
- (void)setMouseShape:(int)shape
|
||||
@@ -297,8 +327,15 @@ defaultLineHeightForFont(NSFont *font)
|
||||
antialias = state;
|
||||
}
|
||||
|
||||
- (void)setImControl:(BOOL)enable
|
||||
{
|
||||
[helper setImControl:enable];
|
||||
}
|
||||
|
||||
|
||||
- (void)activateIm:(BOOL)enable
|
||||
{
|
||||
[helper activateIm:enable];
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent *)event
|
||||
{
|
||||
@@ -322,11 +359,32 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (BOOL)hasMarkedText
|
||||
{
|
||||
return NO;
|
||||
return [helper hasMarkedText];
|
||||
}
|
||||
|
||||
- (NSRange)markedRange
|
||||
{
|
||||
return [helper markedRange];
|
||||
}
|
||||
|
||||
- (NSDictionary *)markedTextAttributes
|
||||
{
|
||||
return [helper markedTextAttributes];
|
||||
}
|
||||
|
||||
- (void)setMarkedTextAttributes:(NSDictionary *)attr
|
||||
{
|
||||
[helper setMarkedTextAttributes:attr];
|
||||
}
|
||||
|
||||
- (void)setMarkedText:(id)text selectedRange:(NSRange)range
|
||||
{
|
||||
[helper setMarkedText:text selectedRange:range];
|
||||
}
|
||||
|
||||
- (void)unmarkText
|
||||
{
|
||||
[helper unmarkText];
|
||||
}
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)event
|
||||
@@ -457,19 +515,70 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
NSRect srcRect = NSMakeRect(0, 0, imageSize.width, imageSize.height);
|
||||
NSRect dstRect = srcRect;
|
||||
|
||||
dstRect.origin.x += insetSize.width;
|
||||
dstRect.origin.y += insetSize.height;
|
||||
|
||||
[defaultBackgroundColor set];
|
||||
NSRectFill(rect);
|
||||
|
||||
[contentImage drawInRect: dstRect
|
||||
fromRect: srcRect
|
||||
operation: NSCompositeCopy
|
||||
fraction: 1.0];
|
||||
NSPoint pt = { insetSize.width, insetSize.height };
|
||||
[contentImage compositeToPoint:pt operation:NSCompositeCopy];
|
||||
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
if ([self hasMarkedText] && ![helper useInlineIm]) {
|
||||
int len = [[helper markedText] length];
|
||||
int rows = 0;
|
||||
int cols = maxColumns - [helper preEditColumn];
|
||||
NSFont *theFont = [[self markedTextAttributes]
|
||||
valueForKey:NSFontAttributeName];
|
||||
if (theFont == [self fontWide])
|
||||
cols = cols / 2;
|
||||
int done = 0;
|
||||
int lend = cols > len ? len : cols;
|
||||
NSAttributedString *aString = [[helper markedText]
|
||||
attributedSubstringFromRange:NSMakeRange(done, lend)];
|
||||
NSPoint pt = [self pointForRow:[helper preEditRow]
|
||||
column:[helper preEditColumn]];
|
||||
[aString drawAtPoint:pt];
|
||||
done = lend;
|
||||
if (done != len) {
|
||||
int r;
|
||||
rows = (len - done) / (maxColumns / 2) + 1;
|
||||
for (r = 1; r <= rows; r++) {
|
||||
lend = len - done > maxColumns / 2
|
||||
? maxColumns / 2 : len - done;
|
||||
aString = [[helper markedText] attributedSubstringFromRange:
|
||||
NSMakeRange(done, lend)];
|
||||
NSPoint pt = [self pointForRow:[helper preEditRow]+r
|
||||
column:0];
|
||||
[aString drawAtPoint:pt];
|
||||
done += lend;
|
||||
}
|
||||
}
|
||||
|
||||
rows = maxRows - 1 - [helper preEditRow];
|
||||
cols = [helper preEditColumn];
|
||||
if (theFont == fontWide) {
|
||||
cols += ([helper imRange].location+[helper imRange].length) * 2;
|
||||
if (cols >= maxColumns - 1) {
|
||||
rows -= cols / maxColumns;
|
||||
cols = cols % 2 ? cols % maxColumns + 1 :
|
||||
cols % maxColumns;
|
||||
}
|
||||
} else {
|
||||
cols += ([helper imRange].location+[helper imRange].length);
|
||||
if (cols >= maxColumns) {
|
||||
rows -= cols / maxColumns;
|
||||
cols = cols % 2 ? cols % maxColumns + 1 :
|
||||
cols % maxColumns;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Could IM be in "right-left" mode? If so the insertion point
|
||||
// will be on the wrong side.
|
||||
[self drawInsertionPointAtRow:rows
|
||||
column:cols
|
||||
shape:MMInsertionPointVertical
|
||||
fraction:25];
|
||||
}
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
}
|
||||
|
||||
- (BOOL) wantsDefaultClipping
|
||||
@@ -489,7 +598,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
[self resizeContentImage];
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@"====> BEGIN %s", _cmd);
|
||||
ASLogDebug(@"====> BEGIN %s", _cmd);
|
||||
#endif
|
||||
[self beginDrawing];
|
||||
|
||||
@@ -500,7 +609,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
if (ClearAllDrawType == type) {
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Clear all");
|
||||
ASLogDebug(@" Clear all");
|
||||
#endif
|
||||
[self clearAll];
|
||||
} else if (ClearBlockDrawType == type) {
|
||||
@@ -511,8 +620,8 @@ defaultLineHeightForFont(NSFont *font)
|
||||
int col2 = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Clear block (%d,%d) -> (%d,%d)", row1, col1,
|
||||
row2,col2);
|
||||
ASLogDebug(@" Clear block (%d,%d) -> (%d,%d)", row1, col1,
|
||||
row2,col2);
|
||||
#endif
|
||||
[self clearBlockFromRow:row1 column:col1
|
||||
toRow:row2 column:col2
|
||||
@@ -526,7 +635,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
int right = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Delete %d line(s) from %d", count, row);
|
||||
ASLogDebug(@" Delete %d line(s) from %d", count, row);
|
||||
#endif
|
||||
[self deleteLinesFromRow:row lineCount:count
|
||||
scrollBottom:bot left:left right:right
|
||||
@@ -548,8 +657,8 @@ defaultLineHeightForFont(NSFont *font)
|
||||
freeWhenDone:NO];
|
||||
bytes += len;
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw string at (%d,%d) length=%d flags=%d fg=0x%x "
|
||||
"bg=0x%x sp=0x%x", row, col, len, flags, fg, bg, sp);
|
||||
ASLogDebug(@" Draw string at (%d,%d) length=%d flags=%d fg=0x%x "
|
||||
"bg=0x%x sp=0x%x", row, col, len, flags, fg, bg, sp);
|
||||
#endif
|
||||
unichar *characters = malloc(sizeof(unichar) * [string length]);
|
||||
[string getCharacters:characters];
|
||||
@@ -573,7 +682,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
int right = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Insert %d line(s) at row %d", count, row);
|
||||
ASLogDebug(@" Insert %d line(s) at row %d", count, row);
|
||||
#endif
|
||||
[self insertLinesAtRow:row lineCount:count
|
||||
scrollBottom:bot left:left right:right
|
||||
@@ -586,11 +695,11 @@ defaultLineHeightForFont(NSFont *font)
|
||||
int percent = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw cursor at (%d,%d)", row, col);
|
||||
ASLogDebug(@" Draw cursor at (%d,%d)", row, col);
|
||||
#endif
|
||||
[helper setInsertionPointColor:[NSColor colorWithRgbInt:color]];
|
||||
[self drawInsertionPointAtRow:row column:col shape:shape
|
||||
fraction:percent
|
||||
color:[NSColor colorWithRgbInt:color]];
|
||||
fraction:percent];
|
||||
} else if (DrawInvertedRectDrawType == type) {
|
||||
int row = *((int*)bytes); bytes += sizeof(int);
|
||||
int col = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -599,8 +708,8 @@ defaultLineHeightForFont(NSFont *font)
|
||||
/*int invert = *((int*)bytes);*/ bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw inverted rect: row=%d col=%d nrows=%d ncols=%d",
|
||||
row, col, nr, nc);
|
||||
ASLogDebug(@" Draw inverted rect: row=%d col=%d nrows=%d "
|
||||
"ncols=%d", row, col, nr, nc);
|
||||
#endif
|
||||
[self drawInvertedRectAtRow:row column:col numRows:nr
|
||||
numColumns:nc];
|
||||
@@ -610,19 +719,21 @@ defaultLineHeightForFont(NSFont *font)
|
||||
/*cursorRow = *((int*)bytes);*/ bytes += sizeof(int);
|
||||
/*cursorCol = *((int*)bytes);*/ bytes += sizeof(int);
|
||||
} else {
|
||||
NSLog(@"WARNING: Unknown draw type (type=%d)", type);
|
||||
ASLogWarn(@"Unknown draw type (type=%d)", type);
|
||||
}
|
||||
}
|
||||
|
||||
[self endDrawing];
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
[self setNeedsDisplay:YES];
|
||||
// [self displayIfNeeded];
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@"<==== END %s", _cmd);
|
||||
ASLogDebug(@"<==== END %s", _cmd);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -679,24 +790,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
NSFont *newFont = [sender convertFont:font];
|
||||
|
||||
if (newFont) {
|
||||
NSString *name = [newFont displayName];
|
||||
unsigned len = [name lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
if (len > 0) {
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
float pointSize = [newFont pointSize];
|
||||
|
||||
[data appendBytes:&pointSize length:sizeof(float)];
|
||||
|
||||
++len; // include NUL byte
|
||||
[data appendBytes:&len length:sizeof(unsigned)];
|
||||
[data appendBytes:[name UTF8String] length:len];
|
||||
|
||||
[[self vimController] sendMessage:SetFontMsgID data:data];
|
||||
}
|
||||
}
|
||||
[helper changeFont:sender];
|
||||
}
|
||||
|
||||
|
||||
@@ -750,12 +844,76 @@ defaultLineHeightForFont(NSFont *font)
|
||||
if (row) *row = floor((point.y-origin.y-1) / cellSize.height);
|
||||
if (column) *column = floor((point.x-origin.x-1) / cellSize.width);
|
||||
|
||||
//NSLog(@"convertPoint:%@ toRow:%d column:%d", NSStringFromPoint(point),
|
||||
// *row, *column);
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSPoint)pointForRow:(int)row column:(int)col
|
||||
{
|
||||
// Return the lower left coordinate of the cell at (row,column).
|
||||
NSPoint pt;
|
||||
|
||||
pt.x = insetSize.width + col*cellSize.width;
|
||||
pt.y = [self frame].size.height -
|
||||
(insetSize.height + (1+row)*cellSize.height);
|
||||
|
||||
return pt;
|
||||
}
|
||||
|
||||
- (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
|
||||
numColumns:(int)nc
|
||||
{
|
||||
// Return the rect for the block which covers the specified rows and
|
||||
// columns. The lower-left corner is the origin of this rect.
|
||||
NSRect rect;
|
||||
|
||||
rect.origin.x = insetSize.width + col*cellSize.width;
|
||||
rect.origin.y = [self frame].size.height -
|
||||
(insetSize.height + (nr+row)*cellSize.height);
|
||||
rect.size.width = nc*cellSize.width;
|
||||
rect.size.height = nr*cellSize.height;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (NSArray *)validAttributesForMarkedText
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)range
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSUInteger)characterIndexForPoint:(NSPoint)point
|
||||
{
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
// The return type of this message changed with OS X 10.5 so we need this
|
||||
// kludge in order to avoid compiler warnings on OS X 10.4.
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
|
||||
- (NSInteger)conversationIdentifier
|
||||
{
|
||||
return (NSInteger)self;
|
||||
}
|
||||
#else
|
||||
- (long)conversationIdentifier
|
||||
{
|
||||
return (long)self;
|
||||
}
|
||||
#endif
|
||||
|
||||
- (NSRange)selectedRange
|
||||
{
|
||||
return [helper imRange];
|
||||
}
|
||||
|
||||
- (NSRect)firstRectForCharacterRange:(NSRange)range
|
||||
{
|
||||
return [helper firstRectForCharacterRange:range];
|
||||
}
|
||||
|
||||
@end // MMAtsuiTextView
|
||||
|
||||
|
||||
@@ -869,7 +1027,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
- (NSRect)rectFromRow:(int)row1 column:(int)col1
|
||||
toRow:(int)row2 column:(int)col2
|
||||
{
|
||||
NSPoint origin = [self originForRow: row1 column: col1];
|
||||
NSPoint origin = [self originForRow:row1 column:col1];
|
||||
return NSMakeRect(origin.x, origin.y,
|
||||
(col2 + 1 - col1) * cellSize.width,
|
||||
(row2 + 1 - row1) * cellSize.height);
|
||||
@@ -884,10 +1042,9 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
- (void)resizeContentImage
|
||||
{
|
||||
//NSLog(@"resizeContentImage");
|
||||
[contentImage release];
|
||||
contentImage = [[NSImage alloc] initWithSize:[self textAreaSize]];
|
||||
[contentImage setFlipped: YES];
|
||||
[contentImage setFlipped:YES];
|
||||
imageSize = [self textAreaSize];
|
||||
}
|
||||
|
||||
@@ -942,8 +1099,6 @@ defaultLineHeightForFont(NSFont *font)
|
||||
ATSUSetAttributes(style, sizeof(attribValues) / sizeof(attribValues[0]),
|
||||
attribTags, attribSizes, attribValues);
|
||||
|
||||
// NSLog(@"drawString: %d", length);
|
||||
|
||||
ATSUCreateTextLayout(&layout);
|
||||
ATSUSetTextPointerLocation(layout, string,
|
||||
kATSUFromTextBeginning, kATSUToTextEnd,
|
||||
@@ -956,6 +1111,11 @@ defaultLineHeightForFont(NSFont *font)
|
||||
rect.size.width = rect.size.width * 2;
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
// Clip drawing to avoid text bleeding into adjacent display cells when
|
||||
// antialiasing is enabled.
|
||||
CGContextSaveGState(context);
|
||||
CGContextClipToRect(context, *(CGRect*)&rect);
|
||||
|
||||
ATSUAttributeTag tags[] = { kATSUCGContextTag };
|
||||
ByteCount sizes[] = { sizeof(CGContextRef) };
|
||||
ATSUAttributeValuePtr values[] = { &context };
|
||||
@@ -979,7 +1139,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
if (flags & DRAW_UNDERL)
|
||||
{
|
||||
[fg set];
|
||||
[sp set];
|
||||
NSRectFill(NSMakeRect(rect.origin.x,
|
||||
(row + 1) * cellSize.height + kUnderlineOffset,
|
||||
rect.size.width, kUnderlineHeight));
|
||||
@@ -1005,6 +1165,8 @@ defaultLineHeightForFont(NSFont *font)
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
@@ -1065,14 +1227,12 @@ defaultLineHeightForFont(NSFont *font)
|
||||
}
|
||||
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(NSColor *)color
|
||||
fraction:(int)percent
|
||||
{
|
||||
NSPoint origin = [self originForRow:row column:col];
|
||||
NSRect rect = NSMakeRect(origin.x, origin.y,
|
||||
cellSize.width, cellSize.height);
|
||||
|
||||
// NSLog(@"shape = %d, fraction: %d", shape, percent);
|
||||
|
||||
if (MMInsertionPointHorizontal == shape) {
|
||||
int frac = (cellSize.height * percent + 99)/100;
|
||||
rect.origin.y += rect.size.height - frac;
|
||||
@@ -1086,7 +1246,7 @@ defaultLineHeightForFont(NSFont *font)
|
||||
rect.size.width = frac;
|
||||
}
|
||||
|
||||
[color set];
|
||||
[[helper insertionPointColor] set];
|
||||
if (MMInsertionPointHollow == shape) {
|
||||
NSFrameRect(rect);
|
||||
} else {
|
||||
@@ -1111,3 +1271,5 @@ defaultLineHeightForFont(NSFont *font)
|
||||
}
|
||||
|
||||
@end // MMAtsuiTextView (Drawing)
|
||||
|
||||
#endif // ENABLE_ATSUI
|
||||
|
||||
+25
-15
@@ -21,18 +21,18 @@
|
||||
NSMutableArray *inputQueue;
|
||||
NSMutableData *drawData;
|
||||
NSConnection *connection;
|
||||
id frontendProxy;
|
||||
NSConnection *vimServerConnection;
|
||||
id appProxy;
|
||||
unsigned identifier;
|
||||
NSDictionary *colorDict;
|
||||
NSDictionary *sysColorDict;
|
||||
NSDictionary *actionDict;
|
||||
BOOL inputReceived;
|
||||
BOOL tabBarVisible;
|
||||
unsigned backgroundColor;
|
||||
unsigned foregroundColor;
|
||||
unsigned specialColor;
|
||||
unsigned defaultBackgroundColor;
|
||||
unsigned defaultForegroundColor;
|
||||
NSDate *lastFlushDate;
|
||||
id dialogReturn;
|
||||
NSTimer *blinkTimer;
|
||||
int blinkState;
|
||||
@@ -43,12 +43,16 @@
|
||||
NSMutableDictionary *clientProxyDict;
|
||||
NSMutableDictionary *serverReplyDict;
|
||||
NSString *alternateServerName;
|
||||
ATSFontContainerRef fontContainerRef;
|
||||
NSFont *oldWideFont;
|
||||
GuiFont oldWideFont;
|
||||
BOOL isTerminating;
|
||||
BOOL waitForAck;
|
||||
int initialWindowLayout;
|
||||
BOOL flushDisabled;
|
||||
unsigned numWholeLineChanges;
|
||||
unsigned offsetForDrawDataPrune;
|
||||
BOOL imState;
|
||||
CFSocketRef netbeansSocket;
|
||||
CFRunLoopSourceRef netbeansRunLoopSource;
|
||||
}
|
||||
|
||||
+ (MMBackend *)sharedInstance;
|
||||
@@ -69,8 +73,8 @@
|
||||
toRow:(int)row2 column:(int)col2;
|
||||
- (void)deleteLinesFromRow:(int)row count:(int)count
|
||||
scrollBottom:(int)bottom left:(int)left right:(int)right;
|
||||
- (void)drawString:(char*)s length:(int)len row:(int)row column:(int)col
|
||||
cells:(int)cells flags:(int)flags;
|
||||
- (void)drawString:(char_u*)s length:(int)len row:(int)row
|
||||
column:(int)col cells:(int)cells flags:(int)flags;
|
||||
- (void)insertLinesFromRow:(int)row count:(int)count
|
||||
scrollBottom:(int)bottom left:(int)left right:(int)right;
|
||||
- (void)drawCursorAtRow:(int)row column:(int)col shape:(int)shape
|
||||
@@ -91,14 +95,13 @@
|
||||
- (char *)browseForFileWithAttributes:(NSDictionary *)attr;
|
||||
- (int)showDialogWithAttributes:(NSDictionary *)attr textField:(char *)txtfield;
|
||||
- (void)showToolbar:(int)enable flags:(int)flags;
|
||||
- (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
|
||||
- (void)destroyScrollbarWithIdentifier:(long)ident;
|
||||
- (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
|
||||
- (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type;
|
||||
- (void)destroyScrollbarWithIdentifier:(int32_t)ident;
|
||||
- (void)showScrollbarWithIdentifier:(int32_t)ident state:(int)visible;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(int32_t)ident;
|
||||
- (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
|
||||
identifier:(long)ident;
|
||||
- (void)setFont:(NSFont *)font;
|
||||
- (void)setWideFont:(NSFont *)font;
|
||||
identifier:(int32_t)ident;
|
||||
- (void)setFont:(GuiFont)font wide:(BOOL)wide;
|
||||
- (void)executeActionWithName:(NSString *)name;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)setBlinkWait:(int)wait on:(int)on off:(int)off;
|
||||
@@ -109,10 +112,11 @@
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
|
||||
- (int)lookupColorWithKey:(NSString *)key;
|
||||
- (BOOL)hasSpecialKeyWithValue:(NSString *)value;
|
||||
- (BOOL)hasSpecialKeyWithValue:(char_u *)value;
|
||||
|
||||
- (void)enterFullscreen:(int)fuoptions background:(int)bg;
|
||||
- (void)leaveFullscreen;
|
||||
- (void)setFullscreenBackgroundColor:(int)color;
|
||||
|
||||
- (void)setAntialias:(BOOL)antialias;
|
||||
|
||||
@@ -131,6 +135,12 @@
|
||||
- (void)setWaitForAck:(BOOL)yn;
|
||||
- (void)waitForConnectionAcknowledgement;
|
||||
|
||||
- (BOOL)imState;
|
||||
- (void)setImState:(BOOL)activated;
|
||||
|
||||
- (void)messageFromNetbeans;
|
||||
- (void)setNetbeansSocket:(int)socket;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
+923
-604
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
/* vi:set ts=8 sts=4 sw=4 ft=objc:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
* MacVim GUI port by Bjorn Winckler
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@class MMTextViewHelper;
|
||||
|
||||
|
||||
@interface MMCoreTextView : NSView <NSTextInput> {
|
||||
// From MMTextStorage
|
||||
int maxRows, maxColumns;
|
||||
NSColor *defaultBackgroundColor;
|
||||
NSColor *defaultForegroundColor;
|
||||
NSSize cellSize;
|
||||
NSFont *font;
|
||||
float linespace;
|
||||
|
||||
// From NSTextView
|
||||
NSSize insetSize;
|
||||
|
||||
float fontDescent;
|
||||
BOOL antialias;
|
||||
NSMutableArray *drawData;
|
||||
|
||||
MMTextViewHelper *helper;
|
||||
|
||||
unsigned maxlen;
|
||||
CGGlyph *glyphs;
|
||||
CGSize *advances;
|
||||
|
||||
NSRect lastClearRect;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame;
|
||||
|
||||
//
|
||||
// MMTextStorage methods
|
||||
//
|
||||
- (int)maxRows;
|
||||
- (int)maxColumns;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
- (void)setMaxRows:(int)rows columns:(int)cols;
|
||||
- (void)setDefaultColorsBackground:(NSColor *)bgColor
|
||||
foreground:(NSColor *)fgColor;
|
||||
- (NSColor *)defaultBackgroundColor;
|
||||
- (NSColor *)defaultForegroundColor;
|
||||
- (NSRect)rectForRowsInRange:(NSRange)range;
|
||||
- (NSRect)rectForColumnsInRange:(NSRange)range;
|
||||
|
||||
- (void)setFont:(NSFont *)newFont;
|
||||
- (void)setWideFont:(NSFont *)newFont;
|
||||
- (NSFont *)font;
|
||||
- (NSFont *)fontWide;
|
||||
- (NSSize)cellSize;
|
||||
- (void)setLinespace:(float)newLinespace;
|
||||
|
||||
//
|
||||
// MMTextView methods
|
||||
//
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on;
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)setAntialias:(BOOL)state;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
|
||||
//
|
||||
// NSTextView methods
|
||||
//
|
||||
- (void)keyDown:(NSEvent *)event;
|
||||
- (void)insertText:(id)string;
|
||||
- (void)doCommandBySelector:(SEL)selector;
|
||||
- (BOOL)performKeyEquivalent:(NSEvent *)event;
|
||||
|
||||
//
|
||||
// NSTextContainer methods
|
||||
//
|
||||
- (void)setTextContainerInset:(NSSize)inset;
|
||||
|
||||
//
|
||||
// MMCoreTextView methods
|
||||
//
|
||||
- (void)performBatchDrawWithData:(NSData *)data;
|
||||
- (NSSize)desiredSize;
|
||||
- (NSSize)minSize;
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
/* vi:set ts=8 sts=4 sw=4 ft=objc:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
* MacVim GUI port by Bjorn Winckler
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
|
||||
@interface MMFindReplaceController : NSWindowController {
|
||||
IBOutlet NSTextField *findBox;
|
||||
IBOutlet NSTextField *replaceBox;
|
||||
IBOutlet NSButton *ignoreCaseButton;
|
||||
IBOutlet NSButton *matchWordButton;
|
||||
}
|
||||
|
||||
+ (MMFindReplaceController *)sharedInstance;
|
||||
|
||||
- (void)showWithText:(NSString *)text flags:(int)flags;
|
||||
- (NSString *)findString;
|
||||
- (NSString *)replaceString;
|
||||
- (BOOL)ignoreCase;
|
||||
- (BOOL)matchWord;
|
||||
@end
|
||||
@@ -0,0 +1,63 @@
|
||||
/* vi:set ts=8 sts=4 sw=4 ft=objc:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
* MacVim GUI port by Bjorn Winckler
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import "MMFindReplaceController.h"
|
||||
|
||||
|
||||
@implementation MMFindReplaceController
|
||||
|
||||
+ (MMFindReplaceController *)sharedInstance
|
||||
{
|
||||
static MMFindReplaceController *singleton = nil;
|
||||
if (!singleton) {
|
||||
singleton = [[MMFindReplaceController alloc]
|
||||
initWithWindowNibName:@"FindAndReplace"];
|
||||
[singleton setWindowFrameAutosaveName:@"FindAndReplace"];
|
||||
}
|
||||
|
||||
return singleton;
|
||||
}
|
||||
|
||||
- (void)showWithText:(NSString *)text flags:(int)flags
|
||||
{
|
||||
// Ensure that the window has been loaded by calling this first.
|
||||
NSWindow *window = [self window];
|
||||
|
||||
if (text && [text length] > 0)
|
||||
[findBox setStringValue:text];
|
||||
|
||||
// NOTE: The 'flags' values must match the FRD_ defines in gui.h.
|
||||
[matchWordButton setState:(flags & 0x08 ? NSOnState : NSOffState)];
|
||||
[ignoreCaseButton setState:(flags & 0x10 ? NSOffState : NSOnState)];
|
||||
|
||||
[window makeKeyAndOrderFront:self];
|
||||
}
|
||||
|
||||
- (NSString *)findString
|
||||
{
|
||||
return [findBox stringValue];
|
||||
}
|
||||
|
||||
- (NSString *)replaceString
|
||||
{
|
||||
return [replaceBox stringValue];
|
||||
}
|
||||
|
||||
- (BOOL)ignoreCase
|
||||
{
|
||||
return [ignoreCaseButton state] == NSOnState;
|
||||
}
|
||||
|
||||
- (BOOL)matchWord
|
||||
{
|
||||
return [matchWordButton state] == NSOnState;
|
||||
}
|
||||
|
||||
@end // MMFindReplaceController
|
||||
@@ -30,7 +30,7 @@
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <PSMTabBarControl.h>
|
||||
#import <PSMTabBarControl/PSMTabBarControl.h>
|
||||
|
||||
// These have to be the same as in option.h
|
||||
#define FUOPT_MAXVERT 0x001
|
||||
@@ -38,12 +38,10 @@
|
||||
#define FUOPT_BGCOLOR_HLGROUP 0x004
|
||||
|
||||
|
||||
static int numFullscreenWindows = 0;
|
||||
|
||||
@interface MMFullscreenWindow (Private)
|
||||
- (BOOL)isOnPrimaryScreen;
|
||||
- (void)hideDockIfAppropriate;
|
||||
- (void)revealDockIfAppropriate;
|
||||
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification;
|
||||
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification;
|
||||
@end
|
||||
|
||||
@implementation MMFullscreenWindow
|
||||
@@ -79,12 +77,26 @@ static int numFullscreenWindows = 0;
|
||||
[self setBackgroundColor:back];
|
||||
[self setReleasedWhenClosed:NO];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(handleWindowDidBecomeMainNotification:)
|
||||
name:NSWindowDidBecomeMainNotification
|
||||
object:self];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(handleWindowDidResignMainNotification:)
|
||||
name:NSWindowDidResignMainNotification
|
||||
object:self];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
ASLogDebug(@"");
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[target release]; target = nil;
|
||||
[view release]; view = nil;
|
||||
@@ -94,8 +106,6 @@ static int numFullscreenWindows = 0;
|
||||
|
||||
- (void)enterFullscreen:(int)fuoptions
|
||||
{
|
||||
[self hideDockIfAppropriate];
|
||||
|
||||
// fade to black
|
||||
Boolean didBlend = NO;
|
||||
CGDisplayFadeReservationToken token;
|
||||
@@ -139,8 +149,10 @@ static int numFullscreenWindows = 0;
|
||||
|
||||
int fuRows = currRows, fuColumns = currColumns;
|
||||
|
||||
// NOTE: Do not use [NSScreen visibleFrame] when determining the screen
|
||||
// size since it compensates for menu and dock.
|
||||
int maxRows, maxColumns;
|
||||
NSSize size = [[self screen] visibleFrame].size;
|
||||
NSSize size = [[self screen] frame].size;
|
||||
[view constrainRows:&maxRows columns:&maxColumns toSize:size];
|
||||
|
||||
// Store current pre-fu vim size
|
||||
@@ -157,12 +169,30 @@ static int numFullscreenWindows = 0;
|
||||
|
||||
// if necessary, resize vim to target fu size
|
||||
if (currRows != fuRows || currColumns != fuColumns) {
|
||||
int newSize[2] = { fuRows, fuColumns };
|
||||
NSData *data = [NSData dataWithBytes:newSize length:2*sizeof(int)];
|
||||
|
||||
// The size sent here is queued and sent to vim when it's in
|
||||
// event processing mode again. Make sure to only send the values we
|
||||
// care about, as they override any changes that were made to 'lines'
|
||||
// and 'columns' after 'fu' was set but before the event loop is run.
|
||||
NSData *data = nil;
|
||||
int msgid = 0;
|
||||
if (currRows != fuRows && currColumns != fuColumns) {
|
||||
int newSize[2] = { fuRows, fuColumns };
|
||||
data = [NSData dataWithBytes:newSize length:2*sizeof(int)];
|
||||
msgid = SetTextDimensionsMsgID;
|
||||
} else if (currRows != fuRows) {
|
||||
data = [NSData dataWithBytes:&fuRows length:sizeof(int)];
|
||||
msgid = SetTextRowsMsgID;
|
||||
} else if (currColumns != fuColumns) {
|
||||
data = [NSData dataWithBytes:&fuColumns length:sizeof(int)];
|
||||
msgid = SetTextColumnsMsgID;
|
||||
}
|
||||
NSParameterAssert(data != nil && msgid != 0);
|
||||
|
||||
MMVimController *vimController =
|
||||
[[self windowController] vimController];
|
||||
|
||||
[vimController sendMessage:SetTextDimensionsMsgID data:data];
|
||||
[vimController sendMessage:msgid data:data];
|
||||
[[view textView] setMaxRows:fuRows columns:fuColumns];
|
||||
}
|
||||
|
||||
@@ -259,8 +289,6 @@ static int numFullscreenWindows = 0;
|
||||
CGReleaseDisplayFadeReservation(token);
|
||||
}
|
||||
|
||||
[self revealDockIfAppropriate];
|
||||
|
||||
[self autorelease]; // Balance the above retain
|
||||
}
|
||||
|
||||
@@ -280,10 +308,13 @@ static int numFullscreenWindows = 0;
|
||||
- (void)centerView
|
||||
{
|
||||
NSRect outer = [self frame], inner = [view frame];
|
||||
//NSLog(@"%s %@%@", _cmd, NSStringFromRect(outer), NSStringFromRect(inner));
|
||||
|
||||
NSPoint origin = NSMakePoint((outer.size.width - inner.size.width)/2,
|
||||
(outer.size.height - inner.size.height)/2);
|
||||
|
||||
// NOTE! Make sure the origin coordinates are integral or very strange
|
||||
// rendering issues may arise (screen looks blurry, each redraw clears the
|
||||
// entire window, etc.).
|
||||
NSPoint origin = { floor((outer.size.width - inner.size.width)/2),
|
||||
floor((outer.size.height - inner.size.height)/2) };
|
||||
|
||||
[view setFrameOrigin:origin];
|
||||
}
|
||||
|
||||
@@ -329,38 +360,29 @@ static int numFullscreenWindows = 0;
|
||||
return [self screen] == [screens objectAtIndex:0];
|
||||
}
|
||||
|
||||
- (void)hideDockIfAppropriate
|
||||
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification
|
||||
{
|
||||
// Hide menu and dock, both appear on demand.
|
||||
//
|
||||
// Don't hide the dock if going fullscreen on a non-primary screen. Also,
|
||||
// if there are several fullscreen windows on the primary screen, only
|
||||
// hide dock and friends for the first fullscreen window (and display
|
||||
// them again after the last fullscreen window has been closed).
|
||||
//
|
||||
// Another way to deal with several fullscreen windows would be to hide/
|
||||
// reveal the dock each time a fullscreen window gets/loses focus, but
|
||||
// this way it's less distracting.
|
||||
// reveal the dock only when the first fullscreen window is created and
|
||||
// show it again after the last one has been closed, but toggling on each
|
||||
// focus gain/loss works better with Spaces. The downside is that the
|
||||
// menu bar flashes shortly when switching between two fullscreen windows.
|
||||
|
||||
// XXX: If you have a fullscreen window on a secondary monitor and unplug
|
||||
// the monitor, this will probably not work right.
|
||||
|
||||
if ([self isOnPrimaryScreen]) {
|
||||
if (numFullscreenWindows == 0) {
|
||||
SetSystemUIMode(kUIModeAllSuppressed, 0); //requires 10.3
|
||||
}
|
||||
++numFullscreenWindows;
|
||||
SetSystemUIMode(kUIModeAllSuppressed, 0); //requires 10.3
|
||||
}
|
||||
}
|
||||
|
||||
- (void)revealDockIfAppropriate
|
||||
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification
|
||||
{
|
||||
// order menu and dock back in
|
||||
// order menu and dock back in
|
||||
if ([self isOnPrimaryScreen]) {
|
||||
--numFullscreenWindows;
|
||||
if (numFullscreenWindows == 0) {
|
||||
SetSystemUIMode(kUIModeNormal, 0);
|
||||
}
|
||||
SetSystemUIMode(kUIModeNormal, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ static MMPlugInManager *plugInManager = nil;
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
ASLogDebug(@"");
|
||||
|
||||
[plugInClasses release]; plugInClasses = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -123,13 +125,13 @@ static MMPlugInManager *plugInManager = nil;
|
||||
if(currPrincipalClass && [self plugInClassIsValid:currPrincipalClass]) {
|
||||
if ([currPrincipalClass initializePlugIn:
|
||||
[MMPlugInAppMediator sharedAppMediator]]) {
|
||||
//NSLog(@"Plug-in initialized: %@", currPath);
|
||||
ASLogInfo(@"Plug-in initialized: %@", currPath);
|
||||
[plugInClasses addObject:currPrincipalClass];
|
||||
} else {
|
||||
NSLog(@"Plug-in failed to initialize: %@", currPath);
|
||||
ASLogErr(@"Plug-in failed to initialize: %@", currPath);
|
||||
}
|
||||
} else {
|
||||
NSLog(@"Plug-in did not conform to protocol: %@", currPath);
|
||||
ASLogErr(@"Plug-in did not conform to protocol: %@", currPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,12 @@ static void loadSymbols()
|
||||
}
|
||||
|
||||
|
||||
static CFStringRef ODBEDITOR = CFSTR("org.slashpunt.edit_in_odbeditor");
|
||||
static CFStringRef ODB_BUNDLE_IDENTIFIER = CFSTR("ODBEditorBundleIdentifier");
|
||||
static CFStringRef ODB_EDITOR_NAME = CFSTR("ODBEditorName");
|
||||
// The compiler on OS X 10.4 balks at using CFSTR() for globals so we get
|
||||
// around with this some ugly type casting.
|
||||
static CFStringRef ODBEDITOR = (CFStringRef)@"org.slashpunt.edit_in_odbeditor";
|
||||
static CFStringRef ODB_BUNDLE_IDENTIFIER =
|
||||
(CFStringRef)@"ODBEditorBundleIdentifier";
|
||||
static CFStringRef ODB_EDITOR_NAME = (CFStringRef)@"ODBEditorName";
|
||||
static NSString *ODBEDITOR_DIR =
|
||||
@"/Library/InputManagers/Edit in ODBEditor";
|
||||
static NSString *ODBEDITOR_PATH =
|
||||
@@ -112,6 +115,8 @@ NSString *kOdbEditorIdentifierWriteRoom = @"com.hogbaysoftware.WriteRoom";
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
ASLogDebug(@"");
|
||||
|
||||
[supportedOdbEditors release]; supportedOdbEditors = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -222,7 +227,7 @@ NSString *kOdbEditorIdentifierWriteRoom = @"com.hogbaysoftware.WriteRoom";
|
||||
// user changes settings in terminal, the changes are reflected in the
|
||||
// dialog)
|
||||
|
||||
NSString *versionString;
|
||||
NSString *versionString = @"";
|
||||
|
||||
// Check if ODB path exists before calling isFilePackageAtPath: otherwise
|
||||
// an error is output to stderr on Tiger.
|
||||
@@ -380,7 +385,7 @@ NSString *kOdbEditorIdentifierWriteRoom = @"com.hogbaysoftware.WriteRoom";
|
||||
[self setOdbEditorByName:kOdbEditorNameMacVim];
|
||||
}
|
||||
} else {
|
||||
NSLog(@"Failed to install input manager, error is %d", err);
|
||||
ASLogErr(@"Failed to install input manager, error is %d", err);
|
||||
}
|
||||
[au release];
|
||||
|
||||
@@ -399,7 +404,7 @@ NSString *kOdbEditorIdentifierWriteRoom = @"com.hogbaysoftware.WriteRoom";
|
||||
initWithCommands:cmd];
|
||||
OSStatus err = [au run];
|
||||
if (err != errAuthorizationSuccess)
|
||||
NSLog(@"Failed to uninstall input manager, error is %d", err);
|
||||
ASLogErr(@"Failed to uninstall input manager, error is %d", err);
|
||||
[au release];
|
||||
|
||||
[self updateIntegrationPane];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MacVim.h"
|
||||
|
||||
|
||||
#define MM_USE_ROW_CACHE 1
|
||||
@@ -48,10 +48,8 @@ typedef struct {
|
||||
}
|
||||
|
||||
- (NSString *)string;
|
||||
- (NSDictionary *)attributesAtIndex:(unsigned)index
|
||||
- (NSDictionary *)attributesAtIndex:(NSUInteger)index
|
||||
effectiveRange:(NSRangePointer)aRange;
|
||||
- (id)attribute:(NSString *)attrib atIndex:(unsigned)index
|
||||
effectiveRange:(NSRangePointer)range;
|
||||
- (void)replaceCharactersInRange:(NSRange)aRange
|
||||
withString:(NSString *)aString;
|
||||
- (void)setAttributes:(NSDictionary *)attributes range:(NSRange)aRange;
|
||||
@@ -89,7 +87,7 @@ typedef struct {
|
||||
- (NSSize)cellSize;
|
||||
- (NSRect)rectForRowsInRange:(NSRange)range;
|
||||
- (NSRect)rectForColumnsInRange:(NSRange)range;
|
||||
- (unsigned)characterIndexForRow:(int)row column:(int)col;
|
||||
- (NSUInteger)characterIndexForRow:(int)row column:(int)col;
|
||||
- (BOOL)resizeToFitSize:(NSSize)size;
|
||||
- (NSSize)fitToSize:(NSSize)size;
|
||||
- (NSSize)fitToSize:(NSSize)size rows:(int *)rows columns:(int *)columns;
|
||||
|
||||
+53
-62
@@ -51,6 +51,7 @@
|
||||
#define DRAW_UNDERC 0x08 /* draw undercurl text */
|
||||
#define DRAW_ITALIC 0x10 /* draw italic text */
|
||||
#define DRAW_CURSOR 0x20
|
||||
#define DRAW_WIDE 0x40 /* draw wide text */
|
||||
|
||||
|
||||
static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
@@ -84,7 +85,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
ASLogDebug(@"");
|
||||
|
||||
#if MM_USE_ROW_CACHE
|
||||
if (rowCache) {
|
||||
@@ -112,38 +113,23 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return [attribString string];
|
||||
}
|
||||
|
||||
- (NSDictionary *)attributesAtIndex:(unsigned)index
|
||||
- (NSDictionary *)attributesAtIndex:(NSUInteger)index
|
||||
effectiveRange:(NSRangePointer)range
|
||||
{
|
||||
if (index >= [attribString length]) {
|
||||
if (range)
|
||||
*range = NSMakeRange(NSNotFound, 0);
|
||||
|
||||
return [NSDictionary dictionary];
|
||||
}
|
||||
|
||||
return [attribString attributesAtIndex:index effectiveRange:range];
|
||||
}
|
||||
|
||||
- (id)attribute:(NSString *)attrib atIndex:(unsigned)index
|
||||
effectiveRange:(NSRangePointer)range
|
||||
{
|
||||
return [attribString attribute:attrib atIndex:index effectiveRange:range];
|
||||
}
|
||||
|
||||
- (void)replaceCharactersInRange:(NSRange)range
|
||||
withString:(NSString *)string
|
||||
{
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"WARNING: calling %s on MMTextStorage is unsupported", _cmd);
|
||||
ASLogWarn(@"Calling %s on MMTextStorage is unsupported", _cmd);
|
||||
#endif
|
||||
//[attribString replaceCharactersInRange:range withString:string];
|
||||
}
|
||||
|
||||
- (void)setAttributes:(NSDictionary *)attributes range:(NSRange)range
|
||||
{
|
||||
//NSLog(@"%s%@", _cmd, NSStringFromRange(range));
|
||||
|
||||
// NOTE! This method must be implemented since the text system calls it
|
||||
// constantly to 'fix attributes', apply font substitution, etc.
|
||||
#if 0
|
||||
@@ -185,7 +171,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
[attribString setAttributes:newAttr range:range];
|
||||
} else {
|
||||
//NSLog(@"NOT fixing font attribute!");
|
||||
[attribString setAttributes:attributes range:range];
|
||||
}
|
||||
#endif
|
||||
@@ -220,7 +205,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
{
|
||||
NSLayoutManager *lm = [[self layoutManagers] objectAtIndex:0];
|
||||
if (!lm) {
|
||||
NSLog(@"WARNING: No layout manager available in call to %s", _cmd);
|
||||
ASLogWarn(@"No layout manager available");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,9 +238,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
foregroundColor:(NSColor *)fg backgroundColor:(NSColor *)bg
|
||||
specialColor:(NSColor *)sp
|
||||
{
|
||||
//NSLog(@"replaceString:atRow:%d column:%d withFlags:%d "
|
||||
// "foreground:%@ background:%@ special:%@",
|
||||
// row, col, flags, fg, bg, sp);
|
||||
[self lazyResize:NO];
|
||||
|
||||
if (row < 0 || row >= maxRows || col < 0 || col >= maxColumns
|
||||
@@ -278,7 +260,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
NSRange range = [self charRangeForRow:row column:&acol cells:&acells];
|
||||
if (NSNotFound == range.location) {
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -332,7 +314,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
[attribString replaceCharactersInRange:range withString:string];
|
||||
[attribString setAttributes:attributes range:r];
|
||||
|
||||
unsigned changeInLength = [string length] - range.length;
|
||||
NSInteger changeInLength = [string length] - range.length;
|
||||
if (acells != cells || acol != col) {
|
||||
if (acells == cells + 1) {
|
||||
// NOTE: A normal width character replaced a double width
|
||||
@@ -344,13 +326,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
++changeInLength;
|
||||
#if 0
|
||||
} else if (acol == col - 1) {
|
||||
NSLog(@"acol == col - 1");
|
||||
[attribString replaceCharactersInRange:NSMakeRange(r.location,0)
|
||||
withAttributedString:[emptyRowString
|
||||
attributedSubstringFromRange:NSMakeRange(0,1)]];
|
||||
++changeInLength;
|
||||
} else if (acol == col + 1) {
|
||||
NSLog(@"acol == col + 1");
|
||||
[attribString replaceCharactersInRange:NSMakeRange(r.location-1,1)
|
||||
withAttributedString:[emptyRowString
|
||||
attributedSubstringFromRange:NSMakeRange(0,2)]];
|
||||
@@ -360,8 +340,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
// NOTE: It seems that this never gets called. If it ever does,
|
||||
// then there is another case to treat.
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"row=%d col=%d acol=%d cells=%d acells=%d", row, col, acol,
|
||||
cells, acells);
|
||||
ASLogWarn(@"row=%d col=%d acol=%d cells=%d acells=%d", row, col,
|
||||
acol, cells, acells);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -371,6 +351,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
[self fixInvalidCharactersInRange:r];
|
||||
|
||||
#if 0
|
||||
ASLogDebug(@"length=%d row=%d col=%d cells=%d replaceRange=%@ change=%d",
|
||||
[string length], row, col, cells,
|
||||
NSStringFromRange(r), changeInLength);
|
||||
#endif
|
||||
[self edited:(NSTextStorageEditedCharacters|NSTextStorageEditedAttributes)
|
||||
range:range changeInLength:changeInLength];
|
||||
|
||||
@@ -387,7 +372,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
scrollBottom:(int)bottom left:(int)left right:(int)right
|
||||
color:(NSColor *)color
|
||||
{
|
||||
//NSLog(@"deleteLinesFromRow:%d lineCount:%d color:%@", row, count, color);
|
||||
[self lazyResize:NO];
|
||||
|
||||
if (row < 0 || row+count > maxRows || bottom > maxRows || left < 0
|
||||
@@ -407,7 +391,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
destRange = [self charRangeForRow:destRow column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
|
||||
acol = left; acells = width;
|
||||
@@ -415,13 +399,13 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
|
||||
if (NSNotFound == destRange.location || NSNotFound == srcRange.location)
|
||||
{
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -453,11 +437,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
destRange = [self charRangeForRow:destRow column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
if (NSNotFound == destRange.location) {
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -485,7 +469,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
scrollBottom:(int)bottom left:(int)left right:(int)right
|
||||
color:(NSColor *)color
|
||||
{
|
||||
//NSLog(@"insertLinesAtRow:%d lineCount:%d color:%@", row, count, color);
|
||||
[self lazyResize:NO];
|
||||
|
||||
if (row < 0 || row+count > maxRows || bottom > maxRows || left < 0
|
||||
@@ -506,19 +489,19 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
destRange = [self charRangeForRow:destRow column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
|
||||
acol = left; acells = width;
|
||||
srcRange = [self charRangeForRow:srcRow column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
if (NSNotFound == destRange.location || NSNotFound == srcRange.location)
|
||||
{
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -549,11 +532,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
destRange = [self charRangeForRow:destRow column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != width || acol != left)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
if (NSNotFound == destRange.location) {
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -576,8 +559,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
- (void)clearBlockFromRow:(int)row1 column:(int)col1 toRow:(int)row2
|
||||
column:(int)col2 color:(NSColor *)color
|
||||
{
|
||||
//NSLog(@"clearBlockFromRow:%d column:%d toRow:%d column:%d color:%@",
|
||||
// row1, col1, row2, col2, color);
|
||||
[self lazyResize:NO];
|
||||
|
||||
if (row1 < 0 || row2 >= maxRows || col1 < 0 || col2 > maxColumns)
|
||||
@@ -598,11 +579,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
range = [self charRangeForRow:r column:&acol cells:&acells];
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
if (acells != cells || acol != col1)
|
||||
NSLog(@"INTERNAL ERROR [%s]", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR");
|
||||
#endif
|
||||
if (NSNotFound == range.location) {
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"INTERNAL ERROR [%s] Out of bounds", _cmd);
|
||||
ASLogErr(@"INTERNAL ERROR: Out of bounds");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -624,7 +605,6 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
- (void)clearAll
|
||||
{
|
||||
//NSLog(@"%s", _cmd);
|
||||
[self lazyResize:YES];
|
||||
}
|
||||
|
||||
@@ -683,7 +663,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
cellSize.height = linespace + [lm defaultLineHeightForFont:font];
|
||||
} else {
|
||||
// Should never happen, set some bogus value for cell height.
|
||||
NSLog(@"WARNING: No layout manager available in call to %s", _cmd);
|
||||
ASLogWarn(@"No layout manager available");
|
||||
cellSize.height = linespace + 16.0;
|
||||
}
|
||||
|
||||
@@ -790,7 +770,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
- (NSRect)rectForRowsInRange:(NSRange)range
|
||||
{
|
||||
NSRect rect = { 0, 0, 0, 0 };
|
||||
NSRect rect = { {0, 0}, {0, 0} };
|
||||
unsigned start = range.location > maxRows ? maxRows : range.location;
|
||||
unsigned length = range.length;
|
||||
|
||||
@@ -805,7 +785,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
- (NSRect)rectForColumnsInRange:(NSRange)range
|
||||
{
|
||||
NSRect rect = { 0, 0, 0, 0 };
|
||||
NSRect rect = { {0, 0}, {0, 0} };
|
||||
unsigned start = range.location > maxColumns ? maxColumns : range.location;
|
||||
unsigned length = range.length;
|
||||
|
||||
@@ -818,7 +798,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (unsigned)characterIndexForRow:(int)row column:(int)col
|
||||
- (NSUInteger)characterIndexForRow:(int)row column:(int)col
|
||||
{
|
||||
int cells = 1;
|
||||
NSRange range = [self charRangeForRow:row column:&col cells:&cells];
|
||||
@@ -1009,15 +989,16 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return NSMakeRange(row*(actualColumns+1) + col, cells);
|
||||
|
||||
NSString *string = [attribString string];
|
||||
unsigned stringLen = [string length];
|
||||
NSRange r, range = { NSNotFound, 0 };
|
||||
unsigned idx, rowEnd;
|
||||
unsigned idx;
|
||||
int i;
|
||||
|
||||
if (row < 0 || row >= actualRows || col < 0 || col >= actualColumns
|
||||
|| col+cells > actualColumns) {
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
NSLog(@"%s row=%d col=%d cells=%d is out of range (length=%d)",
|
||||
_cmd, row, col, cells, [string length]);
|
||||
ASLogErr(@"row=%d col=%d cells=%d is out of range (length=%d)",
|
||||
row, col, cells, stringLen);
|
||||
#endif
|
||||
return range;
|
||||
}
|
||||
@@ -1029,12 +1010,12 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
for (i = 0; i < row; ++i, ++cache)
|
||||
idx += cache->length;
|
||||
|
||||
rowEnd = idx + cache->length;
|
||||
int rowEnd = idx + cache->length;
|
||||
#else
|
||||
// Locate the beginning of the row by scanning for EOL characters.
|
||||
r.location = 0;
|
||||
for (i = 0; i < row; ++i) {
|
||||
r.length = [string length] - r.location;
|
||||
r.length = stringLen - r.location;
|
||||
r = [string rangeOfString:@"\n" options:NSLiteralSearch range:r];
|
||||
if (NSNotFound == r.location)
|
||||
return range;
|
||||
@@ -1070,6 +1051,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
if (col > i) {
|
||||
// Forward search
|
||||
while (col > i) {
|
||||
if (idx >= stringLen)
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
@@ -1084,6 +1067,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
} else if (col < i) {
|
||||
// Backward search
|
||||
while (col < i) {
|
||||
if (idx-1 >= stringLen)
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx-1];
|
||||
idx -= r.length;
|
||||
--i;
|
||||
@@ -1111,6 +1096,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
|
||||
// Forward search
|
||||
while (col > i) {
|
||||
if (idx >= stringLen)
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
@@ -1131,6 +1118,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
#else
|
||||
idx = r.location;
|
||||
for (i = 0; i < col; ++i) {
|
||||
if (idx >= stringLen)
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
@@ -1146,6 +1135,8 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
// Count the number of characters that cover the cells.
|
||||
range.location = idx;
|
||||
for (i = 0; i < cells; ++i) {
|
||||
if (idx >= stringLen)
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
@@ -1163,20 +1154,20 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
#if MM_TS_PARANOIA_LOG
|
||||
#if MM_USE_ROW_CACHE
|
||||
if (range.location >= rowEnd-1) {
|
||||
NSLog(@"INTERNAL ERROR [%s] : row=%d col=%d cells=%d --> range=%@",
|
||||
_cmd, row, col, cells, NSStringFromRange(range));
|
||||
ASLogErr(@"INTERNAL ERROR: row=%d col=%d cells=%d --> range=%@",
|
||||
row, col, cells, NSStringFromRange(range));
|
||||
range.location = rowEnd - 2;
|
||||
range.length = 1;
|
||||
} else if (NSMaxRange(range) >= rowEnd) {
|
||||
NSLog(@"INTERNAL ERROR [%s] : row=%d col=%d cells=%d --> range=%@",
|
||||
_cmd, row, col, cells, NSStringFromRange(range));
|
||||
ASLogErr(@"INTERNAL ERROR: row=%d col=%d cells=%d --> range=%@",
|
||||
row, col, cells, NSStringFromRange(range));
|
||||
range.length = rowEnd - range.location - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (NSMaxRange(range) > [string length]) {
|
||||
NSLog(@"INTERNAL ERROR [%s] : row=%d col=%d cells=%d --> range=%@",
|
||||
_cmd, row, col, cells, NSStringFromRange(range));
|
||||
if (NSMaxRange(range) > stringLen) {
|
||||
ASLogErr(@"INTERNAL ERROR: row=%d col=%d cells=%d --> range=%@",
|
||||
row, col, cells, NSStringFromRange(range));
|
||||
range.location = NSNotFound;
|
||||
range.length = 0;
|
||||
}
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
int insertionPointColumn;
|
||||
int insertionPointShape;
|
||||
int insertionPointFraction;
|
||||
NSRange imRange;
|
||||
NSRange markedRange;
|
||||
NSDictionary *markedTextAttributes;
|
||||
NSMutableAttributedString *markedText;
|
||||
int preEditRow;
|
||||
int preEditColumn;
|
||||
BOOL antialias;
|
||||
NSRect *invertRects;
|
||||
int numInvertRects;
|
||||
@@ -34,27 +28,32 @@
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame;
|
||||
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on;
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
- (void)performBatchDrawWithData:(NSData *)data;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)setAntialias:(BOOL)antialias;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
|
||||
//
|
||||
// MMTextStorage methods
|
||||
//
|
||||
- (NSFont *)font;
|
||||
- (void)setFont:(NSFont *)newFont;
|
||||
- (NSFont *)fontWide;
|
||||
- (void)setWideFont:(NSFont *)newFont;
|
||||
- (NSSize)cellSize;
|
||||
- (void)setLinespace:(float)newLinespace;
|
||||
- (int)maxRows;
|
||||
- (int)maxColumns;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
- (void)setMaxRows:(int)rows columns:(int)cols;
|
||||
- (NSRect)rectForRowsInRange:(NSRange)range;
|
||||
- (NSRect)rectForColumnsInRange:(NSRange)range;
|
||||
- (void)setDefaultColorsBackground:(NSColor *)bgColor
|
||||
foreground:(NSColor *)fgColor;
|
||||
- (NSColor *)defaultBackgroundColor;
|
||||
- (NSColor *)defaultForegroundColor;
|
||||
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
|
||||
- (NSSize)desiredSize;
|
||||
@@ -62,5 +61,8 @@
|
||||
|
||||
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSPoint)pointForRow:(int)row column:(int)col;
|
||||
- (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
|
||||
numColumns:(int)nc;
|
||||
|
||||
@end
|
||||
|
||||
+138
-209
@@ -35,13 +35,11 @@
|
||||
|
||||
|
||||
@interface MMTextView (Private)
|
||||
- (BOOL)convertRow:(int)row column:(int)column toPoint:(NSPoint *)point;
|
||||
- (BOOL)convertRow:(int)row column:(int)column numRows:(int)nr
|
||||
numColumns:(int)nc toRect:(NSRect *)rect;
|
||||
- (MMWindowController *)windowController;
|
||||
- (MMVimController *)vimController;
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on;
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(NSColor *)color;
|
||||
fraction:(int)percent;
|
||||
- (void)drawInvertedRectAtRow:(int)row column:(int)col numRows:(int)nrows
|
||||
numColumns:(int)ncols invert:(int)invert;
|
||||
@end
|
||||
@@ -65,10 +63,12 @@
|
||||
NSTypesetter *typesetter = [[MMTypesetter alloc] init];
|
||||
[lm setTypesetter:typesetter];
|
||||
[typesetter release];
|
||||
#if MM_USE_ROW_CACHE
|
||||
} else if ([typesetterString isEqual:@"MMTypesetter2"]) {
|
||||
NSTypesetter *typesetter = [[MMTypesetter2 alloc] init];
|
||||
[lm setTypesetter:typesetter];
|
||||
[typesetter release];
|
||||
#endif // MM_USE_ROW_CACHE
|
||||
} else {
|
||||
// Only MMTypesetter supports different cell width multipliers.
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
@@ -103,8 +103,6 @@
|
||||
helper = [[MMTextViewHelper alloc] init];
|
||||
[helper setTextView:self];
|
||||
|
||||
imRange = NSMakeRange(0, 0);
|
||||
markedRange = NSMakeRange(0, 0);
|
||||
// NOTE: If the default changes to 'NO' then the intialization of
|
||||
// p_antialias in option.c must change as well.
|
||||
antialias = YES;
|
||||
@@ -114,13 +112,7 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
|
||||
if (markedText) {
|
||||
imRange = NSMakeRange(0, 0);
|
||||
[markedText release];
|
||||
markedText = nil;
|
||||
}
|
||||
ASLogDebug(@"");
|
||||
|
||||
if (invertRects) {
|
||||
free(invertRects);
|
||||
@@ -129,7 +121,7 @@
|
||||
}
|
||||
|
||||
[helper setTextView:nil];
|
||||
[helper dealloc]; helper = nil;
|
||||
[helper release]; helper = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -143,15 +135,9 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on
|
||||
{
|
||||
shouldDrawInsertionPoint = on;
|
||||
}
|
||||
|
||||
- (void)setPreEditRow:(int)row column:(int)col
|
||||
{
|
||||
preEditRow = row;
|
||||
preEditColumn = col;
|
||||
[helper setPreEditRow:row column:col];
|
||||
}
|
||||
|
||||
#define MM_DEBUG_DRAWING 0
|
||||
@@ -167,7 +153,7 @@
|
||||
int cursorRow = -1, cursorCol = 0;
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@"====> BEGIN %s", _cmd);
|
||||
ASLogDebug(@"====> BEGIN %s", _cmd);
|
||||
#endif
|
||||
[textStorage beginEditing];
|
||||
|
||||
@@ -178,7 +164,7 @@
|
||||
|
||||
if (ClearAllDrawType == type) {
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Clear all");
|
||||
ASLogDebug(@" Clear all");
|
||||
#endif
|
||||
[textStorage clearAll];
|
||||
} else if (ClearBlockDrawType == type) {
|
||||
@@ -189,8 +175,8 @@
|
||||
int col2 = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Clear block (%d,%d) -> (%d,%d)", row1, col1,
|
||||
row2,col2);
|
||||
ASLogDebug(@" Clear block (%d,%d) -> (%d,%d)", row1, col1,
|
||||
row2,col2);
|
||||
#endif
|
||||
[textStorage clearBlockFromRow:row1 column:col1
|
||||
toRow:row2 column:col2
|
||||
@@ -204,7 +190,7 @@
|
||||
int right = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Delete %d line(s) from %d", count, row);
|
||||
ASLogDebug(@" Delete %d line(s) from %d", count, row);
|
||||
#endif
|
||||
[textStorage deleteLinesFromRow:row lineCount:count
|
||||
scrollBottom:bot left:left right:right
|
||||
@@ -224,20 +210,15 @@
|
||||
bytes += len;
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw string at (%d,%d) length=%d flags=%d fg=0x%x "
|
||||
"bg=0x%x sp=0x%x (%@)", row, col, len, flags, fg, bg, sp,
|
||||
len > 0 ? [string substringToIndex:1] : @"");
|
||||
ASLogDebug(@" Draw string at (%d,%d) length=%d flags=%d fg=0x%x "
|
||||
"bg=0x%x sp=0x%x (%@)", row, col, len, flags, fg, bg, sp,
|
||||
len > 0 ? [string substringToIndex:1] : @"");
|
||||
#endif
|
||||
// NOTE: If this is a call to draw the (block) cursor, then cancel
|
||||
// any previous request to draw the insertion point, or it might
|
||||
// get drawn as well.
|
||||
if (flags & DRAW_CURSOR) {
|
||||
if (flags & DRAW_CURSOR)
|
||||
[self setShouldDrawInsertionPoint:NO];
|
||||
//NSColor *color = [NSColor colorWithRgbInt:bg];
|
||||
//[self drawInsertionPointAtRow:row column:col
|
||||
// shape:MMInsertionPointBlock
|
||||
// color:color];
|
||||
}
|
||||
|
||||
[textStorage drawString:string
|
||||
atRow:row column:col cells:cells
|
||||
@@ -256,7 +237,7 @@
|
||||
int right = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Insert %d line(s) at row %d", count, row);
|
||||
ASLogDebug(@" Insert %d line(s) at row %d", count, row);
|
||||
#endif
|
||||
[textStorage insertLinesAtRow:row lineCount:count
|
||||
scrollBottom:bot left:left right:right
|
||||
@@ -269,11 +250,11 @@
|
||||
int percent = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw cursor at (%d,%d)", row, col);
|
||||
ASLogDebug(@" Draw cursor at (%d,%d)", row, col);
|
||||
#endif
|
||||
[helper setInsertionPointColor:[NSColor colorWithRgbInt:color]];
|
||||
[self drawInsertionPointAtRow:row column:col shape:shape
|
||||
fraction:percent
|
||||
color:[NSColor colorWithRgbInt:color]];
|
||||
fraction:percent];
|
||||
} else if (DrawInvertedRectDrawType == type) {
|
||||
int row = *((int*)bytes); bytes += sizeof(int);
|
||||
int col = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -282,8 +263,8 @@
|
||||
int invert = *((int*)bytes); bytes += sizeof(int);
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@" Draw inverted rect: row=%d col=%d nrows=%d ncols=%d",
|
||||
row, col, nr, nc);
|
||||
ASLogDebug(@" Draw inverted rect: row=%d col=%d nrows=%d "
|
||||
"ncols=%d", row, col, nr, nc);
|
||||
#endif
|
||||
[self drawInvertedRectAtRow:row column:col numRows:nr numColumns:nc
|
||||
invert:invert];
|
||||
@@ -291,7 +272,7 @@
|
||||
cursorRow = *((int*)bytes); bytes += sizeof(int);
|
||||
cursorCol = *((int*)bytes); bytes += sizeof(int);
|
||||
} else {
|
||||
NSLog(@"WARNING: Unknown draw type (type=%d)", type);
|
||||
ASLogWarn(@"Unknown draw type (type=%d)", type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,10 +289,11 @@
|
||||
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
[self displayIfNeeded];
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
NSLog(@"<==== END %s", _cmd);
|
||||
ASLogDebug(@"<==== END %s", _cmd);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -325,6 +307,16 @@
|
||||
antialias = state;
|
||||
}
|
||||
|
||||
- (void)setImControl:(BOOL)enable
|
||||
{
|
||||
[helper setImControl:enable];
|
||||
}
|
||||
|
||||
- (void)activateIm:(BOOL)enable
|
||||
{
|
||||
[helper activateIm:enable];
|
||||
}
|
||||
|
||||
- (NSFont *)font
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] font];
|
||||
@@ -335,6 +327,11 @@
|
||||
[(MMTextStorage*)[self textStorage] setFont:newFont];
|
||||
}
|
||||
|
||||
- (NSFont *)fontWide
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] fontWide];
|
||||
}
|
||||
|
||||
- (void)setWideFont:(NSFont *)newFont
|
||||
{
|
||||
[(MMTextStorage*)[self textStorage] setWideFont:newFont];
|
||||
@@ -356,6 +353,12 @@
|
||||
return [ts maxRows];
|
||||
}
|
||||
|
||||
- (int)maxColumns
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage *)[self textStorage];
|
||||
return [ts maxColumns];
|
||||
}
|
||||
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] getMaxRows:rows columns:cols];
|
||||
@@ -384,6 +387,16 @@
|
||||
setDefaultColorsBackground:bgColor foreground:fgColor];
|
||||
}
|
||||
|
||||
- (NSColor *)defaultBackgroundColor
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] defaultBackgroundColor];
|
||||
}
|
||||
|
||||
- (NSColor *)defaultForegroundColor
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] defaultForegroundColor];
|
||||
}
|
||||
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size
|
||||
{
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
@@ -443,12 +456,42 @@
|
||||
if (row) *row = floor((point.y-origin.y-1) / cellSize.height);
|
||||
if (column) *column = floor((point.x-origin.x-1) / cellSize.width);
|
||||
|
||||
//NSLog(@"convertPoint:%@ toRow:%d column:%d", NSStringFromPoint(point),
|
||||
// *row, *column);
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSPoint)pointForRow:(int)row column:(int)col
|
||||
{
|
||||
// Return the upper-left coordinate for (row,column).
|
||||
// NOTE: The coordinate system is flipped!
|
||||
NSPoint pt = [self textContainerOrigin];
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
NSSize cellSize = [ts cellSize];
|
||||
|
||||
pt.x += col * cellSize.width;
|
||||
pt.y += row * cellSize.height;
|
||||
|
||||
return pt;
|
||||
}
|
||||
|
||||
- (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
|
||||
numColumns:(int)nc
|
||||
{
|
||||
// Return the rect for the block which covers the specified rows and
|
||||
// columns. The upper-left corner is the origin of this rect.
|
||||
// NOTE: The coordinate system is flipped!
|
||||
NSRect rect;
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
NSSize cellSize = [ts cellSize];
|
||||
|
||||
rect.origin = [self textContainerOrigin];
|
||||
rect.origin.x += col * cellSize.width;
|
||||
rect.origin.y += row * cellSize.height;
|
||||
rect.size.width = cellSize.width * nc;
|
||||
rect.size.height = cellSize.height * nr;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque
|
||||
{
|
||||
return NO;
|
||||
@@ -479,7 +522,8 @@
|
||||
numInvertRects = 0;
|
||||
}
|
||||
|
||||
if ([self hasMarkedText]) {
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
if ([self hasMarkedText] && ![helper useInlineIm]) {
|
||||
shouldDrawInsertionPoint = YES;
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
NSSize inset = [self textContainerInset];
|
||||
@@ -496,7 +540,7 @@
|
||||
|
||||
inset.height -= baseline;
|
||||
|
||||
int len = [markedText length];
|
||||
int len = [[helper markedText] length];
|
||||
// The following implementation should be re-written with
|
||||
// more efficient way...
|
||||
|
||||
@@ -509,11 +553,11 @@
|
||||
cols = cols / 2;
|
||||
int done = 0;
|
||||
int lend = cols > len ? len : cols;
|
||||
NSAttributedString *aString = [markedText attributedSubstringFromRange:
|
||||
NSMakeRange(done, lend)];
|
||||
NSAttributedString *aString = [[helper markedText]
|
||||
attributedSubstringFromRange:NSMakeRange(done, lend)];
|
||||
[aString drawAtPoint:NSMakePoint(
|
||||
preEditColumn*[ts cellSize].width + inset.width,
|
||||
preEditRow*[ts cellSize].height + inset.height)];
|
||||
[helper preEditColumn]*[ts cellSize].width + inset.width,
|
||||
[helper preEditRow]*[ts cellSize].height + inset.height)];
|
||||
|
||||
done = lend;
|
||||
// Check whether there're charecters that aren't drawn at
|
||||
@@ -527,36 +571,41 @@
|
||||
for (r = 1; r <= rows; r++) {
|
||||
lend = len - done > [ts actualColumns] / 2
|
||||
? [ts actualColumns] / 2 : len - done;
|
||||
aString = [markedText attributedSubstringFromRange:
|
||||
aString = [[helper markedText] attributedSubstringFromRange:
|
||||
NSMakeRange(done, lend)];
|
||||
[aString drawAtPoint:NSMakePoint(
|
||||
inset.width,
|
||||
(preEditRow + r)*[ts cellSize].height
|
||||
([helper preEditRow] + r)*[ts cellSize].height
|
||||
+ inset.height)];
|
||||
done += lend;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
|
||||
if (shouldDrawInsertionPoint) {
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
|
||||
NSRect ipRect = [ts boundingRectForCharacterAtRow:preEditRow
|
||||
column:preEditColumn];
|
||||
NSRect ipRect = [ts boundingRectForCharacterAtRow:[helper preEditRow]
|
||||
column:[helper preEditColumn]];
|
||||
ipRect.origin.x += [self textContainerOrigin].x;
|
||||
ipRect.origin.y += [self textContainerOrigin].y;
|
||||
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
// Draw insertion point inside marked text.
|
||||
if ([self hasMarkedText]) {
|
||||
if ([self hasMarkedText] && ![helper useInlineIm]) {
|
||||
NSFont *theFont = [[self markedTextAttributes]
|
||||
valueForKey:NSFontAttributeName];
|
||||
if (theFont == [ts font])
|
||||
ipRect.origin.x += [ts cellSize].width *
|
||||
(imRange.location + imRange.length);
|
||||
([helper imRange].location +
|
||||
[helper imRange].length);
|
||||
else
|
||||
ipRect.origin.x += [ts cellSize].width * 2 *
|
||||
(imRange.location + imRange.length);
|
||||
([helper imRange].location +
|
||||
[helper imRange].length);
|
||||
}
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
|
||||
if (MMInsertionPointHorizontal == insertionPointShape) {
|
||||
int frac = ([ts cellSize].height * insertionPointFraction + 99)/100;
|
||||
@@ -571,7 +620,7 @@
|
||||
ipRect.size.width = frac;
|
||||
}
|
||||
|
||||
[[self insertionPointColor] set];
|
||||
[[helper insertionPointColor] set];
|
||||
if (MMInsertionPointHollow == insertionPointShape) {
|
||||
NSFrameRect(ipRect);
|
||||
} else {
|
||||
@@ -581,10 +630,6 @@
|
||||
// NOTE: We only draw the cursor once and rely on Vim to say when it
|
||||
// should be drawn again.
|
||||
shouldDrawInsertionPoint = NO;
|
||||
|
||||
//NSLog(@"%s draw insertion point %@ shape=%d color=%@", _cmd,
|
||||
// NSStringFromRect(ipRect), insertionPointShape,
|
||||
// [self insertionPointColor]);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -627,109 +672,37 @@
|
||||
|
||||
- (BOOL)hasMarkedText
|
||||
{
|
||||
//NSLog(@"%s", _cmd);
|
||||
//return markedText && [markedText length] > 0;
|
||||
return markedRange.length > 0 ? YES : NO;
|
||||
return [helper hasMarkedText];
|
||||
}
|
||||
|
||||
- (NSRange)markedRange
|
||||
{
|
||||
if ([self hasMarkedText]) {
|
||||
return markedRange;
|
||||
} else
|
||||
return NSMakeRange(NSNotFound, 0);
|
||||
return [helper markedRange];
|
||||
}
|
||||
|
||||
- (NSDictionary *)markedTextAttributes
|
||||
{
|
||||
return markedTextAttributes;
|
||||
return [helper markedTextAttributes];
|
||||
}
|
||||
|
||||
- (void)setMarkedTextAttributes:(NSDictionary *)attr
|
||||
{
|
||||
if (attr != markedTextAttributes) {
|
||||
[markedTextAttributes release];
|
||||
markedTextAttributes = [attr retain];
|
||||
}
|
||||
[helper setMarkedTextAttributes:attr];
|
||||
}
|
||||
|
||||
|
||||
- (void)setMarkedText:(id)text selectedRange:(NSRange)range
|
||||
{
|
||||
//NSLog(@"setMarkedText:'%@' selectedRange:%@", text,
|
||||
// NSStringFromRange(range));
|
||||
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
if (!ts)
|
||||
return;
|
||||
[self unmarkText];
|
||||
|
||||
if (text && [text length] > 0) {
|
||||
if ([text isKindOfClass:[NSAttributedString class]]) {
|
||||
[self setMarkedTextAttributes:
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[ts fontWide], NSFontAttributeName,
|
||||
[ts defaultBackgroundColor], NSBackgroundColorAttributeName,
|
||||
[ts defaultForegroundColor], NSForegroundColorAttributeName,
|
||||
nil]];
|
||||
markedText = [[NSMutableAttributedString alloc]
|
||||
initWithString:[text string]
|
||||
attributes:[self markedTextAttributes]];
|
||||
} else {
|
||||
[self setMarkedTextAttributes:
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[ts font], NSFontAttributeName,
|
||||
[ts defaultBackgroundColor], NSBackgroundColorAttributeName,
|
||||
[ts defaultForegroundColor], NSForegroundColorAttributeName,
|
||||
nil]];
|
||||
markedText = [[NSMutableAttributedString alloc]
|
||||
initWithString:text
|
||||
attributes:[self markedTextAttributes]];
|
||||
}
|
||||
|
||||
markedRange = NSMakeRange(0, [markedText length]);
|
||||
if (markedRange.length) {
|
||||
[markedText addAttribute:NSUnderlineStyleAttributeName
|
||||
value:[NSNumber numberWithInt:1]
|
||||
range:markedRange];
|
||||
}
|
||||
imRange = range;
|
||||
if (range.length) {
|
||||
[markedText addAttribute:NSUnderlineStyleAttributeName
|
||||
value:[NSNumber numberWithInt:2]
|
||||
range:range];
|
||||
}
|
||||
}
|
||||
[self setNeedsDisplay: YES];
|
||||
[helper setMarkedText:text selectedRange:range];
|
||||
}
|
||||
|
||||
- (void)unmarkText
|
||||
{
|
||||
//NSLog(@"%s", _cmd);
|
||||
imRange = NSMakeRange(0, 0);
|
||||
markedRange = NSMakeRange(NSNotFound, 0);
|
||||
[markedText release];
|
||||
markedText = nil;
|
||||
[helper unmarkText];
|
||||
}
|
||||
|
||||
- (NSRect)firstRectForCharacterRange:(NSRange)range
|
||||
{
|
||||
//NSLog(@"%s%@", _cmd, NSStringFromRange(range));
|
||||
// HACK! This method is called when the input manager wants to pop up an
|
||||
// auxiliary window. The position where this should be is controller by
|
||||
// Vim by sending SetPreEditPositionMsgID so compute a position based on
|
||||
// the pre-edit (row,column) pair.
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
|
||||
NSRect rect = [ts boundingRectForCharacterAtRow:preEditRow
|
||||
column:preEditColumn];
|
||||
rect.origin.x += [self textContainerOrigin].x;
|
||||
rect.origin.y += [self textContainerOrigin].y + [ts cellSize].height;
|
||||
|
||||
rect.origin = [self convertPoint:rect.origin toView:nil];
|
||||
rect.origin = [[self window] convertBaseToScreen:rect.origin];
|
||||
|
||||
return rect;
|
||||
return [helper firstRectForCharacterRange:range];
|
||||
}
|
||||
|
||||
- (void)scrollWheel:(NSEvent *)event
|
||||
@@ -844,28 +817,7 @@
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
if (!ts) return;
|
||||
|
||||
NSFont *oldFont = [ts font];
|
||||
NSFont *newFont = [sender convertFont:oldFont];
|
||||
|
||||
if (newFont) {
|
||||
NSString *name = [newFont displayName];
|
||||
unsigned len = [name lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
|
||||
if (len > 0) {
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
float pointSize = [newFont pointSize];
|
||||
|
||||
[data appendBytes:&pointSize length:sizeof(float)];
|
||||
|
||||
++len; // include NUL byte
|
||||
[data appendBytes:&len length:sizeof(unsigned)];
|
||||
[data appendBytes:[name UTF8String] length:len];
|
||||
|
||||
[[self vimController] sendMessage:SetFontMsgID data:data];
|
||||
}
|
||||
}
|
||||
[helper changeFont:sender];
|
||||
}
|
||||
|
||||
- (void)resetCursorRects
|
||||
@@ -914,6 +866,14 @@
|
||||
[[self windowController] vimMenuItemAction:sender];
|
||||
}
|
||||
|
||||
- (IBAction)cancelOperation:(id)sender
|
||||
{
|
||||
// NSTextView overrides this method to send complete:, whereas NSResponder
|
||||
// sends cancel: by default. So override it yet again to revert to the
|
||||
// default behavior (we resond to cancel: in MMTextViewHelper).
|
||||
[self doCommandBySelector:@selector(cancel:)];
|
||||
}
|
||||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||
{
|
||||
if ([item action] == @selector(cut:)
|
||||
@@ -926,6 +886,7 @@
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end // MMTextView
|
||||
|
||||
|
||||
@@ -933,37 +894,6 @@
|
||||
|
||||
@implementation MMTextView (Private)
|
||||
|
||||
- (BOOL)convertRow:(int)row column:(int)column toPoint:(NSPoint *)point
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
NSSize cellSize = [ts cellSize];
|
||||
if (!(point && cellSize.width > 0 && cellSize.height > 0))
|
||||
return NO;
|
||||
|
||||
*point = [self textContainerOrigin];
|
||||
point->x += column * cellSize.width;
|
||||
point->y += row * cellSize.height;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)convertRow:(int)row column:(int)column numRows:(int)nr
|
||||
numColumns:(int)nc toRect:(NSRect *)rect
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
|
||||
NSSize cellSize = [ts cellSize];
|
||||
if (!(rect && cellSize.width > 0 && cellSize.height > 0))
|
||||
return NO;
|
||||
|
||||
rect->origin = [self textContainerOrigin];
|
||||
rect->origin.x += column * cellSize.width;
|
||||
rect->origin.y += row * cellSize.height;
|
||||
rect->size.width = cellSize.width * nc;
|
||||
rect->size.height = cellSize.height * nr;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (MMWindowController *)windowController
|
||||
{
|
||||
id windowController = [[self window] windowController];
|
||||
@@ -977,12 +907,14 @@
|
||||
return [[self windowController] vimController];
|
||||
}
|
||||
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent color:(NSColor *)color
|
||||
- (void)setShouldDrawInsertionPoint:(BOOL)on
|
||||
{
|
||||
//NSLog(@"drawInsertionPointAtRow:%d column:%d shape:%d color:%@",
|
||||
// row, col, shape, color);
|
||||
shouldDrawInsertionPoint = on;
|
||||
}
|
||||
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
fraction:(int)percent
|
||||
{
|
||||
// This only stores where to draw the insertion point, the actual drawing
|
||||
// is done in drawRect:.
|
||||
shouldDrawInsertionPoint = YES;
|
||||
@@ -990,8 +922,6 @@
|
||||
insertionPointColumn = col;
|
||||
insertionPointShape = shape;
|
||||
insertionPointFraction = percent;
|
||||
|
||||
[self setInsertionPointColor:color];
|
||||
}
|
||||
|
||||
- (void)drawInvertedRectAtRow:(int)row column:(int)col numRows:(int)nrows
|
||||
@@ -1003,18 +933,17 @@
|
||||
invertRects = reallocf(invertRects,
|
||||
numInvertRects*sizeof(NSRect));
|
||||
if (NULL != invertRects) {
|
||||
[self convertRow:row column:col numRows:nrows numColumns:ncols
|
||||
toRect:&invertRects[n]];
|
||||
invertRects[n] = [self rectForRow:row column:col numRows:nrows
|
||||
numColumns:ncols];
|
||||
[self setNeedsDisplayInRect:invertRects[n]];
|
||||
} else {
|
||||
n = numInvertRects = 0;
|
||||
numInvertRects = 0;
|
||||
}
|
||||
} else {
|
||||
// The result should look normal; all we need to do is to mark
|
||||
// the rect for redrawing and Cocoa will redraw the text.
|
||||
NSRect rect;
|
||||
[self convertRow:row column:col numRows:nrows numColumns:ncols
|
||||
toRect:&rect];
|
||||
NSRect rect = [self rectForRow:row column:col numRows:nrows
|
||||
numColumns:ncols];
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
|
||||
// Need Carbon for TIS...() functions
|
||||
#import <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
|
||||
enum {
|
||||
// These values are chosen so that the min text view size is not too small
|
||||
@@ -30,10 +35,28 @@ enum {
|
||||
BOOL isAutoscrolling;
|
||||
int mouseShape;
|
||||
NSTrackingRectTag trackingRectTag;
|
||||
float scrollWheelAccumulator;
|
||||
NSColor *insertionPointColor;
|
||||
BOOL interpretKeyEventsSwallowedKey;
|
||||
NSEvent *currentEvent;
|
||||
|
||||
// Input Manager
|
||||
NSRange imRange;
|
||||
NSRange markedRange;
|
||||
NSDictionary *markedTextAttributes;
|
||||
NSMutableAttributedString *markedText;
|
||||
int preEditRow;
|
||||
int preEditColumn;
|
||||
BOOL imControl;
|
||||
BOOL imState;
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
|
||||
TISInputSourceRef lastImSource;
|
||||
TISInputSourceRef asciiImSource;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)setTextView:(id)view;
|
||||
- (void)setInsertionPointColor:(NSColor *)color;
|
||||
- (NSColor *)insertionPointColor;
|
||||
|
||||
- (void)keyDown:(NSEvent *)event;
|
||||
- (void)insertText:(id)string;
|
||||
@@ -53,5 +76,25 @@ enum {
|
||||
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
|
||||
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)changeFont:(id)sender;
|
||||
|
||||
// Input Manager
|
||||
- (BOOL)hasMarkedText;
|
||||
- (NSRange)markedRange;
|
||||
- (NSDictionary *)markedTextAttributes;
|
||||
- (void)setMarkedTextAttributes:(NSDictionary *)attr;
|
||||
- (void)setMarkedText:(id)text selectedRange:(NSRange)range;
|
||||
- (void)unmarkText;
|
||||
- (NSMutableAttributedString *)markedText;
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
- (int)preEditRow;
|
||||
- (int)preEditColumn;
|
||||
- (void)setImRange:(NSRange)range;
|
||||
- (NSRange)imRange;
|
||||
- (void)setMarkedRange:(NSRange)range;
|
||||
- (NSRect)firstRectForCharacterRange:(NSRange)range;
|
||||
- (void)setImControl:(BOOL)enable;
|
||||
- (void)activateIm:(BOOL)enable;
|
||||
- (BOOL)useInlineIm;
|
||||
|
||||
@end
|
||||
|
||||
+653
-248
File diff suppressed because it is too large
Load Diff
+13
-10
@@ -26,7 +26,7 @@
|
||||
- (void)willSetLineFragmentRect:(NSRectPointer)lineRect
|
||||
forGlyphRange:(NSRange)glyphRange
|
||||
usedRect:(NSRectPointer)usedRect
|
||||
baselineOffset:(float *)baselineOffset
|
||||
baselineOffset:(CGFloat *)baselineOffset
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage*)[[self layoutManager] textStorage];
|
||||
float h = [ts cellSize].height;
|
||||
@@ -60,7 +60,6 @@
|
||||
- (NSTypesetterControlCharacterAction)
|
||||
actionForControlCharacterAtIndex:(unsigned)charIndex
|
||||
{
|
||||
//NSLog(@"%s%d", _cmd, charIndex);
|
||||
/*NSTextStorage *ts = [[self layoutManager] textStorage];
|
||||
|
||||
if ('\n' == [[ts string] characterAtIndex:charIndex])
|
||||
@@ -75,9 +74,9 @@
|
||||
withAdvancements:(const float *)advancements
|
||||
forStartOfGlyphRange:(NSRange)glyphRange
|
||||
{
|
||||
NSLog(@"setLocation:%@ withAdvancements:%f forStartOfGlyphRange:%@",
|
||||
NSStringFromPoint(location), advancements ? *advancements : 0,
|
||||
NSStringFromRange(glyphRange));
|
||||
ASLogDebug(@"setLocation:%@ withAdvancements:%f forStartOfGlyphRange:%@",
|
||||
NSStringFromPoint(location), advancements ? *advancements : 0,
|
||||
NSStringFromRange(glyphRange));
|
||||
[super setLocation:location withAdvancements:advancements
|
||||
forStartOfGlyphRange:glyphRange];
|
||||
}
|
||||
@@ -89,6 +88,8 @@
|
||||
|
||||
|
||||
|
||||
#if MM_USE_ROW_CACHE
|
||||
|
||||
@implementation MMTypesetter2
|
||||
|
||||
//
|
||||
@@ -102,9 +103,9 @@
|
||||
// height and that EOL glyphs are hidden.
|
||||
//
|
||||
- (void)layoutGlyphsInLayoutManager:(NSLayoutManager *)lm
|
||||
startingAtGlyphIndex:(unsigned)startGlyphIdx
|
||||
maxNumberOfLineFragments:(unsigned)maxNumLines
|
||||
nextGlyphIndex:(unsigned *)nextGlyph
|
||||
startingAtGlyphIndex:(NSUInteger)startGlyphIdx
|
||||
maxNumberOfLineFragments:(NSUInteger)maxNumLines
|
||||
nextGlyphIndex:(NSUInteger *)nextGlyph
|
||||
{
|
||||
// TODO: Check that it really is an MMTextStorage?
|
||||
MMTextStorage *ts = (MMTextStorage*)[lm textStorage];
|
||||
@@ -159,8 +160,8 @@
|
||||
|
||||
NSRange lineRange = { lineIdx, 0 };
|
||||
NSRange glyphRange = { startGlyphIdx, 0 };
|
||||
NSRect lineRect = { 0, line*cellSize.height,
|
||||
[ts actualColumns]*cellSize.width, cellSize.height };
|
||||
NSRect lineRect = { {0, line*cellSize.height},
|
||||
{[ts actualColumns]*cellSize.width, cellSize.height} };
|
||||
int endLine = line + maxNumLines;
|
||||
if (endLine > actualRows)
|
||||
endLine = actualRows;
|
||||
@@ -188,3 +189,5 @@
|
||||
|
||||
@end // MMTypesetter2
|
||||
|
||||
#endif // MM_USE_ROW_CACHE
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MacVim.h"
|
||||
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
@@ -20,14 +19,16 @@
|
||||
|
||||
|
||||
|
||||
@interface MMVimController : NSObject <MMFrontendProtocol>
|
||||
@interface MMVimController : NSObject
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
// 10.6 has turned delegate messages into formal protocols
|
||||
<NSToolbarDelegate, NSOpenSavePanelDelegate>
|
||||
#endif
|
||||
{
|
||||
unsigned identifier;
|
||||
BOOL isInitialized;
|
||||
MMWindowController *windowController;
|
||||
id backendProxy;
|
||||
BOOL inProcessCommandQueue;
|
||||
NSMutableArray *sendQueue;
|
||||
NSMutableArray *receiveQueue;
|
||||
NSMenu *mainMenu;
|
||||
NSMutableArray *popupMenuItems;
|
||||
NSToolbar *toolbar;
|
||||
@@ -43,18 +44,22 @@
|
||||
}
|
||||
|
||||
- (id)initWithBackend:(id)backend pid:(int)processIdentifier;
|
||||
- (unsigned)vimControllerId;
|
||||
- (id)backendProxy;
|
||||
- (int)pid;
|
||||
- (void)setServerName:(NSString *)name;
|
||||
- (NSString *)serverName;
|
||||
- (MMWindowController *)windowController;
|
||||
- (NSDictionary *)vimState;
|
||||
- (id)objectForVimStateKey:(NSString *)key;
|
||||
- (NSMenu *)mainMenu;
|
||||
- (BOOL)isPreloading;
|
||||
- (void)setIsPreloading:(BOOL)yn;
|
||||
- (NSDate *)creationDate;
|
||||
- (void)cleanup;
|
||||
- (void)dropFiles:(NSArray *)filenames forceOpen:(BOOL)force;
|
||||
- (void)file:(NSString *)filename draggedToTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (void)filesDraggedToTabBar:(NSArray *)filenames;
|
||||
- (void)dropString:(NSString *)string;
|
||||
- (void)passArguments:(NSDictionary *)args;
|
||||
- (void)sendMessage:(int)msgid data:(NSData *)data;
|
||||
@@ -62,7 +67,9 @@
|
||||
timeout:(NSTimeInterval)timeout;
|
||||
- (void)addVimInput:(NSString *)string;
|
||||
- (NSString *)evaluateVimExpression:(NSString *)expr;
|
||||
- (id)evaluateVimExpressionCocoa:(NSString *)expr errorString:(NSString **)errstr;
|
||||
- (id)evaluateVimExpressionCocoa:(NSString *)expr
|
||||
errorString:(NSString **)errstr;
|
||||
- (void)processInputQueue:(NSArray *)queue;
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
- (MMPlugInInstanceMediator *)instanceMediator;
|
||||
#endif
|
||||
|
||||
+395
-332
File diff suppressed because it is too large
Load Diff
@@ -43,12 +43,12 @@
|
||||
- (void)selectTabWithIndex:(int)idx;
|
||||
- (NSTabViewItem *)addNewTabViewItem;
|
||||
|
||||
- (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(long)ident;
|
||||
- (BOOL)showScrollbarWithIdentifier:(long)ident state:(BOOL)visible;
|
||||
- (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type;
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident;
|
||||
- (BOOL)showScrollbarWithIdentifier:(int32_t)ident state:(BOOL)visible;
|
||||
- (void)setScrollbarThumbValue:(float)val proportion:(float)prop
|
||||
identifier:(long)ident;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
|
||||
identifier:(int32_t)ident;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(int32_t)ident;
|
||||
|
||||
- (void)setDefaultColorsBackground:(NSColor *)back foreground:(NSColor *)fore;
|
||||
|
||||
|
||||
+145
-63
@@ -18,12 +18,17 @@
|
||||
* the view is filled by the text view.
|
||||
*/
|
||||
|
||||
#import "MMAtsuiTextView.h"
|
||||
#if MM_ENABLE_ATSUI
|
||||
# import "MMAtsuiTextView.h"
|
||||
#else
|
||||
# import "MMCoreTextView.h"
|
||||
#endif
|
||||
#import "MMTextView.h"
|
||||
#import "MMVimController.h"
|
||||
#import "MMVimView.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
#import <PSMTabBarControl.h>
|
||||
#import <PSMTabBarControl/PSMTabBarControl.h>
|
||||
|
||||
|
||||
|
||||
@@ -37,12 +42,12 @@ enum {
|
||||
|
||||
// TODO: Move!
|
||||
@interface MMScroller : NSScroller {
|
||||
long identifier;
|
||||
int32_t identifier;
|
||||
int type;
|
||||
NSRange range;
|
||||
}
|
||||
- (id)initWithIdentifier:(long)ident type:(int)type;
|
||||
- (long)identifier;
|
||||
- (id)initWithIdentifier:(int32_t)ident type:(int)type;
|
||||
- (int32_t)scrollerId;
|
||||
- (int)type;
|
||||
- (NSRange)range;
|
||||
- (void)setRange:(NSRange)newRange;
|
||||
@@ -54,8 +59,8 @@ enum {
|
||||
- (BOOL)leftScrollbarVisible;
|
||||
- (BOOL)rightScrollbarVisible;
|
||||
- (void)placeScrollbars;
|
||||
- (int)representedIndexOfTabViewItem:(NSTabViewItem *)tvi;
|
||||
- (MMScroller *)scrollbarForIdentifier:(long)ident index:(unsigned *)idx;
|
||||
- (NSUInteger)representedIndexOfTabViewItem:(NSTabViewItem *)tvi;
|
||||
- (MMScroller *)scrollbarForIdentifier:(int32_t)ident index:(unsigned *)idx;
|
||||
- (NSSize)vimViewSizeForTextViewSize:(NSSize)textViewSize;
|
||||
- (NSRect)textViewRectForVimViewSize:(NSSize)contentSize;
|
||||
- (NSTabView *)tabView;
|
||||
@@ -87,19 +92,26 @@ enum {
|
||||
// frameSizeMayHaveChanged.
|
||||
[self setAutoresizesSubviews:YES];
|
||||
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:MMAtsuiRendererKey]) {
|
||||
// Use ATSUI for text rendering.
|
||||
//
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
NSInteger renderer = [ud integerForKey:MMRendererKey];
|
||||
ASLogInfo(@"Use renderer=%d", renderer);
|
||||
|
||||
if (MMRendererCoreText == renderer) {
|
||||
// HACK! 'textView' has type MMTextView, but MMCoreTextView is not
|
||||
// derived from MMTextView.
|
||||
textView = [[MMCoreTextView alloc] initWithFrame:frame];
|
||||
#if MM_ENABLE_ATSUI
|
||||
} else if (MMRendererATSUI == renderer) {
|
||||
// HACK! 'textView' has type MMTextView, but MMAtsuiTextView is not
|
||||
// derived from MMTextView.
|
||||
textView = [[MMAtsuiTextView alloc] initWithFrame:frame];
|
||||
#endif
|
||||
} else {
|
||||
// Use Cocoa text system for text rendering.
|
||||
textView = [[MMTextView alloc] initWithFrame:frame];
|
||||
}
|
||||
|
||||
// Allow control of text view inset via MMTextInset* user defaults.
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
int left = [ud integerForKey:MMTextInsetLeftKey];
|
||||
int top = [ud integerForKey:MMTextInsetTopKey];
|
||||
[textView setTextContainerInset:NSMakeSize(left, top)];
|
||||
@@ -128,10 +140,12 @@ enum {
|
||||
[tabBarControl setCellOptimumWidth:
|
||||
[ud integerForKey:MMTabOptimumWidthKey]];
|
||||
|
||||
[tabBarControl setShowAddTabButton:YES];
|
||||
[tabBarControl setShowAddTabButton:[ud boolForKey:MMShowAddTabButtonKey]];
|
||||
[[tabBarControl addTabButton] setTarget:self];
|
||||
[[tabBarControl addTabButton] setAction:@selector(addNewTab:)];
|
||||
[tabBarControl setAllowsDragBetweenWindows:NO];
|
||||
[tabBarControl registerForDraggedTypes:
|
||||
[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||
|
||||
[tabBarControl setAutoresizingMask:NSViewWidthSizable|NSViewMinYMargin];
|
||||
|
||||
@@ -149,7 +163,7 @@ enum {
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
ASLogDebug(@"");
|
||||
|
||||
[tabBarControl release]; tabBarControl = nil;
|
||||
[tabView release]; tabView = nil;
|
||||
@@ -166,6 +180,11 @@ enum {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
// On Leopard, we want to have a textured window background for nice
|
||||
@@ -278,24 +297,41 @@ enum {
|
||||
NSArray *tabViewItems = [[self tabBarControl] representedTabViewItems];
|
||||
|
||||
while (p < end) {
|
||||
NSTabViewItem *tvi = nil;
|
||||
|
||||
//int wincount = *((int*)p); p += sizeof(int);
|
||||
int length = *((int*)p); p += sizeof(int);
|
||||
int infoCount = *((int*)p); p += sizeof(int);
|
||||
unsigned i;
|
||||
for (i = 0; i < infoCount; ++i) {
|
||||
int length = *((int*)p); p += sizeof(int);
|
||||
if (length <= 0)
|
||||
continue;
|
||||
|
||||
NSString *label = [[NSString alloc]
|
||||
initWithBytes:(void*)p length:length
|
||||
encoding:NSUTF8StringEncoding];
|
||||
p += length;
|
||||
NSString *val = [[NSString alloc]
|
||||
initWithBytes:(void*)p length:length
|
||||
encoding:NSUTF8StringEncoding];
|
||||
p += length;
|
||||
|
||||
// Set the label of the tab; add a new tab when needed.
|
||||
NSTabViewItem *tvi = [[self tabView] numberOfTabViewItems] <= tabIdx
|
||||
? [self addNewTabViewItem]
|
||||
: [tabViewItems objectAtIndex:tabIdx];
|
||||
switch (i) {
|
||||
case MMTabLabel:
|
||||
// Set the label of the tab, adding a new tab when needed.
|
||||
tvi = [[self tabView] numberOfTabViewItems] <= tabIdx
|
||||
? [self addNewTabViewItem]
|
||||
: [tabViewItems objectAtIndex:tabIdx];
|
||||
[tvi setLabel:val];
|
||||
++tabIdx;
|
||||
break;
|
||||
case MMTabToolTip:
|
||||
if (tvi)
|
||||
[[self tabBarControl] setToolTip:val
|
||||
forTabViewItem:tvi];
|
||||
break;
|
||||
default:
|
||||
ASLogWarn(@"Unknown tab info for index: %d", i);
|
||||
}
|
||||
|
||||
[tvi setLabel:label];
|
||||
|
||||
[label release];
|
||||
|
||||
++tabIdx;
|
||||
[val release];
|
||||
}
|
||||
}
|
||||
|
||||
// Remove unused tabs from the NSTabView. Note that when a tab is closed
|
||||
@@ -306,7 +342,6 @@ enum {
|
||||
int i, count = [[self tabView] numberOfTabViewItems];
|
||||
for (i = count-1; i >= tabIdx; --i) {
|
||||
id tvi = [tabViewItems objectAtIndex:i];
|
||||
//NSLog(@"Removing tab with index %d", i);
|
||||
[[self tabView] removeTabViewItem:tvi];
|
||||
}
|
||||
vimTaskSelectedTab = NO;
|
||||
@@ -316,11 +351,9 @@ enum {
|
||||
|
||||
- (void)selectTabWithIndex:(int)idx
|
||||
{
|
||||
//NSLog(@"%s%d", _cmd, idx);
|
||||
|
||||
NSArray *tabViewItems = [[self tabBarControl] representedTabViewItems];
|
||||
if (idx < 0 || idx >= [tabViewItems count]) {
|
||||
NSLog(@"WARNING: No tab with index %d exists.", idx);
|
||||
ASLogWarn(@"No tab with index %d exists.", idx);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -354,10 +387,8 @@ enum {
|
||||
return tvi;
|
||||
}
|
||||
|
||||
- (void)createScrollbarWithIdentifier:(long)ident type:(int)type
|
||||
- (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type
|
||||
{
|
||||
//NSLog(@"Create scroller %d of type %d", ident, type);
|
||||
|
||||
MMScroller *scroller = [[MMScroller alloc] initWithIdentifier:ident
|
||||
type:type];
|
||||
[scroller setTarget:self];
|
||||
@@ -368,10 +399,8 @@ enum {
|
||||
[scroller release];
|
||||
}
|
||||
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(long)ident
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident
|
||||
{
|
||||
//NSLog(@"Destroy scroller %d", ident);
|
||||
|
||||
unsigned idx = 0;
|
||||
MMScroller *scroller = [self scrollbarForIdentifier:ident index:&idx];
|
||||
if (!scroller) return NO;
|
||||
@@ -384,14 +413,12 @@ enum {
|
||||
return ![scroller isHidden];
|
||||
}
|
||||
|
||||
- (BOOL)showScrollbarWithIdentifier:(long)ident state:(BOOL)visible
|
||||
- (BOOL)showScrollbarWithIdentifier:(int32_t)ident state:(BOOL)visible
|
||||
{
|
||||
MMScroller *scroller = [self scrollbarForIdentifier:ident index:NULL];
|
||||
if (!scroller) return NO;
|
||||
|
||||
BOOL wasVisible = ![scroller isHidden];
|
||||
//NSLog(@"%s scroller %d (was %svisible)", visible ? "Show" : "Hide",
|
||||
// ident, wasVisible ? "" : "in");
|
||||
[scroller setHidden:!visible];
|
||||
|
||||
// If a scroller was hidden or shown then the vim view must resize. This
|
||||
@@ -400,12 +427,15 @@ enum {
|
||||
}
|
||||
|
||||
- (void)setScrollbarThumbValue:(float)val proportion:(float)prop
|
||||
identifier:(long)ident
|
||||
identifier:(int32_t)ident
|
||||
{
|
||||
MMScroller *scroller = [self scrollbarForIdentifier:ident index:NULL];
|
||||
//NSLog(@"Set thumb value %.2f proportion %.2f for scroller %d",
|
||||
// val, prop, ident);
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
|
||||
[scroller setDoubleValue:val];
|
||||
[scroller setKnobProportion:prop];
|
||||
#else
|
||||
[scroller setFloatValue:val knobProportion:prop];
|
||||
#endif
|
||||
[scroller setEnabled:prop != 1.f];
|
||||
}
|
||||
|
||||
@@ -413,24 +443,22 @@ enum {
|
||||
- (void)scroll:(id)sender
|
||||
{
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
long ident = [(MMScroller*)sender identifier];
|
||||
int32_t ident = [(MMScroller*)sender scrollerId];
|
||||
int hitPart = [sender hitPart];
|
||||
float value = [sender floatValue];
|
||||
|
||||
[data appendBytes:&ident length:sizeof(long)];
|
||||
[data appendBytes:&ident length:sizeof(int32_t)];
|
||||
[data appendBytes:&hitPart length:sizeof(int)];
|
||||
[data appendBytes:&value length:sizeof(float)];
|
||||
|
||||
[vimController sendMessage:ScrollbarEventMsgID data:data];
|
||||
}
|
||||
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(int32_t)ident
|
||||
{
|
||||
MMScroller *scroller = [self scrollbarForIdentifier:ident index:NULL];
|
||||
NSRange range = NSMakeRange(pos, len);
|
||||
if (!NSEqualRanges(range, [scroller range])) {
|
||||
//NSLog(@"Set range %@ for scroller %d",
|
||||
// NSStringFromRange(range), ident);
|
||||
[scroller setRange:range];
|
||||
// TODO! Should only do this once per update.
|
||||
|
||||
@@ -463,9 +491,10 @@ enum {
|
||||
// flag is set when Vim initiated the selection.
|
||||
if (!vimTaskSelectedTab) {
|
||||
// Propagate the selection message to Vim.
|
||||
int idx = [self representedIndexOfTabViewItem:tabViewItem];
|
||||
NSUInteger idx = [self representedIndexOfTabViewItem:tabViewItem];
|
||||
if (NSNotFound != idx) {
|
||||
NSData *data = [NSData dataWithBytes:&idx length:sizeof(int)];
|
||||
int i = (int)idx; // HACK! Never more than MAXINT tabs?!
|
||||
NSData *data = [NSData dataWithBytes:&i length:sizeof(int)];
|
||||
[vimController sendMessage:SelectTabMsgID data:data];
|
||||
}
|
||||
}
|
||||
@@ -481,9 +510,9 @@ enum {
|
||||
// HACK! This method is only called when the user clicks the close button
|
||||
// on the tab. Instead of letting the tab bar close the tab, we return NO
|
||||
// and pass a message on to Vim to let it handle the closing.
|
||||
int idx = [self representedIndexOfTabViewItem:tabViewItem];
|
||||
//NSLog(@"Closing tab with index %d", idx);
|
||||
NSData *data = [NSData dataWithBytes:&idx length:sizeof(int)];
|
||||
NSUInteger idx = [self representedIndexOfTabViewItem:tabViewItem];
|
||||
int i = (int)idx; // HACK! Never more than MAXINT tabs?!
|
||||
NSData *data = [NSData dataWithBytes:&i length:sizeof(int)];
|
||||
[vimController sendMessage:CloseTabMsgID data:data];
|
||||
|
||||
return NO;
|
||||
@@ -498,6 +527,40 @@ enum {
|
||||
[vimController sendMessage:DraggedTabMsgID data:data];
|
||||
}
|
||||
|
||||
- (NSDragOperation)tabBarControl:(PSMTabBarControl *)theTabBarControl
|
||||
draggingEntered:(id <NSDraggingInfo>)sender
|
||||
forTabAtIndex:(NSUInteger)tabIndex
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
return [[pb types] containsObject:NSFilenamesPboardType]
|
||||
? NSDragOperationCopy
|
||||
: NSDragOperationNone;
|
||||
}
|
||||
|
||||
- (BOOL)tabBarControl:(PSMTabBarControl *)theTabBarControl
|
||||
performDragOperation:(id <NSDraggingInfo>)sender
|
||||
forTabAtIndex:(NSUInteger)tabIndex
|
||||
{
|
||||
NSPasteboard *pb = [sender draggingPasteboard];
|
||||
if ([[pb types] containsObject:NSFilenamesPboardType]) {
|
||||
NSArray *filenames = [pb propertyListForType:NSFilenamesPboardType];
|
||||
if ([filenames count] == 0)
|
||||
return NO;
|
||||
if (tabIndex != NSNotFound) {
|
||||
// If dropping on a specific tab, only open one file
|
||||
[vimController file:[filenames objectAtIndex:0]
|
||||
draggedToTabAtIndex:tabIndex];
|
||||
} else {
|
||||
// Files were dropped on empty part of tab bar; open them all
|
||||
[vimController filesDraggedToTabBar:filenames];
|
||||
}
|
||||
return YES;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -- NSView customization ---------------------------------------------------
|
||||
|
||||
@@ -689,7 +752,6 @@ enum {
|
||||
rect.size.height = 0;
|
||||
}
|
||||
|
||||
//NSLog(@"set scroller #%d frame = %@", i, NSStringFromRect(rect));
|
||||
NSRect oldRect = [scroller frame];
|
||||
if (!NSEqualRects(oldRect, rect)) {
|
||||
[scroller setFrame:rect];
|
||||
@@ -701,18 +763,18 @@ enum {
|
||||
}
|
||||
}
|
||||
|
||||
- (int)representedIndexOfTabViewItem:(NSTabViewItem *)tvi
|
||||
- (NSUInteger)representedIndexOfTabViewItem:(NSTabViewItem *)tvi
|
||||
{
|
||||
NSArray *tabViewItems = [[self tabBarControl] representedTabViewItems];
|
||||
return [tabViewItems indexOfObject:tvi];
|
||||
}
|
||||
|
||||
- (MMScroller *)scrollbarForIdentifier:(long)ident index:(unsigned *)idx
|
||||
- (MMScroller *)scrollbarForIdentifier:(int32_t)ident index:(unsigned *)idx
|
||||
{
|
||||
unsigned i, count = [scrollbars count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
MMScroller *scroller = [scrollbars objectAtIndex:i];
|
||||
if ([scroller identifier] == ident) {
|
||||
if ([scroller scrollerId] == ident) {
|
||||
if (idx) *idx = i;
|
||||
return scroller;
|
||||
}
|
||||
@@ -740,7 +802,7 @@ enum {
|
||||
|
||||
- (NSRect)textViewRectForVimViewSize:(NSSize)contentSize
|
||||
{
|
||||
NSRect rect = { 0, 0, contentSize.width, contentSize.height };
|
||||
NSRect rect = { {0, 0}, {contentSize.width, contentSize.height} };
|
||||
|
||||
if (![[self tabBarControl] isHidden])
|
||||
rect.size.height -= [[self tabBarControl] frame].size.height;
|
||||
@@ -802,9 +864,9 @@ enum {
|
||||
int msgid = [self inLiveResize] ? LiveResizeMsgID
|
||||
: SetTextDimensionsMsgID;
|
||||
|
||||
//NSLog(@"Notify Vim that text dimensions changed from %dx%d to %dx%d"
|
||||
// " (%s)", cols, rows, constrained[1], constrained[0],
|
||||
// MessageStrings[msgid]);
|
||||
ASLogDebug(@"Notify Vim that text dimensions changed from %dx%d to "
|
||||
"%dx%d (%s)", cols, rows, constrained[1], constrained[0],
|
||||
MessageStrings[msgid]);
|
||||
|
||||
[vimController sendMessage:msgid data:data];
|
||||
|
||||
@@ -824,7 +886,7 @@ enum {
|
||||
|
||||
@implementation MMScroller
|
||||
|
||||
- (id)initWithIdentifier:(long)ident type:(int)theType
|
||||
- (id)initWithIdentifier:(int32_t)ident type:(int)theType
|
||||
{
|
||||
// HACK! NSScroller creates a horizontal scroller if it is init'ed with a
|
||||
// frame whose with exceeds its height; so create a bogus rect and pass it
|
||||
@@ -845,7 +907,7 @@ enum {
|
||||
return self;
|
||||
}
|
||||
|
||||
- (long)identifier
|
||||
- (int32_t)scrollerId
|
||||
{
|
||||
return identifier;
|
||||
}
|
||||
@@ -873,4 +935,24 @@ enum {
|
||||
[[(MMVimView*)vimView textView] scrollWheel:event];
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)event
|
||||
{
|
||||
// TODO: This is an ugly way of getting the connection to the backend.
|
||||
NSConnection *connection = nil;
|
||||
id wc = [[self window] windowController];
|
||||
if ([wc isKindOfClass:[MMWindowController class]]) {
|
||||
MMVimController *vc = [(MMWindowController*)wc vimController];
|
||||
id proxy = [vc backendProxy];
|
||||
connection = [(NSDistantObject*)proxy connectionForProxy];
|
||||
}
|
||||
|
||||
// NOTE: The scroller goes into "event tracking mode" when the user clicks
|
||||
// (and holds) the mouse button. We have to manually add the backend
|
||||
// connection to this mode while the mouse button is held, else DO messages
|
||||
// from Vim will not be processed until the mouse button is released.
|
||||
[connection addRequestMode:NSEventTrackingRunLoopMode];
|
||||
[super mouseDown:event];
|
||||
[connection removeRequestMode:NSEventTrackingRunLoopMode];
|
||||
}
|
||||
|
||||
@end // MMScroller
|
||||
|
||||
@@ -8,16 +8,17 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MacVim.h"
|
||||
|
||||
|
||||
|
||||
@interface MMWindow : NSWindow {
|
||||
NSBox *tablineSeparator;
|
||||
NSRect userFrame;
|
||||
}
|
||||
|
||||
- (id)initWithContentRect:(NSRect)rect
|
||||
styleMask:(unsigned int)style
|
||||
styleMask:(NSUInteger)style
|
||||
backing:(NSBackingStoreType)bufferingType
|
||||
defer:(BOOL)flag;
|
||||
|
||||
|
||||
+34
-3
@@ -35,7 +35,7 @@
|
||||
@implementation MMWindow
|
||||
|
||||
- (id)initWithContentRect:(NSRect)rect
|
||||
styleMask:(unsigned int)style
|
||||
styleMask:(NSUInteger)style
|
||||
backing:(NSBackingStoreType)bufferingType
|
||||
defer:(BOOL)flag
|
||||
{
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
[self setReleasedWhenClosed:NO];
|
||||
|
||||
NSRect tabSepRect = { 0, rect.size.height - 1, rect.size.width, 1 };
|
||||
NSRect tabSepRect = { {0, rect.size.height - 1}, {rect.size.width, 1} };
|
||||
tablineSeparator = [[NSBox alloc] initWithFrame:tabSepRect];
|
||||
|
||||
[tablineSeparator setBoxType:NSBoxSeparator];
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
ASLogDebug(@"");
|
||||
|
||||
// TODO: Is there any reason why we would want the following call?
|
||||
//[tablineSeparator removeFromSuperviewWithoutNeedingDisplay];
|
||||
@@ -140,4 +140,35 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (IBAction)zoom:(id)sender
|
||||
{
|
||||
NSScreen *screen = [self screen];
|
||||
if (!screen) {
|
||||
ASLogNotice(@"Window not on screen, zoom to main screen");
|
||||
screen = [NSScreen mainScreen];
|
||||
if (!screen) {
|
||||
ASLogNotice(@"No main screen, abort zoom");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
NSRect frame = [self frame];
|
||||
NSRect defaultFrame = [screen visibleFrame];
|
||||
defaultFrame = [[self delegate] windowWillUseStandardFrame:self
|
||||
defaultFrame:defaultFrame];
|
||||
|
||||
// TODO: Check if width & height differs by cellSize or more.
|
||||
BOOL isZoomed = ((abs(frame.size.width - defaultFrame.size.width) < 8) &&
|
||||
(abs(frame.size.height - defaultFrame.size.height) < 8));
|
||||
|
||||
if (isZoomed) {
|
||||
if (userFrame.size.width > 0 && userFrame.size.height > 0)
|
||||
defaultFrame = userFrame;
|
||||
} else {
|
||||
userFrame = frame;
|
||||
}
|
||||
|
||||
[self setFrame:defaultFrame display:YES];
|
||||
}
|
||||
|
||||
@end // MMWindow
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MacVim.h"
|
||||
|
||||
|
||||
|
||||
@@ -17,11 +17,18 @@
|
||||
@class MMVimController;
|
||||
@class MMVimView;
|
||||
|
||||
@interface MMWindowController : NSWindowController {
|
||||
@interface MMWindowController : NSWindowController
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
// 10.6 has turned delegate messages into formal protocols
|
||||
<NSWindowDelegate>
|
||||
#endif
|
||||
{
|
||||
MMVimController *vimController;
|
||||
MMVimView *vimView;
|
||||
BOOL setupDone;
|
||||
BOOL shouldResizeVimView;
|
||||
int updateToolbarFlag;
|
||||
BOOL keepOnScreen;
|
||||
BOOL fullscreenEnabled;
|
||||
NSString *windowAutosaveKey;
|
||||
MMFullscreenWindow *fullscreenWindow;
|
||||
@@ -39,20 +46,21 @@
|
||||
- (void)showWindow;
|
||||
- (void)updateTabsWithData:(NSData *)data;
|
||||
- (void)selectTabWithIndex:(int)idx;
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols live:(BOOL)live;
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols isLive:(BOOL)live
|
||||
isReply:(BOOL)reply;
|
||||
- (void)setTitle:(NSString *)title;
|
||||
- (void)setDocumentFilename:(NSString *)filename;
|
||||
- (void)setToolbar:(NSToolbar *)toolbar;
|
||||
- (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(long)ident;
|
||||
- (BOOL)showScrollbarWithIdentifier:(long)ident state:(BOOL)visible;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
|
||||
- (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type;
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident;
|
||||
- (BOOL)showScrollbarWithIdentifier:(int32_t)ident state:(BOOL)visible;
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(int32_t)ident;
|
||||
- (void)setScrollbarThumbValue:(float)val proportion:(float)prop
|
||||
identifier:(long)ident;
|
||||
identifier:(int32_t)ident;
|
||||
- (void)setDefaultColorsBackground:(NSColor *)back foreground:(NSColor *)fore;
|
||||
- (void)setFont:(NSFont *)font;
|
||||
- (void)setWideFont:(NSFont *)font;
|
||||
- (void)processCommandQueueDidFinish;
|
||||
- (void)processInputQueueDidFinish;
|
||||
- (void)showTabBar:(BOOL)on;
|
||||
- (void)showToolbar:(BOOL)on size:(int)size mode:(int)mode;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
@@ -62,6 +70,8 @@
|
||||
|
||||
- (void)enterFullscreen:(int)fuoptions backgroundColor:(NSColor *)back;
|
||||
- (void)leaveFullscreen;
|
||||
- (void)setFullscreenBackgroundColor:(NSColor *)back;
|
||||
|
||||
- (void)setBuffersModified:(BOOL)mod;
|
||||
|
||||
- (IBAction)addNewTab:(id)sender;
|
||||
@@ -73,5 +83,6 @@
|
||||
- (IBAction)vimToolbarItemAction:(id)sender;
|
||||
- (IBAction)fontSizeUp:(id)sender;
|
||||
- (IBAction)fontSizeDown:(id)sender;
|
||||
- (IBAction)findAndReplace:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
+260
-70
@@ -57,6 +57,7 @@
|
||||
|
||||
#import "MMAppController.h"
|
||||
#import "MMAtsuiTextView.h"
|
||||
#import "MMFindReplaceController.h"
|
||||
#import "MMFullscreenWindow.h"
|
||||
#import "MMTextView.h"
|
||||
#import "MMTypesetter.h"
|
||||
@@ -65,19 +66,22 @@
|
||||
#import "MMWindow.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
#import <PSMTabBarControl.h>
|
||||
#import <PSMTabBarControl/PSMTabBarControl.h>
|
||||
|
||||
|
||||
|
||||
@interface MMWindowController (Private)
|
||||
- (NSSize)contentSize;
|
||||
- (void)resizeWindowToFitContentSize:(NSSize)contentSize;
|
||||
- (void)resizeWindowToFitContentSize:(NSSize)contentSize
|
||||
keepOnScreen:(BOOL)onScreen;
|
||||
- (NSSize)constrainContentSizeToScreenSize:(NSSize)contentSize;
|
||||
- (NSRect)constrainFrame:(NSRect)frame;
|
||||
- (void)updateResizeConstraints;
|
||||
- (NSTabViewItem *)addNewTabViewItem;
|
||||
- (BOOL)askBackendForStarRegister:(NSPasteboard *)pb;
|
||||
- (void)hideTablineSeparator:(BOOL)hide;
|
||||
- (void)doFindNext:(BOOL)next;
|
||||
- (void)updateToolbar;
|
||||
@end
|
||||
|
||||
|
||||
@@ -95,18 +99,6 @@
|
||||
@interface NSWindow (NSLeopardOnly)
|
||||
// Note: These functions are Leopard-only, use -[NSObject respondsToSelector:]
|
||||
// before calling them to make sure everything works on Tiger too.
|
||||
|
||||
#ifndef CGFLOAT_DEFINED
|
||||
// On Leopard, CGFloat is float on 32bit and double on 64bit. On Tiger,
|
||||
// we can't use this anyways, so it's just here to keep the compiler happy.
|
||||
// However, when we're compiling for Tiger and running on Leopard, we
|
||||
// might need the correct typedef, so this piece is copied from ATSTypes.h
|
||||
# ifdef __LP64__
|
||||
typedef double CGFloat;
|
||||
# else
|
||||
typedef float CGFloat;
|
||||
# endif
|
||||
#endif
|
||||
- (void)setAutorecalculatesContentBorderThickness:(BOOL)b forEdge:(NSRectEdge)e;
|
||||
- (void)setContentBorderThickness:(CGFloat)b forEdge:(NSRectEdge)e;
|
||||
@end
|
||||
@@ -118,9 +110,6 @@
|
||||
|
||||
- (id)initWithVimController:(MMVimController *)controller
|
||||
{
|
||||
#ifndef NSAppKitVersionNumber10_4 // needed for non-10.5 sdk
|
||||
# define NSAppKitVersionNumber10_4 824
|
||||
#endif
|
||||
unsigned styleMask = NSTitledWindowMask | NSClosableWindowMask
|
||||
| NSMiniaturizableWindowMask | NSResizableWindowMask
|
||||
| NSUnifiedTitleAndToolbarWindowMask;
|
||||
@@ -197,7 +186,7 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
LOG_DEALLOC
|
||||
ASLogDebug(@"");
|
||||
|
||||
[decoratedWindow release]; decoratedWindow = nil;
|
||||
[windowAutosaveKey release]; windowAutosaveKey = nil;
|
||||
@@ -237,7 +226,7 @@
|
||||
|
||||
- (void)cleanup
|
||||
{
|
||||
//NSLog(@"%@ %s", [self className], _cmd);
|
||||
ASLogDebug(@"%@ %s", [self className], _cmd);
|
||||
|
||||
if (fullscreenEnabled) {
|
||||
// If we are closed while still in fullscreen, end fullscreen mode,
|
||||
@@ -270,7 +259,8 @@
|
||||
setupDone = YES;
|
||||
|
||||
[self updateResizeConstraints];
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]];
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]
|
||||
keepOnScreen:YES];
|
||||
}
|
||||
|
||||
- (void)showWindow
|
||||
@@ -294,26 +284,45 @@
|
||||
[vimView selectTabWithIndex:idx];
|
||||
}
|
||||
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols live:(BOOL)live
|
||||
- (void)setTextDimensionsWithRows:(int)rows columns:(int)cols isLive:(BOOL)live
|
||||
isReply:(BOOL)reply
|
||||
{
|
||||
//NSLog(@"setTextDimensionsWithRows:%d columns:%d live:%s", rows, cols,
|
||||
// live ? "YES" : "NO");
|
||||
ASLogDebug(@"setTextDimensionsWithRows:%d columns:%d isLive:%d isReply:%d",
|
||||
rows, cols, live, reply);
|
||||
|
||||
// NOTE: The only place where the (rows,columns) of the vim view are
|
||||
// modified is here and when entering/leaving full-screen. Setting these
|
||||
// values have no immediate effect, the actual resizing of the view is done
|
||||
// in processCommandQueueDidFinish.
|
||||
// in processInputQueueDidFinish.
|
||||
//
|
||||
// The 'live' flag indicates that this resize originated from a live
|
||||
// resize; it may very well happen that the view is no longer in live
|
||||
// resize when this message is received. We refrain from changing the view
|
||||
// size when this flag is set, otherwise the window might jitter when the
|
||||
// user drags to resize the window.
|
||||
//
|
||||
// The 'reply' flag indicates that this resize originated in MacVim and
|
||||
// that Vim is now replying to that resize to make sure that it comes into
|
||||
// effect.
|
||||
|
||||
[vimView setDesiredRows:rows columns:cols];
|
||||
|
||||
if (setupDone && !live)
|
||||
if (setupDone && !live) {
|
||||
shouldResizeVimView = YES;
|
||||
keepOnScreen = !reply;
|
||||
}
|
||||
|
||||
if (windowAutosaveKey) {
|
||||
// Autosave rows and columns (only done for window which also autosaves
|
||||
// window position).
|
||||
id tv = [vimView textView];
|
||||
int rows = [tv maxRows];
|
||||
int cols = [tv maxColumns];
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
[ud setInteger:rows forKey:MMAutosaveRowsKey];
|
||||
[ud setInteger:cols forKey:MMAutosaveColumnsKey];
|
||||
[ud synchronize];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)title
|
||||
@@ -350,12 +359,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)createScrollbarWithIdentifier:(long)ident type:(int)type
|
||||
- (void)createScrollbarWithIdentifier:(int32_t)ident type:(int)type
|
||||
{
|
||||
[vimView createScrollbarWithIdentifier:ident type:type];
|
||||
}
|
||||
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(long)ident
|
||||
- (BOOL)destroyScrollbarWithIdentifier:(int32_t)ident
|
||||
{
|
||||
BOOL scrollbarHidden = [vimView destroyScrollbarWithIdentifier:ident];
|
||||
shouldResizeVimView = shouldResizeVimView || scrollbarHidden;
|
||||
@@ -363,7 +372,7 @@
|
||||
return scrollbarHidden;
|
||||
}
|
||||
|
||||
- (BOOL)showScrollbarWithIdentifier:(long)ident state:(BOOL)visible
|
||||
- (BOOL)showScrollbarWithIdentifier:(int32_t)ident state:(BOOL)visible
|
||||
{
|
||||
BOOL scrollbarToggled = [vimView showScrollbarWithIdentifier:ident
|
||||
state:visible];
|
||||
@@ -372,13 +381,13 @@
|
||||
return scrollbarToggled;
|
||||
}
|
||||
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident
|
||||
- (void)setScrollbarPosition:(int)pos length:(int)len identifier:(int32_t)ident
|
||||
{
|
||||
[vimView setScrollbarPosition:pos length:len identifier:ident];
|
||||
}
|
||||
|
||||
- (void)setScrollbarThumbValue:(float)val proportion:(float)prop
|
||||
identifier:(long)ident
|
||||
identifier:(int32_t)ident
|
||||
{
|
||||
[vimView setScrollbarThumbValue:val proportion:prop identifier:ident];
|
||||
}
|
||||
@@ -407,20 +416,21 @@
|
||||
[[vimView textView] setWideFont:font];
|
||||
}
|
||||
|
||||
- (void)processCommandQueueDidFinish
|
||||
- (void)processInputQueueDidFinish
|
||||
{
|
||||
// IMPORTANT! No synchronous DO calls are allowed in this method. They
|
||||
// may cause the command queue to get processed out of order.
|
||||
|
||||
// NOTE: Resizing is delayed until after all commands have been processed
|
||||
// since it often happens that more than one command will cause a resize.
|
||||
// If we were to immediately resize then the vim view size would jitter
|
||||
// (e.g. hiding/showing scrollbars often happens several time in one
|
||||
// update).
|
||||
// Also delay toggling the toolbar until after scrollbars otherwise
|
||||
// problems arise when showing toolbar and scrollbar at the same time, i.e.
|
||||
// on "set go+=rT".
|
||||
|
||||
if (shouldResizeVimView) {
|
||||
shouldResizeVimView = NO;
|
||||
|
||||
NSSize originalSize = [vimView frame].size;
|
||||
NSSize contentSize = [vimView desiredSize];
|
||||
contentSize = [self constrainContentSizeToScreenSize:contentSize];
|
||||
contentSize = [vimView constrainRows:NULL columns:NULL
|
||||
@@ -428,12 +438,25 @@
|
||||
[vimView setFrameSize:contentSize];
|
||||
|
||||
if (fullscreenEnabled) {
|
||||
[[fullscreenWindow contentView] setNeedsDisplay:YES];
|
||||
[fullscreenWindow centerView];
|
||||
// NOTE! Don't mark the fullscreen content view as needing an
|
||||
// update unless absolutely necessary since when it is updated the
|
||||
// entire screen is cleared. This may cause some parts of the Vim
|
||||
// view to be cleared but not redrawn since Vim does not realize
|
||||
// that we've erased part of the view.
|
||||
if (!NSEqualSizes(originalSize, contentSize)) {
|
||||
[[fullscreenWindow contentView] setNeedsDisplay:YES];
|
||||
[fullscreenWindow centerView];
|
||||
}
|
||||
} else {
|
||||
[self resizeWindowToFitContentSize:contentSize];
|
||||
[self resizeWindowToFitContentSize:contentSize
|
||||
keepOnScreen:keepOnScreen];
|
||||
}
|
||||
|
||||
keepOnScreen = NO;
|
||||
}
|
||||
|
||||
if (updateToolbarFlag != 0)
|
||||
[self updateToolbar];
|
||||
}
|
||||
|
||||
- (void)showTabBar:(BOOL)on
|
||||
@@ -467,21 +490,17 @@
|
||||
|
||||
[toolbar setSizeMode:size];
|
||||
[toolbar setDisplayMode:mode];
|
||||
[toolbar setVisible:on];
|
||||
|
||||
if (([decoratedWindow styleMask] & NSTexturedBackgroundWindowMask) == 0) {
|
||||
if (!on) {
|
||||
[self hideTablineSeparator:YES];
|
||||
} else {
|
||||
[self hideTablineSeparator:![[vimView tabBarControl] isHidden]];
|
||||
}
|
||||
} else {
|
||||
// Textured windows don't have a line below there title bar, so we
|
||||
// need the separator in this case as well. In fact, the only case
|
||||
// where we don't need the separator is when the tab bar control
|
||||
// is visible (because it brings its own separator).
|
||||
[self hideTablineSeparator:![[vimView tabBarControl] isHidden]];
|
||||
}
|
||||
// Positive flag shows toolbar, negative hides it.
|
||||
updateToolbarFlag = on ? 1 : -1;
|
||||
|
||||
// NOTE: If the window is not visible we must toggle the toolbar
|
||||
// immediately, otherwise "set go-=T" in .gvimrc will lead to the toolbar
|
||||
// showing its hide animation every time a new window is opened. (See
|
||||
// processInputQueueDidFinish for the reason why we need to delay toggling
|
||||
// the toolbar when the window is visible.)
|
||||
if (![decoratedWindow isVisible])
|
||||
[self updateToolbar];
|
||||
}
|
||||
|
||||
- (void)setMouseShape:(int)shape
|
||||
@@ -499,16 +518,33 @@
|
||||
|
||||
- (void)liveResizeWillStart
|
||||
{
|
||||
if (!setupDone) return;
|
||||
|
||||
// Save the original title, if we haven't already.
|
||||
if (lastSetTitle == nil) {
|
||||
lastSetTitle = [[decoratedWindow title] retain];
|
||||
}
|
||||
|
||||
// NOTE: During live resize Cocoa goes into "event tracking mode". We have
|
||||
// to add the backend connection to this mode in order for resize messages
|
||||
// from Vim to reach MacVim. We do not wish to always listen to requests
|
||||
// in event tracking mode since then MacVim could receive DO messages at
|
||||
// unexpected times (e.g. when a key equivalent is pressed and the menu bar
|
||||
// momentarily lights up).
|
||||
id proxy = [vimController backendProxy];
|
||||
NSConnection *connection = [(NSDistantObject*)proxy connectionForProxy];
|
||||
[connection addRequestMode:NSEventTrackingRunLoopMode];
|
||||
}
|
||||
|
||||
- (void)liveResizeDidEnd
|
||||
{
|
||||
if (!setupDone) return;
|
||||
|
||||
// See comment above regarding event tracking mode.
|
||||
id proxy = [vimController backendProxy];
|
||||
NSConnection *connection = [(NSDistantObject*)proxy connectionForProxy];
|
||||
[connection removeRequestMode:NSEventTrackingRunLoopMode];
|
||||
|
||||
// NOTE: During live resize messages from MacVim to Vim are often dropped
|
||||
// (because too many messages are sent at once). This may lead to
|
||||
// inconsistent states between Vim and MacVim; to avoid this we send a
|
||||
@@ -520,8 +556,8 @@
|
||||
[[vimView textView] constrainRows:&constrained[0] columns:&constrained[1]
|
||||
toSize:textViewSize];
|
||||
|
||||
//NSLog(@"End of live resize, notify Vim that text dimensions are %dx%d",
|
||||
// constrained[1], constrained[0]);
|
||||
ASLogDebug(@"End of live resize, notify Vim that text dimensions are %dx%d",
|
||||
constrained[1], constrained[0]);
|
||||
|
||||
NSData *data = [NSData dataWithBytes:constrained length:2*sizeof(int)];
|
||||
BOOL sendOk = [vimController sendMessageNow:SetTextDimensionsMsgID
|
||||
@@ -532,7 +568,8 @@
|
||||
// Sending of synchronous message failed. Force the window size to
|
||||
// match the last dimensions received from Vim, otherwise we end up
|
||||
// with inconsistent states.
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]];
|
||||
[self resizeWindowToFitContentSize:[vimView desiredSize]
|
||||
keepOnScreen:NO];
|
||||
}
|
||||
|
||||
// If we saved the original title while resizing, restore it.
|
||||
@@ -571,6 +608,12 @@
|
||||
shouldResizeVimView = YES;
|
||||
}
|
||||
|
||||
- (void)setFullscreenBackgroundColor:(NSColor *)back
|
||||
{
|
||||
if (fullscreenEnabled)
|
||||
[fullscreenWindow setBackgroundColor:back];
|
||||
}
|
||||
|
||||
- (void)setBuffersModified:(BOOL)mod
|
||||
{
|
||||
// NOTE: We only set the document edited flag on the decorated window since
|
||||
@@ -654,6 +697,34 @@
|
||||
[NSNumber numberWithInt:NSSizeDownFontAction]];
|
||||
}
|
||||
|
||||
- (IBAction)findAndReplace:(id)sender
|
||||
{
|
||||
int tag = [sender tag];
|
||||
MMFindReplaceController *fr = [MMFindReplaceController sharedInstance];
|
||||
int flags = 0;
|
||||
|
||||
// NOTE: The 'flags' values must match the FRD_ defines in gui.h (except
|
||||
// for 0x100 which we use to indicate a backward search).
|
||||
switch (tag) {
|
||||
case 1: flags = 0x100; break;
|
||||
case 2: flags = 3; break;
|
||||
case 3: flags = 4; break;
|
||||
}
|
||||
|
||||
if ([fr matchWord])
|
||||
flags |= 0x08;
|
||||
if (![fr ignoreCase])
|
||||
flags |= 0x10;
|
||||
|
||||
NSDictionary *args = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[fr findString], @"find",
|
||||
[fr replaceString], @"replace",
|
||||
[NSNumber numberWithInt:flags], @"flags",
|
||||
nil];
|
||||
|
||||
[vimController sendMessage:FindReplaceMsgID data:[args dictionaryAsData]];
|
||||
}
|
||||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||
{
|
||||
if ([item action] == @selector(vimMenuItemAction:)
|
||||
@@ -691,7 +762,19 @@
|
||||
|
||||
- (void)windowDidMove:(NSNotification *)notification
|
||||
{
|
||||
if (setupDone && windowAutosaveKey) {
|
||||
if (!setupDone)
|
||||
return;
|
||||
|
||||
if (fullscreenEnabled) {
|
||||
// HACK! The full-screen is not supposed to be able to be moved. If we
|
||||
// do get here while in full-screen something unexpected happened (e.g.
|
||||
// the full-screen window was on an external display that got
|
||||
// unplugged) and we handle this situation by leaving full-screen.
|
||||
[self leaveFullscreen];
|
||||
return;
|
||||
}
|
||||
|
||||
if (windowAutosaveKey) {
|
||||
NSRect frame = [decoratedWindow frame];
|
||||
NSPoint topLeft = { frame.origin.x, NSMaxY(frame) };
|
||||
NSString *topLeftString = NSStringFromPoint(topLeft);
|
||||
@@ -701,6 +784,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (NSSize)windowWillResize:(NSWindow *)win toSize:(NSSize)proposedFrameSize
|
||||
{
|
||||
// Make sure the window isn't resized to be larger than the "visible frame"
|
||||
// for the current screen. Do this here instead of setting the window max
|
||||
// size in updateResizeConstraints since the screen's visible frame may
|
||||
// change at any time (dock could move, resolution could change, window
|
||||
// could be moved to another screen, ...).
|
||||
if (![win screen])
|
||||
return proposedFrameSize;
|
||||
|
||||
// NOTE: Not called in full-screen mode so use "visibleFrame" instead of
|
||||
// "frame".
|
||||
NSRect maxFrame = [self constrainFrame:[[win screen] visibleFrame]];
|
||||
|
||||
if (proposedFrameSize.width > maxFrame.size.width)
|
||||
proposedFrameSize.width = maxFrame.size.width;
|
||||
if (proposedFrameSize.height > maxFrame.size.height)
|
||||
proposedFrameSize.height = maxFrame.size.height;
|
||||
|
||||
return proposedFrameSize;
|
||||
}
|
||||
|
||||
- (void)windowDidResize:(id)sender
|
||||
{
|
||||
if (!setupDone || fullscreenEnabled) return;
|
||||
@@ -727,6 +832,11 @@
|
||||
BOOL zoomBoth = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMZoomBothKey];
|
||||
|
||||
// The "default frame" represents the maximal size of a zoomed window.
|
||||
// Constrain this frame so that the content fits an even number of rows and
|
||||
// columns.
|
||||
frame = [self constrainFrame:frame];
|
||||
|
||||
if (!((zoomBoth && !cmdLeftClick) || (!zoomBoth && cmdLeftClick))) {
|
||||
// Zoom in horizontal direction only.
|
||||
NSRect currentFrame = [win frame];
|
||||
@@ -734,16 +844,6 @@
|
||||
frame.origin.x = currentFrame.origin.x;
|
||||
}
|
||||
|
||||
// HACK! The window frame is often higher than the 'defaultFrame' (the fact
|
||||
// that 'defaultFrame' doesn't cover the entire area up to the menu bar
|
||||
// seems like a Cocoa bug). To ensure that the window doesn't move
|
||||
// downwards when the zoom button is clicked we check for this situation
|
||||
// and return a frame whose max Y coordinate is no lower than the current
|
||||
// max Y coordinate.
|
||||
float delta = NSMaxY([win frame]) - NSMaxY(frame);
|
||||
if (delta > 0)
|
||||
frame.origin.y += delta;
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
@@ -771,6 +871,20 @@
|
||||
return [self askBackendForStarRegister:pboard];
|
||||
}
|
||||
|
||||
- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard
|
||||
{
|
||||
// Replace the current selection with the text on the pasteboard.
|
||||
NSArray *types = [pboard types];
|
||||
if ([types containsObject:NSStringPboardType]) {
|
||||
NSString *input = [NSString stringWithFormat:@"s%@",
|
||||
[pboard stringForType:NSStringPboardType]];
|
||||
[vimController addVimInput:input];
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end // MMWindowController
|
||||
|
||||
|
||||
@@ -787,6 +901,7 @@
|
||||
}
|
||||
|
||||
- (void)resizeWindowToFitContentSize:(NSSize)contentSize
|
||||
keepOnScreen:(BOOL)onScreen
|
||||
{
|
||||
NSRect frame = [decoratedWindow frame];
|
||||
NSRect contentRect = [decoratedWindow contentRectForFrameRect:frame];
|
||||
@@ -795,14 +910,47 @@
|
||||
contentRect.origin.y -= contentSize.height - contentRect.size.height;
|
||||
contentRect.size = contentSize;
|
||||
|
||||
frame = [decoratedWindow frameRectForContentRect:contentRect];
|
||||
[decoratedWindow setFrame:frame display:YES];
|
||||
NSRect newFrame = [decoratedWindow frameRectForContentRect:contentRect];
|
||||
|
||||
if ([decoratedWindow screen]) {
|
||||
// Ensure that the window fits inside the visible part of the screen.
|
||||
// NOTE: Not called in full-screen mode so use "visibleFrame' instead
|
||||
// of "frame".
|
||||
NSRect maxFrame = [[decoratedWindow screen] visibleFrame];
|
||||
maxFrame = [self constrainFrame:maxFrame];
|
||||
|
||||
if (newFrame.size.width > maxFrame.size.width) {
|
||||
newFrame.size.width = maxFrame.size.width;
|
||||
newFrame.origin.x = maxFrame.origin.x;
|
||||
}
|
||||
if (newFrame.size.height > maxFrame.size.height) {
|
||||
newFrame.size.height = maxFrame.size.height;
|
||||
newFrame.origin.y = maxFrame.origin.y;
|
||||
}
|
||||
|
||||
if (onScreen) {
|
||||
if (newFrame.origin.y < maxFrame.origin.y)
|
||||
newFrame.origin.y = maxFrame.origin.y;
|
||||
if (NSMaxX(newFrame) > NSMaxX(maxFrame))
|
||||
newFrame.origin.x = NSMaxX(maxFrame) - newFrame.size.width;
|
||||
}
|
||||
}
|
||||
|
||||
[decoratedWindow setFrame:newFrame display:YES];
|
||||
}
|
||||
|
||||
- (NSSize)constrainContentSizeToScreenSize:(NSSize)contentSize
|
||||
{
|
||||
NSWindow *win = [self window];
|
||||
NSRect rect = [win contentRectForFrameRect:[[win screen] visibleFrame]];
|
||||
if (![win screen])
|
||||
return contentSize;
|
||||
|
||||
// NOTE: This may be called in both windowed and full-screen mode. The
|
||||
// "visibleFrame" method does not overlap menu and dock so should not be
|
||||
// used in full-screen.
|
||||
NSRect screenRect = fullscreenEnabled ? [[win screen] frame]
|
||||
: [[win screen] visibleFrame];
|
||||
NSRect rect = [win contentRectForFrameRect:screenRect];
|
||||
|
||||
if (contentSize.height > rect.size.height)
|
||||
contentSize.height = rect.size.height;
|
||||
@@ -812,6 +960,21 @@
|
||||
return contentSize;
|
||||
}
|
||||
|
||||
- (NSRect)constrainFrame:(NSRect)frame
|
||||
{
|
||||
// Constrain the given (window) frame so that it fits an even number of
|
||||
// rows and columns.
|
||||
NSRect contentRect = [decoratedWindow contentRectForFrameRect:frame];
|
||||
NSSize constrainedSize = [vimView constrainRows:NULL
|
||||
columns:NULL
|
||||
toSize:contentRect.size];
|
||||
|
||||
contentRect.origin.y += contentRect.size.height - constrainedSize.height;
|
||||
contentRect.size = constrainedSize;
|
||||
|
||||
return [decoratedWindow frameRectForContentRect:contentRect];
|
||||
}
|
||||
|
||||
- (void)updateResizeConstraints
|
||||
{
|
||||
if (!setupDone) return;
|
||||
@@ -840,8 +1003,9 @@
|
||||
@try {
|
||||
reply = [backendProxy starRegisterToPasteboard:pb];
|
||||
}
|
||||
@catch (NSException *e) {
|
||||
NSLog(@"WARNING: Caught exception in %s: \"%@\"", _cmd, e);
|
||||
@catch (NSException *ex) {
|
||||
ASLogNotice(@"starRegisterToPasteboard: failed: pid=%d reason=%@",
|
||||
[vimController pid], ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,4 +1059,30 @@
|
||||
[vimController addVimInput:input];
|
||||
}
|
||||
|
||||
- (void)updateToolbar
|
||||
{
|
||||
NSToolbar *toolbar = [decoratedWindow toolbar];
|
||||
if (nil == toolbar || 0 == updateToolbarFlag) return;
|
||||
|
||||
// Positive flag shows toolbar, negative hides it.
|
||||
BOOL on = updateToolbarFlag > 0 ? YES : NO;
|
||||
[toolbar setVisible:on];
|
||||
|
||||
if (([decoratedWindow styleMask] & NSTexturedBackgroundWindowMask) == 0) {
|
||||
if (!on) {
|
||||
[self hideTablineSeparator:YES];
|
||||
} else {
|
||||
[self hideTablineSeparator:![[vimView tabBarControl] isHidden]];
|
||||
}
|
||||
} else {
|
||||
// Textured windows don't have a line below there title bar, so we
|
||||
// need the separator in this case as well. In fact, the only case
|
||||
// where we don't need the separator is when the tab bar control
|
||||
// is visible (because it brings its own separator).
|
||||
[self hideTablineSeparator:![[vimView tabBarControl] isHidden]];
|
||||
}
|
||||
|
||||
updateToolbarFlag = 0;
|
||||
}
|
||||
|
||||
@end // MMWindowController (Private)
|
||||
|
||||
+160
-32
@@ -9,14 +9,27 @@
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <asl.h>
|
||||
|
||||
|
||||
//
|
||||
// Enable support for MacVim plugins (not to be confused with Vim plugins!).
|
||||
// Uncomment to enable support for MacVim plugins (not to be confused with Vim
|
||||
// plugins!).
|
||||
//
|
||||
#define MM_ENABLE_PLUGINS
|
||||
//#define MM_ENABLE_PLUGINS
|
||||
|
||||
|
||||
// Taken from /usr/include/AvailabilityMacros.h
|
||||
#ifndef MAC_OS_X_VERSION_10_4
|
||||
# define MAC_OS_X_VERSION_10_4 1040
|
||||
#endif
|
||||
#ifndef MAC_OS_X_VERSION_10_5
|
||||
# define MAC_OS_X_VERSION_10_5 1050
|
||||
#endif
|
||||
#ifndef MAC_OS_X_VERSION_10_6
|
||||
# define MAC_OS_X_VERSION_10_6 1060
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// This is the protocol MMBackend implements.
|
||||
@@ -33,7 +46,6 @@
|
||||
//
|
||||
@protocol MMBackendProtocol
|
||||
- (oneway void)processInput:(int)msgid data:(in bycopy NSData *)data;
|
||||
- (oneway void)processInputAndData:(in bycopy NSArray *)messages;
|
||||
- (oneway void)setDialogReturn:(in bycopy id)obj;
|
||||
- (NSString *)evaluateExpression:(in bycopy NSString *)expr;
|
||||
- (id)evaluateExpressionCocoa:(in bycopy NSString *)expr
|
||||
@@ -42,30 +54,23 @@
|
||||
- (oneway void)acknowledgeConnection;
|
||||
@end
|
||||
|
||||
//
|
||||
// This is the protocol MMVimController implements.
|
||||
//
|
||||
// Be very careful if you want to add methods to this protocol. Since DO
|
||||
// messages may arrive while Cocoa is in the middle of processing some other
|
||||
// message be sure to consider reentrancy issues. Look at processCommandQueue:
|
||||
// to see an example of how to deal with this.
|
||||
//
|
||||
@protocol MMFrontendProtocol
|
||||
- (oneway void)processCommandQueue:(in bycopy NSArray *)queue;
|
||||
- (oneway void)showSavePanelWithAttributes:(in bycopy NSDictionary *)attr;
|
||||
- (oneway void)presentDialogWithAttributes:(in bycopy NSDictionary *)attr;
|
||||
@end
|
||||
|
||||
|
||||
//
|
||||
// This is the protocol MMAppController implements.
|
||||
//
|
||||
// It handles connections between MacVim and Vim.
|
||||
// It handles connections between MacVim and Vim and communication from Vim to
|
||||
// MacVim.
|
||||
//
|
||||
// Do not add methods to this interface without a _very_ good reason (if
|
||||
// possible, instead add a new message to the *MsgID enum below and pass it via
|
||||
// processInput:forIdentifier). Methods should not modify the state directly
|
||||
// but should instead delay any potential modifications (see
|
||||
// connectBackend:pid: and processInput:forIdentifier:).
|
||||
//
|
||||
@protocol MMAppProtocol
|
||||
- (byref id <MMFrontendProtocol>)
|
||||
connectBackend:(byref in id <MMBackendProtocol>)backend
|
||||
pid:(int)pid;
|
||||
- (unsigned)connectBackend:(byref in id <MMBackendProtocol>)proxy pid:(int)pid;
|
||||
- (oneway void)processInput:(in bycopy NSArray *)queue
|
||||
forIdentifier:(unsigned)identifier;
|
||||
- (NSArray *)serverList;
|
||||
@end
|
||||
|
||||
@@ -109,10 +114,8 @@
|
||||
extern char *MessageStrings[];
|
||||
|
||||
enum {
|
||||
OpenWindowMsgID = 1,
|
||||
InsertTextMsgID,
|
||||
OpenWindowMsgID = 1, // NOTE: FIRST IN ENUM MUST BE 1
|
||||
KeyDownMsgID,
|
||||
CmdKeyMsgID,
|
||||
BatchDrawMsgID,
|
||||
SelectTabMsgID,
|
||||
CloseTabMsgID,
|
||||
@@ -121,7 +124,11 @@ enum {
|
||||
UpdateTabBarMsgID,
|
||||
ShowTabBarMsgID,
|
||||
HideTabBarMsgID,
|
||||
SetTextRowsMsgID,
|
||||
SetTextColumnsMsgID,
|
||||
SetTextDimensionsMsgID,
|
||||
LiveResizeMsgID,
|
||||
SetTextDimensionsReplyMsgID,
|
||||
SetWindowTitleMsgID,
|
||||
ScrollWheelMsgID,
|
||||
MouseDownMsgID,
|
||||
@@ -164,18 +171,29 @@ enum {
|
||||
SetPreEditPositionMsgID,
|
||||
TerminateNowMsgID,
|
||||
XcodeModMsgID,
|
||||
LiveResizeMsgID,
|
||||
EnableAntialiasMsgID,
|
||||
DisableAntialiasMsgID,
|
||||
SetVimStateMsgID,
|
||||
SetDocumentFilenameMsgID,
|
||||
OpenWithArgumentsMsgID,
|
||||
CloseWindowMsgID,
|
||||
SetFullscreenColorMsgID,
|
||||
ShowFindReplaceDialogMsgID,
|
||||
FindReplaceMsgID,
|
||||
ActivateKeyScriptMsgID,
|
||||
DeactivateKeyScriptMsgID,
|
||||
EnableImControlMsgID,
|
||||
DisableImControlMsgID,
|
||||
ActivatedImMsgID,
|
||||
DeactivatedImMsgID,
|
||||
BrowseForFileMsgID,
|
||||
ShowDialogMsgID,
|
||||
NetBeansMsgID,
|
||||
SetMarkedTextMsgID,
|
||||
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
|
||||
};
|
||||
|
||||
|
||||
#define DRAW_WIDE 0x40 /* draw wide text */
|
||||
|
||||
enum {
|
||||
ClearAllDrawType = 1,
|
||||
ClearBlockDrawType,
|
||||
@@ -202,20 +220,47 @@ enum {
|
||||
ToolbarSizeRegularFlag = 4
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
MMTabLabel = 0,
|
||||
MMTabToolTip,
|
||||
MMTabInfoCount
|
||||
};
|
||||
|
||||
|
||||
// Create a string holding the labels of all messages in message queue for
|
||||
// debugging purposes (condense some messages since there may typically be LOTS
|
||||
// of them on a queue).
|
||||
NSString *debugStringForMessageQueue(NSArray *queue);
|
||||
|
||||
|
||||
// Shared user defaults (most user defaults are in Miscellaneous.h).
|
||||
// Contrary to the user defaults in Miscellaneous.h these defaults are not
|
||||
// intitialized to any default values. That is, unless the user sets them
|
||||
// these keys will not be present in the user default database.
|
||||
extern NSString *MMLogLevelKey;
|
||||
extern NSString *MMLogToStdErrKey;
|
||||
|
||||
// Argument used to stop MacVim from opening an empty window on startup
|
||||
// (techincally this is a user default but should not be used as such).
|
||||
extern NSString *MMNoWindowKey;
|
||||
|
||||
extern NSString *MMAutosaveRowsKey;
|
||||
extern NSString *MMAutosaveColumnsKey;
|
||||
extern NSString *MMRendererKey;
|
||||
|
||||
enum {
|
||||
MMRendererDefault = 0,
|
||||
MMRendererATSUI,
|
||||
MMRendererCoreText
|
||||
};
|
||||
|
||||
|
||||
// Vim pasteboard type (holds motion type + string)
|
||||
extern NSString *VimPBoardType;
|
||||
|
||||
|
||||
|
||||
// Loads all fonts in the Resouces folder of the app bundle and returns a font
|
||||
// container reference (which should be used to deactivate the loaded fonts).
|
||||
ATSFontContainerRef loadFonts();
|
||||
|
||||
|
||||
|
||||
@interface NSString (MMExtras)
|
||||
- (NSString *)stringByEscapingSpecialFilenameCharacters;
|
||||
@@ -253,3 +298,86 @@ ATSFontContainerRef loadFonts();
|
||||
|
||||
// MacVim Apple Event Constants
|
||||
#define keyMMUntitledWindow 'MMuw'
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef NSINTEGER_DEFINED
|
||||
// NSInteger was introduced in 10.5
|
||||
# if __LP64__ || NS_BUILD_32_LIKE_64
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
# else
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
# endif
|
||||
# define NSINTEGER_DEFINED 1
|
||||
#endif
|
||||
|
||||
#ifndef NSAppKitVersionNumber10_4 // Needed for pre-10.5 SDK
|
||||
# define NSAppKitVersionNumber10_4 824
|
||||
#endif
|
||||
|
||||
#ifndef CGFLOAT_DEFINED
|
||||
// On Leopard, CGFloat is float on 32bit and double on 64bit. On Tiger,
|
||||
// we can't use this anyways, so it's just here to keep the compiler happy.
|
||||
// However, when we're compiling for Tiger and running on Leopard, we
|
||||
// might need the correct typedef, so this piece is copied from ATSTypes.h
|
||||
# ifdef __LP64__
|
||||
typedef double CGFloat;
|
||||
# else
|
||||
typedef float CGFloat;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
// Logging related functions and macros.
|
||||
//
|
||||
// This is a very simplistic logging facility built on top of ASL. Two user
|
||||
// defaults allow for changing the local log filter level (MMLogLevel) and
|
||||
// whether logs should be sent to stderr (MMLogToStdErr). (These user defaults
|
||||
// are only checked during startup.) The default is to block level 6 (info)
|
||||
// and 7 (debug) logs and _not_ to send logs to stderr. Apart from this
|
||||
// "syslog" (see "man syslog") can be used to modify the ASL filters (it is
|
||||
// currently not possible to change the local filter at runtime). For example:
|
||||
// Enable all logs to reach the ASL database (by default 'debug' and 'info'
|
||||
// are filtered out, see "man syslogd"):
|
||||
// $ sudo syslog -c syslogd -d
|
||||
// Reset the ASL database filter:
|
||||
// $ sudo syslog -c syslogd off
|
||||
// Change the master filter to block logs less severe than errors:
|
||||
// $ sudo syslog -c 0 -e
|
||||
// Change per-process filter for running MacVim process to block logs less
|
||||
// severe than warnings:
|
||||
// $ syslog -c MacVim -w
|
||||
//
|
||||
// Note that there are four ASL filters:
|
||||
// 1) The ASL database filter (syslog -c syslogd ...)
|
||||
// 2) The master filter (syslog -c 0 ...)
|
||||
// 3) The per-process filter (syslog -c PID ...)
|
||||
// 4) The local filter (MMLogLevel)
|
||||
//
|
||||
// To view the logs, either use "Console.app" or the "syslog" command:
|
||||
// $ syslog -w | grep Vim
|
||||
// To get the logs to show up in Xcode enable the MMLogToStdErr user default.
|
||||
|
||||
extern int ASLogLevel;
|
||||
|
||||
void ASLInit();
|
||||
|
||||
#define ASLog(level, fmt, ...) \
|
||||
if (level <= ASLogLevel) { \
|
||||
asl_log(NULL, NULL, level, "%s@%d: %s", \
|
||||
__PRETTY_FUNCTION__, __LINE__, \
|
||||
[[NSString stringWithFormat:fmt, ##__VA_ARGS__] UTF8String]); \
|
||||
}
|
||||
|
||||
// Note: These macros are used like ASLogErr(@"text num=%d", 42). Objective-C
|
||||
// style specifiers (%@) are supported.
|
||||
#define ASLogCrit(fmt, ...) ASLog(ASL_LEVEL_CRIT, fmt, ##__VA_ARGS__)
|
||||
#define ASLogErr(fmt, ...) ASLog(ASL_LEVEL_ERR, fmt, ##__VA_ARGS__)
|
||||
#define ASLogWarn(fmt, ...) ASLog(ASL_LEVEL_WARNING, fmt, ##__VA_ARGS__)
|
||||
#define ASLogNotice(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
#define ASLogInfo(fmt, ...) ASLog(ASL_LEVEL_INFO, fmt, ##__VA_ARGS__)
|
||||
#define ASLogDebug(fmt, ...) ASLog(ASL_LEVEL_DEBUG, fmt, ##__VA_ARGS__)
|
||||
#define ASLogTmp(fmt, ...) ASLog(ASL_LEVEL_NOTICE, fmt, ##__VA_ARGS__)
|
||||
|
||||
+92
-28
@@ -13,13 +13,12 @@
|
||||
|
||||
#import "MacVim.h"
|
||||
|
||||
|
||||
char *MessageStrings[] =
|
||||
{
|
||||
"INVALID MESSAGE ID",
|
||||
"OpenWindowMsgID",
|
||||
"InsertTextMsgID",
|
||||
"KeyDownMsgID",
|
||||
"CmdKeyMsgID",
|
||||
"BatchDrawMsgID",
|
||||
"SelectTabMsgID",
|
||||
"CloseTabMsgID",
|
||||
@@ -28,7 +27,11 @@ char *MessageStrings[] =
|
||||
"UpdateTabBarMsgID",
|
||||
"ShowTabBarMsgID",
|
||||
"HideTabBarMsgID",
|
||||
"SetTextRowsMsgID",
|
||||
"SetTextColumnsMsgID",
|
||||
"SetTextDimensionsMsgID",
|
||||
"LiveResizeMsgID",
|
||||
"SetTextDimensionsReplyMsgID",
|
||||
"SetWindowTitleMsgID",
|
||||
"ScrollWheelMsgID",
|
||||
"MouseDownMsgID",
|
||||
@@ -71,56 +74,86 @@ char *MessageStrings[] =
|
||||
"SetPreEditPositionMsgID",
|
||||
"TerminateNowMsgID",
|
||||
"XcodeModMsgID",
|
||||
"LiveResizeMsgID",
|
||||
"EnableAntialiasMsgID",
|
||||
"DisableAntialiasMsgID",
|
||||
"SetVimStateMsgID",
|
||||
"SetDocumentFilenameMsgID",
|
||||
"OpenWithArgumentsMsgID",
|
||||
"CloseWindowMsgID",
|
||||
"SetFullscreenColorMsgID",
|
||||
"ShowFindReplaceDialogMsgID",
|
||||
"FindReplaceMsgID",
|
||||
"ActivateKeyScriptMsgID",
|
||||
"DeactivateKeyScriptMsgID",
|
||||
"EnableImControlMsgID",
|
||||
"DisableImControlMsgID",
|
||||
"ActivatedImMsgID",
|
||||
"DeactivatedImMsgID",
|
||||
"BrowseForFileMsgID",
|
||||
"ShowDialogMsgID",
|
||||
"NetBeansMsgID",
|
||||
"SetMarkedTextMsgID",
|
||||
"END OF MESSAGE IDs" // NOTE: Must be last!
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
NSString *MMLogLevelKey = @"MMLogLevel";
|
||||
NSString *MMLogToStdErrKey = @"MMLogToStdErr";
|
||||
|
||||
// Argument used to stop MacVim from opening an empty window on startup
|
||||
// (techincally this is a user default but should not be used as such).
|
||||
NSString *MMNoWindowKey = @"MMNoWindow";
|
||||
|
||||
NSString *MMAutosaveRowsKey = @"MMAutosaveRows";
|
||||
NSString *MMAutosaveColumnsKey = @"MMAutosaveColumns";
|
||||
NSString *MMRendererKey = @"MMRenderer";
|
||||
|
||||
// Vim pasteboard type (holds motion type + string)
|
||||
NSString *VimPBoardType = @"VimPBoardType";
|
||||
|
||||
int ASLogLevel = ASL_LEVEL_NOTICE;
|
||||
|
||||
|
||||
|
||||
ATSFontContainerRef
|
||||
loadFonts()
|
||||
// Create a string holding the labels of all messages in message queue for
|
||||
// debugging purposes (condense some messages since there may typically be LOTS
|
||||
// of them on a queue).
|
||||
NSString *
|
||||
debugStringForMessageQueue(NSArray *queue)
|
||||
{
|
||||
// This loads all fonts from the Resources folder. The fonts are only
|
||||
// available to the process which loaded them, so loading has to be done
|
||||
// once for MacVim and an additional time for each Vim process. The
|
||||
// returned container ref should be used to deactiave the font.
|
||||
//
|
||||
// (Code taken from cocoadev.com)
|
||||
ATSFontContainerRef fontContainerRef = 0;
|
||||
NSString *fontsFolder = [[NSBundle mainBundle] resourcePath];
|
||||
if (fontsFolder) {
|
||||
NSURL *fontsURL = [NSURL fileURLWithPath:fontsFolder];
|
||||
if (fontsURL) {
|
||||
FSRef fsRef;
|
||||
FSSpec fsSpec;
|
||||
CFURLGetFSRef((CFURLRef)fontsURL, &fsRef);
|
||||
|
||||
if (FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, &fsSpec,
|
||||
NULL) == noErr) {
|
||||
ATSFontActivateFromFileSpecification(&fsSpec,
|
||||
kATSFontContextLocal, kATSFontFormatUnspecified, NULL,
|
||||
kATSOptionFlagsDefault, &fontContainerRef);
|
||||
}
|
||||
}
|
||||
NSMutableString *s = [NSMutableString new];
|
||||
unsigned i, count = [queue count];
|
||||
int item = 0, menu = 0, enable = 0, remove = 0;
|
||||
int sets = 0, sett = 0, shows = 0, cres = 0, dess = 0;
|
||||
for (i = 0; i < count; i += 2) {
|
||||
NSData *value = [queue objectAtIndex:i];
|
||||
int msgid = *((int*)[value bytes]);
|
||||
if (msgid < 1 || msgid >= LastMsgID)
|
||||
continue;
|
||||
if (msgid == AddMenuItemMsgID) ++item;
|
||||
else if (msgid == AddMenuMsgID) ++menu;
|
||||
else if (msgid == EnableMenuItemMsgID) ++enable;
|
||||
else if (msgid == RemoveMenuItemMsgID) ++remove;
|
||||
else if (msgid == SetScrollbarPositionMsgID) ++sets;
|
||||
else if (msgid == SetScrollbarThumbMsgID) ++sett;
|
||||
else if (msgid == ShowScrollbarMsgID) ++shows;
|
||||
else if (msgid == CreateScrollbarMsgID) ++cres;
|
||||
else if (msgid == DestroyScrollbarMsgID) ++dess;
|
||||
else [s appendFormat:@"%s ", MessageStrings[msgid]];
|
||||
}
|
||||
if (item > 0) [s appendFormat:@"AddMenuItemMsgID(%d) ", item];
|
||||
if (menu > 0) [s appendFormat:@"AddMenuMsgID(%d) ", menu];
|
||||
if (enable > 0) [s appendFormat:@"EnableMenuItemMsgID(%d) ", enable];
|
||||
if (remove > 0) [s appendFormat:@"RemoveMenuItemMsgID(%d) ", remove];
|
||||
if (sets > 0) [s appendFormat:@"SetScrollbarPositionMsgID(%d) ", sets];
|
||||
if (sett > 0) [s appendFormat:@"SetScrollbarThumbMsgID(%d) ", sett];
|
||||
if (shows > 0) [s appendFormat:@"ShowScrollbarMsgID(%d) ", shows];
|
||||
if (cres > 0) [s appendFormat:@"CreateScrollbarMsgID(%d) ", cres];
|
||||
if (dess > 0) [s appendFormat:@"DestroyScrollbarMsgID(%d) ", dess];
|
||||
|
||||
return fontContainerRef;
|
||||
return [s autorelease];
|
||||
}
|
||||
|
||||
|
||||
@@ -233,3 +266,34 @@ loadFonts()
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
ASLInit()
|
||||
{
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
// Allow for changing the log level via user defaults. If no key is found
|
||||
// the default log level will be used (which for ASL is to log everything
|
||||
// up to ASL_LEVEL_NOTICE). This key is an integer which corresponds to
|
||||
// the ASL_LEVEL_* macros (0 is most severe, 7 is debug level).
|
||||
id logLevelObj = [ud objectForKey:MMLogLevelKey];
|
||||
if (logLevelObj) {
|
||||
int logLevel = [logLevelObj intValue];
|
||||
if (logLevel < 0) logLevel = 0;
|
||||
if (logLevel > ASL_LEVEL_DEBUG) logLevel = ASL_LEVEL_DEBUG;
|
||||
|
||||
ASLogLevel = logLevel;
|
||||
asl_set_filter(NULL, ASL_FILTER_MASK_UPTO(logLevel));
|
||||
}
|
||||
|
||||
// Allow for changing whether a copy of each log should be sent to stderr
|
||||
// (this defaults to NO if this key is missing in the user defaults
|
||||
// database). The above filter mask is applied to logs going to stderr,
|
||||
// contrary to how "vanilla" ASL works.
|
||||
BOOL logToStdErr = [ud boolForKey:MMLogToStdErrKey];
|
||||
if (logToStdErr)
|
||||
asl_add_log_file(NULL, 2); // The file descriptor for stderr is 2
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
0395A95A0D74D47B00881434 /* Integration.png in Resources */ = {isa = PBXBuildFile; fileRef = 0395A9590D74D47B00881434 /* Integration.png */; };
|
||||
0395A9BF0D75D02400881434 /* AuthorizedShellCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395A9BE0D75D02400881434 /* AuthorizedShellCommand.m */; };
|
||||
0395A9C30D75D04D00881434 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395A9C20D75D04D00881434 /* Security.framework */; };
|
||||
0395AA780D76E77800881434 /* Info in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0395AA770D76E77800881434 /* Info */; };
|
||||
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0395AA210D76E22700881434 /* Edit in ODBEditor.bundle */; };
|
||||
0395AA780D76E77800881434 /* Info in Copy ODBEditor */ = {isa = PBXBuildFile; fileRef = 0395AA770D76E77800881434 /* Info */; };
|
||||
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in Copy ODBEditor */ = {isa = PBXBuildFile; fileRef = 0395AA210D76E22700881434 /* Edit in ODBEditor.bundle */; };
|
||||
1D09AB420C6A4D520045497E /* MMTypesetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D09AB400C6A4D520045497E /* MMTypesetter.m */; };
|
||||
1D0E051C0BA5F83800B6049E /* Colors.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D0E051B0BA5F83800B6049E /* Colors.plist */; };
|
||||
1D145C7F0E5227CE00691AA0 /* MMTextViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D145C7E0E5227CE00691AA0 /* MMTextViewHelper.m */; };
|
||||
@@ -24,30 +24,21 @@
|
||||
1D1474B60C56796D0038FA2B /* MMVimController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D1474B40C56796D0038FA2B /* MMVimController.m */; };
|
||||
1D1474BC0C567A910038FA2B /* MMWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D1474BA0C567A910038FA2B /* MMWindowController.m */; };
|
||||
1D22374B0E45DF4800E6FFFF /* Advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = 1D22374A0E45DF4800E6FFFF /* Advanced.png */; };
|
||||
1D384A0E100D671700D3C22F /* KeyBinding.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D384A0D100D671700D3C22F /* KeyBinding.plist */; };
|
||||
1D3D19110CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190D0CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf */; };
|
||||
1D3D19120CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */; };
|
||||
1D3D19130CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */; };
|
||||
1D3D19140CA690FF0004A0A5 /* DejaVuSansMono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */; };
|
||||
1D493D580C5247BF00AB718C /* Vim in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D493D570C5247BF00AB718C /* Vim */; };
|
||||
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
|
||||
1D71ACB40BC702AB002F2B60 /* doc-bm-c.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */; };
|
||||
1D71ACB50BC702AC002F2B60 /* doc-bm-h.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */; };
|
||||
1D71ACB60BC702AC002F2B60 /* doc-bm-html.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */; };
|
||||
1D71ACB70BC702AC002F2B60 /* doc-bm-java.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */; };
|
||||
1D71ACB80BC702AC002F2B60 /* doc-bm-php.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */; };
|
||||
1D71ACB90BC702AC002F2B60 /* doc-bm-pl.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */; };
|
||||
1D71ACBA0BC702AC002F2B60 /* doc-bm-sh.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */; };
|
||||
1D71ACBB0BC702AC002F2B60 /* doc-bm-tex.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */; };
|
||||
1D71ACBC0BC702AC002F2B60 /* doc-bm-txt.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */; };
|
||||
1D71ACBD0BC702AC002F2B60 /* doc-bm-xml.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */; };
|
||||
1D71ACBE0BC702AC002F2B60 /* doc-bm.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB30BC702AB002F2B60 /* doc-bm.icns */; };
|
||||
1D7F74580E4CE1AE003225C6 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D7F74570E4CE1AE003225C6 /* Sparkle.framework */; };
|
||||
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D7F74570E4CE1AE003225C6 /* Sparkle.framework */; };
|
||||
1D493D580C5247BF00AB718C /* Vim in Copy Executables */ = {isa = PBXBuildFile; fileRef = 1D493D570C5247BF00AB718C /* Vim */; };
|
||||
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
|
||||
1D60088B0E96A0B2003763F0 /* MMFindReplaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */; };
|
||||
1D80591F0E1185EA001699D1 /* Miscellaneous.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80591D0E1185EA001699D1 /* Miscellaneous.m */; };
|
||||
1D80FBD40CBBD3B700102A1C /* MMFullscreenWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80FBD00CBBD3B700102A1C /* MMFullscreenWindow.m */; };
|
||||
1D80FBD60CBBD3B700102A1C /* MMVimView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80FBD20CBBD3B700102A1C /* MMVimView.m */; };
|
||||
1D80FBE40CBBD6F200102A1C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D80FBE30CBBD6F200102A1C /* Carbon.framework */; };
|
||||
1D8B5A53104AF9FF002E59D5 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D8B5A52104AF9FF002E59D5 /* Carbon.framework */; };
|
||||
1D8BEA74104992290069B072 /* FindAndReplace.nib in Resources */ = {isa = PBXBuildFile; fileRef = 1D8BEA73104992290069B072 /* FindAndReplace.nib */; };
|
||||
1D9918490D299F9900A96335 /* MMAtsuiTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D9918470D299F9900A96335 /* MMAtsuiTextView.m */; };
|
||||
1D9C60520EF79C0C0034AD44 /* MacVim.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D9C602E0EF79C0C0034AD44 /* MacVim.icns */; };
|
||||
1DCD00BF0E50B2B700460166 /* Attention.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AA0E50B2B700460166 /* Attention.png */; };
|
||||
1DCD00C00E50B2B700460166 /* Copy.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AB0E50B2B700460166 /* Copy.png */; };
|
||||
1DCD00C10E50B2B700460166 /* Cut.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AC0E50B2B700460166 /* Cut.png */; };
|
||||
@@ -70,18 +61,17 @@
|
||||
1DCD00D20E50B2B700460166 /* TagJump.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BD0E50B2B700460166 /* TagJump.png */; };
|
||||
1DCD00D30E50B2B700460166 /* Undo.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BE0E50B2B700460166 /* Undo.png */; };
|
||||
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 1DD04DEB0C529C5E006CDC2B /* Credits.rtf */; };
|
||||
1DD0C20C0C60FFB4008CD84A /* gvimrc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
|
||||
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
|
||||
1DD3D51E0D82D4C9006E4320 /* ibeam.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DD3D51D0D82D4C9006E4320 /* ibeam.png */; };
|
||||
1DD66ECE0C803D3600EBDAB3 /* MMApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DD66ECC0C803D3600EBDAB3 /* MMApplication.m */; };
|
||||
1DD703B90BA9D15D008679E9 /* vim_gloss.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1DD703B80BA9D15D008679E9 /* vim_gloss.icns */; };
|
||||
1DD704310BA9F9C2008679E9 /* SpecialKeys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DD704300BA9F9C2008679E9 /* SpecialKeys.plist */; };
|
||||
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */; };
|
||||
1DE3F8E70D50F80500052B9E /* Preferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 1DE3F8E50D50F80500052B9E /* Preferences.nib */; };
|
||||
1DE3F8EB0D50F84600052B9E /* MMPreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE3F8E90D50F84600052B9E /* MMPreferenceController.m */; };
|
||||
1DE608B40C587FDA0055263D /* runtime in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DE602470C587FD10055263D /* runtime */; };
|
||||
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DE602470C587FD10055263D /* runtime */; };
|
||||
1DE63FFB0E71820F00959BDB /* MMCoreTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE63FFA0E71820F00959BDB /* MMCoreTextView.m */; };
|
||||
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DE8CC610C5E2AAD003F56E3 /* Actions.plist */; };
|
||||
1DE9B9500D341AB8008FEDD4 /* MMWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE9B94E0D341AB8008FEDD4 /* MMWindow.m */; };
|
||||
1DED78600C6DE43D0079945F /* vimrc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
|
||||
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
|
||||
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
@@ -128,48 +118,51 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
0395AA790D76E77800881434 /* CopyFiles */ = {
|
||||
0395AA790D76E77800881434 /* Copy ODBEditor */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "Edit in ODBEditor";
|
||||
dstSubfolderSpec = 7;
|
||||
files = (
|
||||
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in CopyFiles */,
|
||||
0395AA780D76E77800881434 /* Info in CopyFiles */,
|
||||
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in Copy ODBEditor */,
|
||||
0395AA780D76E77800881434 /* Info in Copy ODBEditor */,
|
||||
);
|
||||
name = "Copy ODBEditor";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1D0DCAD80BA3604D00B6CCFA /* CopyFiles */ = {
|
||||
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 6;
|
||||
files = (
|
||||
1D493D580C5247BF00AB718C /* Vim in CopyFiles */,
|
||||
1D493D580C5247BF00AB718C /* Vim in Copy Executables */,
|
||||
);
|
||||
name = "Copy Executables";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1D9EB2840C366D7B0074B739 /* CopyFiles */ = {
|
||||
1D9EB2840C366D7B0074B739 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in CopyFiles */,
|
||||
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in CopyFiles */,
|
||||
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1DE608B80C58807F0055263D /* CopyFiles */ = {
|
||||
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = vim;
|
||||
dstSubfolderSpec = 7;
|
||||
files = (
|
||||
1DED78600C6DE43D0079945F /* vimrc in CopyFiles */,
|
||||
1DD0C20C0C60FFB4008CD84A /* gvimrc in CopyFiles */,
|
||||
1DE608B40C587FDA0055263D /* runtime in CopyFiles */,
|
||||
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */,
|
||||
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */,
|
||||
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */,
|
||||
);
|
||||
name = "Copy Vim Runtime Files";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
@@ -188,7 +181,7 @@
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
1D09AB3F0C6A4D520045497E /* MMTypesetter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMTypesetter.h; sourceTree = "<group>"; };
|
||||
1D09AB400C6A4D520045497E /* MMTypesetter.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMTypesetter.m; sourceTree = "<group>"; };
|
||||
1D0E051B0BA5F83800B6049E /* Colors.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Colors.plist; sourceTree = "<group>"; };
|
||||
1D0E051B0BA5F83800B6049E /* Colors.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Colors.plist; sourceTree = "<group>"; };
|
||||
1D145C7D0E5227CE00691AA0 /* MMTextViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMTextViewHelper.h; sourceTree = "<group>"; };
|
||||
1D145C7E0E5227CE00691AA0 /* MMTextViewHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMTextViewHelper.m; sourceTree = "<group>"; };
|
||||
1D1474950C56703C0038FA2B /* MacVim.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MacVim.h; sourceTree = "<group>"; };
|
||||
@@ -204,33 +197,26 @@
|
||||
1D1474B90C567A910038FA2B /* MMWindowController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMWindowController.h; sourceTree = "<group>"; };
|
||||
1D1474BA0C567A910038FA2B /* MMWindowController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMWindowController.m; sourceTree = "<group>"; };
|
||||
1D22374A0E45DF4800E6FFFF /* Advanced.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Advanced.png; sourceTree = "<group>"; };
|
||||
1D384A0D100D671700D3C22F /* KeyBinding.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = KeyBinding.plist; sourceTree = "<group>"; };
|
||||
1D3D190D0CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-Bold.ttf"; path = "dejavu-ttf/DejaVuSansMono-Bold.ttf"; sourceTree = "<group>"; };
|
||||
1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-BoldOblique.ttf"; path = "dejavu-ttf/DejaVuSansMono-BoldOblique.ttf"; sourceTree = "<group>"; };
|
||||
1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-Oblique.ttf"; path = "dejavu-ttf/DejaVuSansMono-Oblique.ttf"; sourceTree = "<group>"; };
|
||||
1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = DejaVuSansMono.ttf; path = "dejavu-ttf/DejaVuSansMono.ttf"; sourceTree = "<group>"; };
|
||||
1D493D570C5247BF00AB718C /* Vim */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = Vim; path = ../Vim; sourceTree = SOURCE_ROOT; };
|
||||
1D493DB30C52533B00AB718C /* PSMTabBarControl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PSMTabBarControl.xcodeproj; path = PSMTabBarControl/PSMTabBarControl.xcodeproj; sourceTree = "<group>"; };
|
||||
1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-c.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-h.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-html.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-java.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-php.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-pl.icns"; sourceTree = "<group>"; };
|
||||
1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-sh.icns"; sourceTree = "<group>"; };
|
||||
1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-tex.icns"; sourceTree = "<group>"; };
|
||||
1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-txt.icns"; sourceTree = "<group>"; };
|
||||
1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-xml.icns"; sourceTree = "<group>"; };
|
||||
1D71ACB30BC702AB002F2B60 /* doc-bm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm.icns"; sourceTree = "<group>"; };
|
||||
1D7F74570E4CE1AE003225C6 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
|
||||
1D6008820E96886D003763F0 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/FindAndReplace.nib; sourceTree = "<group>"; };
|
||||
1D6008890E96A0B2003763F0 /* MMFindReplaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMFindReplaceController.h; sourceTree = "<group>"; };
|
||||
1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMFindReplaceController.m; sourceTree = "<group>"; };
|
||||
1D80591D0E1185EA001699D1 /* Miscellaneous.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Miscellaneous.m; sourceTree = "<group>"; };
|
||||
1D8059220E118663001699D1 /* Miscellaneous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Miscellaneous.h; sourceTree = "<group>"; };
|
||||
1D80FBCF0CBBD3B700102A1C /* MMFullscreenWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMFullscreenWindow.h; sourceTree = "<group>"; };
|
||||
1D80FBD00CBBD3B700102A1C /* MMFullscreenWindow.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMFullscreenWindow.m; sourceTree = "<group>"; };
|
||||
1D80FBD10CBBD3B700102A1C /* MMVimView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMVimView.h; sourceTree = "<group>"; };
|
||||
1D80FBD20CBBD3B700102A1C /* MMVimView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMVimView.m; sourceTree = "<group>"; };
|
||||
1D80FBE30CBBD6F200102A1C /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
|
||||
1D8B5A52104AF9FF002E59D5 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
|
||||
1D9918460D299F9900A96335 /* MMAtsuiTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMAtsuiTextView.h; sourceTree = "<group>"; };
|
||||
1D9918470D299F9900A96335 /* MMAtsuiTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMAtsuiTextView.m; sourceTree = "<group>"; };
|
||||
1D9C602E0EF79C0C0034AD44 /* MacVim.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = MacVim.icns; path = icons/MacVim.icns; sourceTree = "<group>"; };
|
||||
1DCD00AA0E50B2B700460166 /* Attention.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Attention.png; path = Toolbar/Attention.png; sourceTree = "<group>"; };
|
||||
1DCD00AB0E50B2B700460166 /* Copy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Copy.png; path = Toolbar/Copy.png; sourceTree = "<group>"; };
|
||||
1DCD00AC0E50B2B700460166 /* Cut.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Cut.png; path = Toolbar/Cut.png; sourceTree = "<group>"; };
|
||||
@@ -257,14 +243,14 @@
|
||||
1DD3D51D0D82D4C9006E4320 /* ibeam.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ibeam.png; sourceTree = "<group>"; };
|
||||
1DD66ECB0C803D3600EBDAB3 /* MMApplication.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMApplication.h; sourceTree = "<group>"; };
|
||||
1DD66ECC0C803D3600EBDAB3 /* MMApplication.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMApplication.m; sourceTree = "<group>"; };
|
||||
1DD703B80BA9D15D008679E9 /* vim_gloss.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = vim_gloss.icns; sourceTree = "<group>"; };
|
||||
1DD704300BA9F9C2008679E9 /* SpecialKeys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = SpecialKeys.plist; sourceTree = "<group>"; };
|
||||
1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = SystemColors.plist; sourceTree = "<group>"; };
|
||||
1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SystemColors.plist; sourceTree = "<group>"; };
|
||||
1DE3F8E60D50F80500052B9E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Preferences.nib; sourceTree = "<group>"; };
|
||||
1DE3F8E80D50F84600052B9E /* MMPreferenceController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMPreferenceController.h; sourceTree = "<group>"; };
|
||||
1DE3F8E90D50F84600052B9E /* MMPreferenceController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMPreferenceController.m; sourceTree = "<group>"; };
|
||||
1DE602470C587FD10055263D /* runtime */ = {isa = PBXFileReference; lastKnownFileType = folder; name = runtime; path = ../../runtime; sourceTree = SOURCE_ROOT; };
|
||||
1DE8CC610C5E2AAD003F56E3 /* Actions.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Actions.plist; sourceTree = "<group>"; };
|
||||
1DE63FF90E71820F00959BDB /* MMCoreTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMCoreTextView.h; sourceTree = "<group>"; };
|
||||
1DE63FFA0E71820F00959BDB /* MMCoreTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMCoreTextView.m; sourceTree = "<group>"; };
|
||||
1DE8CC610C5E2AAD003F56E3 /* Actions.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Actions.plist; sourceTree = "<group>"; };
|
||||
1DE9B94D0D341AB8008FEDD4 /* MMWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMWindow.h; sourceTree = "<group>"; };
|
||||
1DE9B94E0D341AB8008FEDD4 /* MMWindow.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMWindow.m; sourceTree = "<group>"; };
|
||||
1DED785F0C6DE43D0079945F /* vimrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vimrc; sourceTree = "<group>"; };
|
||||
@@ -299,9 +285,8 @@
|
||||
files = (
|
||||
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */,
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
1D80FBE40CBBD6F200102A1C /* Carbon.framework in Frameworks */,
|
||||
0395A9C30D75D04D00881434 /* Security.framework in Frameworks */,
|
||||
1D7F74580E4CE1AE003225C6 /* Sparkle.framework in Frameworks */,
|
||||
1D8B5A53104AF9FF002E59D5 /* Carbon.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -328,6 +313,10 @@
|
||||
080E96DDFE201D6D7F000001 /* MacVim Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D6008890E96A0B2003763F0 /* MMFindReplaceController.h */,
|
||||
1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */,
|
||||
1DE63FF90E71820F00959BDB /* MMCoreTextView.h */,
|
||||
1DE63FFA0E71820F00959BDB /* MMCoreTextView.m */,
|
||||
1D145C7D0E5227CE00691AA0 /* MMTextViewHelper.h */,
|
||||
1D145C7E0E5227CE00691AA0 /* MMTextViewHelper.m */,
|
||||
1D8059220E118663001699D1 /* Miscellaneous.h */,
|
||||
@@ -385,7 +374,6 @@
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D80FBE30CBBD6F200102A1C /* Carbon.framework */,
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
@@ -435,27 +423,6 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DCE78490C460C6C006305A6 /* Icons */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */,
|
||||
1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */,
|
||||
1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */,
|
||||
1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */,
|
||||
1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */,
|
||||
1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */,
|
||||
1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */,
|
||||
1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */,
|
||||
1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */,
|
||||
1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */,
|
||||
1D71ACB30BC702AB002F2B60 /* doc-bm.icns */,
|
||||
0395A8A90D72D88B00881434 /* General.png */,
|
||||
0395A9590D74D47B00881434 /* Integration.png */,
|
||||
1DD703B80BA9D15D008679E9 /* vim_gloss.icns */,
|
||||
);
|
||||
name = Icons;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DE602460C587F760055263D /* Vim Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -510,16 +477,19 @@
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D384A0D100D671700D3C22F /* KeyBinding.plist */,
|
||||
1D9C602E0EF79C0C0034AD44 /* MacVim.icns */,
|
||||
1D8BEA73104992290069B072 /* FindAndReplace.nib */,
|
||||
0395A8A90D72D88B00881434 /* General.png */,
|
||||
0395A9590D74D47B00881434 /* Integration.png */,
|
||||
1D22374A0E45DF4800E6FFFF /* Advanced.png */,
|
||||
BD9DF09F0DB2BA020025C97C /* PlugInView.nib */,
|
||||
1DD3D51D0D82D4C9006E4320 /* ibeam.png */,
|
||||
1D0F11480D58C77800D5DA09 /* Font */,
|
||||
1DCE78490C460C6C006305A6 /* Icons */,
|
||||
1DE9726C0C48050600F96A9F /* Toolbar */,
|
||||
1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */,
|
||||
1DE8CC610C5E2AAD003F56E3 /* Actions.plist */,
|
||||
1DD04DEB0C529C5E006CDC2B /* Credits.rtf */,
|
||||
1DD704300BA9F9C2008679E9 /* SpecialKeys.plist */,
|
||||
1D0E051B0BA5F83800B6049E /* Colors.plist */,
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
@@ -532,7 +502,7 @@
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1D7F74570E4CE1AE003225C6 /* Sparkle.framework */,
|
||||
1D8B5A52104AF9FF002E59D5 /* Carbon.framework */,
|
||||
0395AA980D76E86200881434 /* Edit in ODBEditor */,
|
||||
0395A9C20D75D04D00881434 /* Security.framework */,
|
||||
1D493DB30C52533B00AB718C /* PSMTabBarControl.xcodeproj */,
|
||||
@@ -552,10 +522,11 @@
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
1D0DCAD80BA3604D00B6CCFA /* CopyFiles */,
|
||||
1D9EB2840C366D7B0074B739 /* CopyFiles */,
|
||||
1DE608B80C58807F0055263D /* CopyFiles */,
|
||||
0395AA790D76E77800881434 /* CopyFiles */,
|
||||
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */,
|
||||
1D9EB2840C366D7B0074B739 /* Copy Frameworks */,
|
||||
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */,
|
||||
0395AA790D76E77800881434 /* Copy ODBEditor */,
|
||||
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -577,6 +548,13 @@
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
Swedish,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* MacVim */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
@@ -621,19 +599,6 @@
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1D0E051C0BA5F83800B6049E /* Colors.plist in Resources */,
|
||||
1DD703B90BA9D15D008679E9 /* vim_gloss.icns in Resources */,
|
||||
1DD704310BA9F9C2008679E9 /* SpecialKeys.plist in Resources */,
|
||||
1D71ACB40BC702AB002F2B60 /* doc-bm-c.icns in Resources */,
|
||||
1D71ACB50BC702AC002F2B60 /* doc-bm-h.icns in Resources */,
|
||||
1D71ACB60BC702AC002F2B60 /* doc-bm-html.icns in Resources */,
|
||||
1D71ACB70BC702AC002F2B60 /* doc-bm-java.icns in Resources */,
|
||||
1D71ACB80BC702AC002F2B60 /* doc-bm-php.icns in Resources */,
|
||||
1D71ACB90BC702AC002F2B60 /* doc-bm-pl.icns in Resources */,
|
||||
1D71ACBA0BC702AC002F2B60 /* doc-bm-sh.icns in Resources */,
|
||||
1D71ACBB0BC702AC002F2B60 /* doc-bm-tex.icns in Resources */,
|
||||
1D71ACBC0BC702AC002F2B60 /* doc-bm-txt.icns in Resources */,
|
||||
1D71ACBD0BC702AC002F2B60 /* doc-bm-xml.icns in Resources */,
|
||||
1D71ACBE0BC702AC002F2B60 /* doc-bm.icns in Resources */,
|
||||
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */,
|
||||
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */,
|
||||
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */,
|
||||
@@ -668,11 +633,32 @@
|
||||
1DCD00D10E50B2B700460166 /* SaveSesn.png in Resources */,
|
||||
1DCD00D20E50B2B700460166 /* TagJump.png in Resources */,
|
||||
1DCD00D30E50B2B700460166 /* Undo.png in Resources */,
|
||||
1D8BEA74104992290069B072 /* FindAndReplace.nib in Resources */,
|
||||
1D9C60520EF79C0C0034AD44 /* MacVim.icns in Resources */,
|
||||
1D384A0E100D671700D3C22F /* KeyBinding.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Make Document Icons";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Clear deployment target, else the python script always thinks we're building on Tiger\nunset MACOSX_DEPLOYMENT_TARGET\n\n# Generate the icons (redirect stderr to ignore warnings)\ncd $PROJECT_DIR/icons/\nmake OUTDIR=$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH 2> /dev/null\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
@@ -702,6 +688,8 @@
|
||||
BD9DF0B00DB41E780025C97C /* PlugInGUI.m in Sources */,
|
||||
BD9DF0FB0DB48C860025C97C /* CTGradient.m in Sources */,
|
||||
1D145C7F0E5227CE00691AA0 /* MMTextViewHelper.m in Sources */,
|
||||
1D60088B0E96A0B2003763F0 /* MMFindReplaceController.m in Sources */,
|
||||
1DE63FFB0E71820F00959BDB /* MMCoreTextView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -729,6 +717,14 @@
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1D8BEA73104992290069B072 /* FindAndReplace.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
1D6008820E96886D003763F0 /* English */,
|
||||
);
|
||||
name = FindAndReplace.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DE3F8E50D50F80500052B9E /* Preferences.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
@@ -748,63 +744,14 @@
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D13D1610D560D9D0084F3AB /* Universal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 34;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_3)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
|
||||
GCC_DYNAMIC_NO_PIC = YES;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
HEADER_SEARCH_PATHS = PSMTabBarControl/source/;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
PRODUCT_NAME = MacVim;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
WRAPPER_EXTENSION = app;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Universal;
|
||||
};
|
||||
1D13D1620D560D9D0084F3AB /* Universal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Universal;
|
||||
};
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 34;
|
||||
CURRENT_PROJECT_VERSION = 51;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_3)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
|
||||
@@ -813,12 +760,15 @@
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = PSMTabBarControl/source/;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = MacVim;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
WRAPPER_EXTENSION = app;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
@@ -827,16 +777,11 @@
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 34;
|
||||
CURRENT_PROJECT_VERSION = 51;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_3)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
|
||||
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
|
||||
);
|
||||
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\"";
|
||||
@@ -845,10 +790,11 @@
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
HEADER_SEARCH_PATHS = PSMTabBarControl/source/;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = MacVim;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@@ -859,8 +805,10 @@
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -868,8 +816,10 @@
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Release;
|
||||
@@ -882,7 +832,6 @@
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
1D13D1610D560D9D0084F3AB /* Universal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -892,7 +841,6 @@
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
1D13D1620D560D9D0084F3AB /* Universal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
+37
-16
@@ -12,25 +12,24 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MacVim.h"
|
||||
|
||||
#define MM_LOG_DEALLOCATIONS 0
|
||||
|
||||
// TODO: Remove this when the inline IM code has been tested
|
||||
#define INCLUDE_OLD_IM_CODE
|
||||
|
||||
#if MM_LOG_DEALLOCATIONS
|
||||
# define LOG_DEALLOC NSLog(@"%s %@", _cmd, [self className]);
|
||||
#else
|
||||
# define LOG_DEALLOC
|
||||
#endif
|
||||
// Use Core Text instead of ATSUI when compiling on 10.5+.
|
||||
// Note: Core Text was introduced with 10.5, ATSUI was deprecated on 10.6.
|
||||
#define MM_ENABLE_ATSUI (MAC_OS_X_VERSION_MIN_REQUIRED<MAC_OS_X_VERSION_10_5)
|
||||
|
||||
|
||||
// NSUserDefaults keys
|
||||
extern NSString *MMTabMinWidthKey;
|
||||
extern NSString *MMTabMaxWidthKey;
|
||||
extern NSString *MMTabOptimumWidthKey;
|
||||
extern NSString *MMShowAddTabButtonKey;
|
||||
extern NSString *MMTextInsetLeftKey;
|
||||
extern NSString *MMTextInsetRightKey;
|
||||
extern NSString *MMTextInsetTopKey;
|
||||
extern NSString *MMTextInsetBottomKey;
|
||||
extern NSString *MMTerminateAfterLastWindowClosedKey;
|
||||
extern NSString *MMTypesetterKey;
|
||||
extern NSString *MMCellWidthMultiplierKey;
|
||||
extern NSString *MMBaselineOffsetKey;
|
||||
@@ -39,7 +38,6 @@ extern NSString *MMTopLeftPointKey;
|
||||
extern NSString *MMOpenInCurrentWindowKey;
|
||||
extern NSString *MMNoFontSubstitutionKey;
|
||||
extern NSString *MMLoginShellKey;
|
||||
extern NSString *MMAtsuiRendererKey;
|
||||
extern NSString *MMUntitledWindowKey;
|
||||
extern NSString *MMTexturedWindowKey;
|
||||
extern NSString *MMZoomBothKey;
|
||||
@@ -53,6 +51,11 @@ extern NSString *MMShowLeftPlugInContainerKey;
|
||||
extern NSString *MMOpenLayoutKey;
|
||||
extern NSString *MMVerticalSplitKey;
|
||||
extern NSString *MMPreloadCacheSizeKey;
|
||||
extern NSString *MMLastWindowClosedBehaviorKey;
|
||||
extern NSString *MMLoadDefaultFontKey;
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
extern NSString *MMUseInlineImKey;
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
|
||||
|
||||
// Enum for MMUntitledWindowKey
|
||||
@@ -63,7 +66,6 @@ enum {
|
||||
MMUntitledWindowAlways = 3
|
||||
};
|
||||
|
||||
|
||||
// Enum for MMOpenLayoutKey (first 4 must match WIN_* defines in main.c)
|
||||
enum {
|
||||
MMLayoutArglist = 0,
|
||||
@@ -73,6 +75,13 @@ enum {
|
||||
MMLayoutWindows = 4,
|
||||
};
|
||||
|
||||
// Enum for MMLastWindowClosedBehaviorKey
|
||||
enum {
|
||||
MMDoNothingWhenLastWindowClosed = 0,
|
||||
MMHideWhenLastWindowClosed = 1,
|
||||
MMTerminateWhenLastWindowClosed = 2,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +96,7 @@ enum {
|
||||
@end
|
||||
|
||||
|
||||
@interface NSOpenPanel (MMExtras)
|
||||
@interface NSSavePanel (MMExtras)
|
||||
- (void)hiddenFilesButtonToggled:(id)sender;
|
||||
- (void)setShowsHiddenFiles:(BOOL)show;
|
||||
@end
|
||||
@@ -105,8 +114,8 @@ enum {
|
||||
|
||||
|
||||
@interface NSToolbar (MMExtras)
|
||||
- (int)indexOfItemWithItemIdentifier:(NSString *)identifier;
|
||||
- (NSToolbarItem *)itemAtIndex:(int)idx;
|
||||
- (NSUInteger)indexOfItemWithItemIdentifier:(NSString *)identifier;
|
||||
- (NSToolbarItem *)itemAtIndex:(NSUInteger)idx;
|
||||
- (NSToolbarItem *)itemWithItemIdentifier:(NSString *)identifier;
|
||||
@end
|
||||
|
||||
@@ -117,12 +126,24 @@ enum {
|
||||
|
||||
|
||||
@interface NSNumber (MMExtras)
|
||||
- (int)tag;
|
||||
// HACK to allow font size to be changed via menu (bound to Cmd+/Cmd-)
|
||||
- (NSInteger)tag;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
// Create a view to be used as accessory for open panel. This function assumes
|
||||
// ownership of the view so do not release it.
|
||||
NSView *openPanelAccessoryView();
|
||||
// Create a view with a "show hidden files" button to be used as accessory for
|
||||
// open/save panels. This function assumes ownership of the view so do not
|
||||
// release it.
|
||||
NSView *showHiddenFilesView();
|
||||
|
||||
|
||||
// Convert filenames (which are in a variant of decomposed form, NFD, on HFS+)
|
||||
// to normalization form C (NFC). (This is necessary because Vim does not
|
||||
// automatically compose NFD.) For more information see:
|
||||
// http://developer.apple.com/technotes/tn/tn1150.html
|
||||
// http://developer.apple.com/technotes/tn/tn1150table.html
|
||||
// http://developer.apple.com/qa/qa2001/qa1235.html
|
||||
// http://www.unicode.org/reports/tr15/
|
||||
NSString *normalizeFilename(NSString *filename);
|
||||
NSArray *normalizeFilenames(NSArray *filenames);
|
||||
|
||||
+43
-14
@@ -17,12 +17,11 @@
|
||||
NSString *MMTabMinWidthKey = @"MMTabMinWidth";
|
||||
NSString *MMTabMaxWidthKey = @"MMTabMaxWidth";
|
||||
NSString *MMTabOptimumWidthKey = @"MMTabOptimumWidth";
|
||||
NSString *MMShowAddTabButtonKey = @"MMShowAddTabButton";
|
||||
NSString *MMTextInsetLeftKey = @"MMTextInsetLeft";
|
||||
NSString *MMTextInsetRightKey = @"MMTextInsetRight";
|
||||
NSString *MMTextInsetTopKey = @"MMTextInsetTop";
|
||||
NSString *MMTextInsetBottomKey = @"MMTextInsetBottom";
|
||||
NSString *MMTerminateAfterLastWindowClosedKey
|
||||
= @"MMTerminateAfterLastWindowClosed";
|
||||
NSString *MMTypesetterKey = @"MMTypesetter";
|
||||
NSString *MMCellWidthMultiplierKey = @"MMCellWidthMultiplier";
|
||||
NSString *MMBaselineOffsetKey = @"MMBaselineOffset";
|
||||
@@ -31,7 +30,6 @@ NSString *MMTopLeftPointKey = @"MMTopLeftPoint";
|
||||
NSString *MMOpenInCurrentWindowKey = @"MMOpenInCurrentWindow";
|
||||
NSString *MMNoFontSubstitutionKey = @"MMNoFontSubstitution";
|
||||
NSString *MMLoginShellKey = @"MMLoginShell";
|
||||
NSString *MMAtsuiRendererKey = @"MMAtsuiRenderer";
|
||||
NSString *MMUntitledWindowKey = @"MMUntitledWindow";
|
||||
NSString *MMTexturedWindowKey = @"MMTexturedWindow";
|
||||
NSString *MMZoomBothKey = @"MMZoomBoth";
|
||||
@@ -45,6 +43,11 @@ NSString *MMShowLeftPlugInContainerKey = @"MMShowLeftPlugInContainer";
|
||||
NSString *MMOpenLayoutKey = @"MMOpenLayout";
|
||||
NSString *MMVerticalSplitKey = @"MMVerticalSplit";
|
||||
NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
NSString *MMLastWindowClosedBehaviorKey = @"MMLastWindowClosedBehavior";
|
||||
NSString *MMLoadDefaultFontKey = @"MMLoadDefaultFont";
|
||||
#ifdef INCLUDE_OLD_IM_CODE
|
||||
NSString *MMUseInlineImKey = @"MMUseInlineIm";
|
||||
#endif // INCLUDE_OLD_IM_CODE
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +95,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
|
||||
|
||||
|
||||
@implementation NSOpenPanel (MMExtras)
|
||||
@implementation NSSavePanel (MMExtras)
|
||||
|
||||
- (void)hiddenFilesButtonToggled:(id)sender
|
||||
{
|
||||
@@ -121,7 +124,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
[invocation invoke];
|
||||
}
|
||||
|
||||
@end // NSOpenPanel (MMExtras)
|
||||
@end // NSSavePanel (MMExtras)
|
||||
|
||||
|
||||
|
||||
@@ -199,10 +202,10 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
|
||||
@implementation NSToolbar (MMExtras)
|
||||
|
||||
- (int)indexOfItemWithItemIdentifier:(NSString *)identifier
|
||||
- (NSUInteger)indexOfItemWithItemIdentifier:(NSString *)identifier
|
||||
{
|
||||
NSArray *items = [self items];
|
||||
int i, count = [items count];
|
||||
NSUInteger i, count = [items count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
id item = [items objectAtIndex:i];
|
||||
if ([[item itemIdentifier] isEqual:identifier])
|
||||
@@ -212,7 +215,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
- (NSToolbarItem *)itemAtIndex:(int)idx
|
||||
- (NSToolbarItem *)itemAtIndex:(NSUInteger)idx
|
||||
{
|
||||
NSArray *items = [self items];
|
||||
if (idx < 0 || idx >= [items count])
|
||||
@@ -223,7 +226,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
|
||||
- (NSToolbarItem *)itemWithItemIdentifier:(NSString *)identifier
|
||||
{
|
||||
int idx = [self indexOfItemWithItemIdentifier:identifier];
|
||||
NSUInteger idx = [self indexOfItemWithItemIdentifier:identifier];
|
||||
return idx != NSNotFound ? [self itemAtIndex:idx] : nil;
|
||||
}
|
||||
|
||||
@@ -239,7 +242,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
NSArray *existingItems = [self tabViewItems];
|
||||
NSEnumerator *e = [existingItems objectEnumerator];
|
||||
NSTabViewItem *item;
|
||||
while (item = [e nextObject]){
|
||||
while ((item = [e nextObject])) {
|
||||
[self removeTabViewItem:item];
|
||||
}
|
||||
}
|
||||
@@ -251,7 +254,8 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
|
||||
@implementation NSNumber (MMExtras)
|
||||
|
||||
- (int)tag
|
||||
// HACK to allow font size to be changed via menu (bound to Cmd+/Cmd-)
|
||||
- (NSInteger)tag
|
||||
{
|
||||
return [self intValue];
|
||||
}
|
||||
@@ -262,7 +266,7 @@ NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
|
||||
|
||||
|
||||
NSView *
|
||||
openPanelAccessoryView()
|
||||
showHiddenFilesView()
|
||||
{
|
||||
// Return a new button object for each NSOpenPanel -- several of them
|
||||
// could be displayed at once.
|
||||
@@ -271,13 +275,13 @@ openPanelAccessoryView()
|
||||
NSButton *button = [[[NSButton alloc]
|
||||
initWithFrame:NSMakeRect(0, 0, 140, 18)] autorelease];
|
||||
[button setTitle:
|
||||
NSLocalizedString(@"Show Hidden Files", @"Open File Dialog")];
|
||||
NSLocalizedString(@"Show Hidden Files", @"Show Hidden Files Checkbox")];
|
||||
[button setButtonType:NSSwitchButton];
|
||||
|
||||
[button setTarget:nil];
|
||||
[button setAction:@selector(hiddenFilesButtonToggled:)];
|
||||
|
||||
// use the regular control size (checkbox is a bit smaller without this)
|
||||
// Use the regular control size (checkbox is a bit smaller without this)
|
||||
NSControlSize buttonSize = NSRegularControlSize;
|
||||
float fontSize = [NSFont systemFontSizeForControlSize:buttonSize];
|
||||
NSCell *theCell = [button cell];
|
||||
@@ -289,3 +293,28 @@ openPanelAccessoryView()
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NSString *
|
||||
normalizeFilename(NSString *filename)
|
||||
{
|
||||
return [filename precomposedStringWithCanonicalMapping];
|
||||
}
|
||||
|
||||
NSArray *
|
||||
normalizeFilenames(NSArray *filenames)
|
||||
{
|
||||
NSMutableArray *outnames = [NSMutableArray array];
|
||||
if (!filenames)
|
||||
return outnames;
|
||||
|
||||
unsigned i, count = [filenames count];
|
||||
for (i = 0; i < count; ++i) {
|
||||
NSString *nfkc = normalizeFilename([filenames objectAtIndex:i]);
|
||||
[outnames addObject:nfkc];
|
||||
}
|
||||
|
||||
return outnames;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -93,7 +93,7 @@
|
||||
13F8B88A07B434F6008AE28D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
32DBCF980370C29C00C91783 /* PSMTabBarControl_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSMTabBarControl_Prefix.pch; path = source/PSMTabBarControl_Prefix.pch; sourceTree = "<group>"; };
|
||||
53DF68FD067E5B5A0090B5B0 /* PSMTabBarControl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PSMTabBarControl.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
53DF68FE067E5B5A0090B5B0 /* PSMTabBarControlFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "PSMTabBarControlFramework-Info.plist"; sourceTree = "<group>"; };
|
||||
53DF68FE067E5B5A0090B5B0 /* PSMTabBarControlFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PSMTabBarControlFramework-Info.plist"; sourceTree = "<group>"; };
|
||||
54D33B2806778E3300C9C163 /* PSMTabBarControl.ibclassdescription */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PSMTabBarControl.ibclassdescription; sourceTree = "<group>"; };
|
||||
8D1AC9730486D14A00FE50C9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1AC97B0486D23100FE50C9 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
@@ -123,7 +123,7 @@
|
||||
A251BE930959A23A0058BC7F /* TabClose_Front_Rollover.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = TabClose_Front_Rollover.tif; path = images/TabClose_Front_Rollover.tif; sourceTree = "<group>"; };
|
||||
A251BE940959A23A0058BC7F /* TabClose_Front.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = TabClose_Front.tif; path = images/TabClose_Front.tif; sourceTree = "<group>"; };
|
||||
A251BE9B0959A2530058BC7F /* ReadMe.rtfd */ = {isa = PBXFileReference; lastKnownFileType = wrapper.rtfd; path = ReadMe.rtfd; sourceTree = "<group>"; };
|
||||
A251BEA20959BB5B0058BC7F /* TabBarControlDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "TabBarControlDemo-Info.plist"; sourceTree = "<group>"; };
|
||||
A251BEA20959BB5B0058BC7F /* TabBarControlDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabBarControlDemo-Info.plist"; sourceTree = "<group>"; };
|
||||
A251BEC30959BC0E0058BC7F /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
A268E7F809A9822900E082AA /* AquaTabNew.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AquaTabNew.png; path = images/AquaTabNew.png; sourceTree = "<group>"; };
|
||||
A268E7F909A9822900E082AA /* AquaTabNewPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AquaTabNewPressed.png; path = images/AquaTabNewPressed.png; sourceTree = "<group>"; };
|
||||
@@ -533,63 +533,10 @@
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D13D16D0D560DDA0084F3AB /* Universal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INFOPLIST_FILE = "PSMTabBarControlFramework-Info.plist";
|
||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
"-seg1addr",
|
||||
0xc0000000,
|
||||
);
|
||||
PRODUCT_NAME = PSMTabBarControl;
|
||||
SYMROOT = ../build;
|
||||
};
|
||||
name = Universal;
|
||||
};
|
||||
1D13D16E0D560DDA0084F3AB /* Universal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
PRODUCT_NAME = All;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Universal;
|
||||
};
|
||||
1D13D16F0D560DDA0084F3AB /* Universal */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Universal;
|
||||
};
|
||||
C056398008A954F8003078D8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
@@ -602,10 +549,8 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INFOPLIST_FILE = "PSMTabBarControlFramework-Info.plist";
|
||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
"-seg1addr",
|
||||
0xc0000000,
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = PSMTabBarControl;
|
||||
SYMROOT = ../build;
|
||||
ZERO_LINK = NO;
|
||||
@@ -615,7 +560,7 @@
|
||||
C056398108A954F8003078D8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_VERSION = A;
|
||||
@@ -625,10 +570,8 @@
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INFOPLIST_FILE = "PSMTabBarControlFramework-Info.plist";
|
||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
"-seg1addr",
|
||||
0xc0000000,
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = PSMTabBarControl;
|
||||
SYMROOT = ../build;
|
||||
};
|
||||
@@ -673,20 +616,24 @@
|
||||
C056398C08A954F8003078D8 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SYMROOT = ../build;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C056398D08A954F8003078D8 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SYMROOT = ../build;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -698,7 +645,6 @@
|
||||
buildConfigurations = (
|
||||
C056398008A954F8003078D8 /* Debug */,
|
||||
C056398108A954F8003078D8 /* Release */,
|
||||
1D13D16D0D560DDA0084F3AB /* Universal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -708,7 +654,6 @@
|
||||
buildConfigurations = (
|
||||
C056398808A954F8003078D8 /* Debug */,
|
||||
C056398908A954F8003078D8 /* Release */,
|
||||
1D13D16E0D560DDA0084F3AB /* Universal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
@@ -718,7 +663,6 @@
|
||||
buildConfigurations = (
|
||||
C056398C08A954F8003078D8 /* Debug */,
|
||||
C056398D08A954F8003078D8 /* Release */,
|
||||
1D13D16F0D560DDA0084F3AB /* Universal */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,178 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
0259C573FE90428111CA0C5A /* Project object */ = {
|
||||
activeBuildConfigurationName = Debug;
|
||||
activeTarget = 53DF68FC067E5B5A0090B5B0 /* PSMTabBarControlFramework */;
|
||||
codeSenseManager = 1D82C6110AC093AF00AAD418 /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
243,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
200,
|
||||
63,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 223743414;
|
||||
PBXWorkspaceStateSaveDate = 223743414;
|
||||
};
|
||||
sourceControlManager = 1D82C6100AC093AF00AAD418 /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
0259C576FE90428111CA0C5A /* PSMTabBarControl.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {4143, 22432}}";
|
||||
sepNavSelRange = "{48941, 0}";
|
||||
sepNavVisRect = "{{0, 1451}, {459, 186}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
0259C57AFE90428111CA0C5A /* PSMTabBarControl.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1077, 2000}}";
|
||||
sepNavSelRange = "{3919, 0}";
|
||||
sepNavVisRect = "{{0, 1387}, {711, 613}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
1D82C6100AC093AF00AAD418 /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
};
|
||||
scmType = "";
|
||||
};
|
||||
1D82C6110AC093AF00AAD418 /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
53DF68FC067E5B5A0090B5B0 /* PSMTabBarControlFramework */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
53DF6901067E5B8E0090B5B0 /* All */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
A2082A8E09EAEB33009AC8BE /* PSMTabDragAssistant.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1420, 7040}}";
|
||||
sepNavSelRange = "{14900, 0}";
|
||||
sepNavVisRect = "{{0, 3817}, {978, 600}}";
|
||||
sepNavWindowFrame = "{{6, 17}, {1017, 729}}";
|
||||
};
|
||||
};
|
||||
A246FB040A2BD6F9005BDF7B /* PSMTabBarControlDoc.html */ = {
|
||||
uiCtxt = {
|
||||
sepNavWindowFrame = "{{15, 3}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A251BE830959A1B90058BC7F /* PSMTabBarCell.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {804, 1648}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 744}, {619, 599}}";
|
||||
sepNavWindowFrame = "{{15, 13}, {658, 728}}";
|
||||
};
|
||||
};
|
||||
A251BE840959A1B90058BC7F /* PSMTabBarCell.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {972, 6368}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 5769}, {619, 599}}";
|
||||
sepNavWindowFrame = "{{15, 13}, {658, 728}}";
|
||||
};
|
||||
};
|
||||
A251BE8A0959A1EA0058BC7F /* AppController.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {711, 613}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 0}, {711, 613}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A251BE8B0959A1EA0058BC7F /* FakeModel.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {711, 613}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 0}, {711, 613}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A251BE8C0959A1EA0058BC7F /* FakeModel.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {711, 1248}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 117}, {711, 613}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A251BE9B0959A2530058BC7F /* ReadMe.rtfd */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {711, 3047}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 2419}, {711, 628}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A2A711BD09E5BF0500D0089B /* WindowController.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {958, 944}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRect = "{{0, 197}, {711, 613}}";
|
||||
sepNavWindowFrame = "{{15, -1}, {750, 742}}";
|
||||
};
|
||||
};
|
||||
A2A711BE09E5BF0500D0089B /* WindowController.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1399, 4496}}";
|
||||
sepNavSelRange = "{2008, 125}";
|
||||
sepNavVisRect = "{{0, 824}, {784, 608}}";
|
||||
sepNavWindowFrame = "{{15, 4}, {823, 737}}";
|
||||
};
|
||||
};
|
||||
A2D32EFF09A63D7A00EC8662 /* PSMMetalTabStyle.m */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1728, 8400}}";
|
||||
sepNavSelRange = "{683, 5}";
|
||||
sepNavVisRect = "{{0, 0}, {781, 608}}";
|
||||
sepNavWindowFrame = "{{15, 4}, {820, 737}}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,22 +8,31 @@
|
||||
|
||||
#import "NSBezierPath_AMShading.h"
|
||||
|
||||
// CGFloat was introduced in OS X 10.5
|
||||
#ifndef CGFLOAT_DEFINED
|
||||
typedef float CGFloat;
|
||||
# define CGFLOAT_MIN FLT_MIN
|
||||
# define CGFLOAT_MAX FLT_MAX
|
||||
# define CGFLOAT_IS_DOUBLE 0
|
||||
# define CGFLOAT_DEFINED 1
|
||||
#endif
|
||||
|
||||
|
||||
@implementation NSBezierPath (AMShading)
|
||||
|
||||
static void linearShadedColor(void *info, const float *in, float *out)
|
||||
static void linearShadedColor(void *info, const CGFloat *in, CGFloat *out)
|
||||
{
|
||||
float *colors = info;
|
||||
CGFloat *colors = info;
|
||||
*out++ = colors[0] + *in * colors[8];
|
||||
*out++ = colors[1] + *in * colors[9];
|
||||
*out++ = colors[2] + *in * colors[10];
|
||||
*out++ = colors[3] + *in * colors[11];
|
||||
}
|
||||
|
||||
static void bilinearShadedColor(void *info, const float *in, float *out)
|
||||
static void bilinearShadedColor(void *info, const CGFloat *in, CGFloat *out)
|
||||
{
|
||||
float *colors = info;
|
||||
float factor = (*in)*2.0;
|
||||
CGFloat *colors = info;
|
||||
CGFloat factor = (*in)*2.0;
|
||||
if (*in > 0.5) {
|
||||
factor = 2-factor;
|
||||
}
|
||||
@@ -41,7 +50,7 @@ static void bilinearShadedColor(void *info, const float *in, float *out)
|
||||
CGPoint startPoint = {0, 0};
|
||||
CGPoint endPoint = {0, 0};
|
||||
CGFunctionRef function;
|
||||
float colors[12]; // pointer to color values
|
||||
CGFloat colors[12]; // pointer to color values
|
||||
|
||||
// get my context
|
||||
CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
@@ -70,8 +79,8 @@ static void bilinearShadedColor(void *info, const float *in, float *out)
|
||||
colorspace = CGColorSpaceCreateDeviceRGB();
|
||||
|
||||
size_t components = 1 + CGColorSpaceGetNumberOfComponents(colorspace);
|
||||
static const float domain[2] = {0.0, 1.0};
|
||||
static const float range[10] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
|
||||
static const CGFloat domain[2] = {0.0, 1.0};
|
||||
static const CGFloat range[10] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
|
||||
static const CGFunctionCallbacks callbacks = {0, &shadedColor, NULL};
|
||||
|
||||
// Create a CGFunctionRef that describes a function taking 1 input and kChannelsPerColor outputs.
|
||||
@@ -113,7 +122,7 @@ static void bilinearShadedColor(void *info, const float *in, float *out)
|
||||
CGPoint startPoint = {0, 0};
|
||||
CGPoint endPoint = {0, 0};
|
||||
CGFunctionRef function;
|
||||
float colors[12]; // pointer to color values
|
||||
CGFloat colors[12]; // pointer to color values
|
||||
|
||||
// get my context
|
||||
CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
@@ -141,8 +150,8 @@ static void bilinearShadedColor(void *info, const float *in, float *out)
|
||||
// draw gradient
|
||||
colorspace = CGColorSpaceCreateDeviceRGB();
|
||||
size_t components = 1 + CGColorSpaceGetNumberOfComponents(colorspace);
|
||||
static const float domain[2] = {0.0, 1.0};
|
||||
static const float range[10] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
|
||||
static const CGFloat domain[2] = {0.0, 1.0};
|
||||
static const CGFloat range[10] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1};
|
||||
//static const CGFunctionCallbacks callbacks = {0, &bilinearShadedColor, NULL};
|
||||
|
||||
// Create a CGFunctionRef that describes a function taking 1 input and kChannelsPerColor outputs.
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
BOOL _isCloseButtonSuppressed;
|
||||
BOOL _hasIcon;
|
||||
int _count;
|
||||
NSString *_toolTip;
|
||||
}
|
||||
|
||||
// creation/destruction
|
||||
@@ -72,6 +73,8 @@
|
||||
- (void)setIsPlaceholder:(BOOL)value;
|
||||
- (int)currentStep;
|
||||
- (void)setCurrentStep:(int)value;
|
||||
- (NSString *)toolTip;
|
||||
- (void)setToolTip:(NSString *)tip;
|
||||
|
||||
// component attributes
|
||||
- (NSRect)indicatorRectForFrame:(NSRect)cellFrame;
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
- (void)dealloc
|
||||
{
|
||||
[_indicator release];
|
||||
[_toolTip release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -252,6 +253,19 @@
|
||||
_currentStep = value;
|
||||
}
|
||||
|
||||
- (NSString *)toolTip
|
||||
{
|
||||
return _toolTip;
|
||||
}
|
||||
|
||||
- (void)setToolTip:(NSString *)tip
|
||||
{
|
||||
if (tip != _toolTip) {
|
||||
[_toolTip release];
|
||||
_toolTip = [tip copy];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Component Attributes
|
||||
|
||||
|
||||
@@ -12,6 +12,18 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#ifndef NSINTEGER_DEFINED
|
||||
// NSInteger was introduced in 10.5
|
||||
# if __LP64__ || NS_BUILD_32_LIKE_64
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
# else
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
# endif
|
||||
# define NSINTEGER_DEFINED 1
|
||||
#endif
|
||||
|
||||
#define kPSMTabBarControlHeight 22
|
||||
// internal cell border
|
||||
#define MARGIN_X 6
|
||||
@@ -39,7 +51,12 @@ enum {
|
||||
PSMTab_PositionSingleMask = 1 << 7
|
||||
};
|
||||
|
||||
@interface PSMTabBarControl : NSControl {
|
||||
@interface PSMTabBarControl : NSControl
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
|
||||
// 10.6 has turned delegate messages into formal protocols
|
||||
<NSTabViewDelegate>
|
||||
#endif
|
||||
{
|
||||
|
||||
// control basics
|
||||
NSMutableArray *_cells; // the cells that draw the tabs
|
||||
@@ -68,8 +85,10 @@ enum {
|
||||
|
||||
// drag and drop
|
||||
NSEvent *_lastMouseDownEvent; // keep this for dragging reference
|
||||
BOOL _allowsDragBetweenWindows;
|
||||
|
||||
BOOL _allowsDragBetweenWindows;
|
||||
BOOL _delegateHandlingDrag;
|
||||
NSDragOperation _delegateInitialDragOperation;
|
||||
|
||||
// MVC help
|
||||
IBOutlet id delegate;
|
||||
}
|
||||
@@ -97,6 +116,9 @@ enum {
|
||||
- (BOOL)allowsDragBetweenWindows;
|
||||
- (void)setAllowsDragBetweenWindows:(BOOL)flag;
|
||||
|
||||
// tool tips
|
||||
- (void)setToolTip:(NSString *)value forTabViewItem:(NSTabViewItem *)tvi;
|
||||
|
||||
// accessors
|
||||
- (NSTabView *)tabView;
|
||||
- (void)setTabView:(NSTabView *)view;
|
||||
@@ -121,4 +143,11 @@ enum {
|
||||
- (void)tabView:(NSTabView *)aTabView willCloseTabViewItem:(NSTabViewItem *)tabViewItem;
|
||||
- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem;
|
||||
- (void)tabView:(NSTabView *)aTabView didDragTabViewItem:(NSTabViewItem *)tabViewItem toIndex:(int)idx;
|
||||
|
||||
- (NSDragOperation)tabBarControl:(PSMTabBarControl *)theTabBarControl draggingEntered:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (NSDragOperation)tabBarControl:(PSMTabBarControl *)theTabBarControl draggingUpdated:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (void)tabBarControl:(PSMTabBarControl *)theTabBarControl draggingExited:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (BOOL)tabBarControl:(PSMTabBarControl *)theTabBarControl prepareForDragOperation:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (BOOL)tabBarControl:(PSMTabBarControl *)theTabBarControl performDragOperation:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
- (void)tabBarControl:(PSMTabBarControl *)theTabBarControl concludeDragOperation:(id <NSDraggingInfo>)sender forTabAtIndex:(NSUInteger)tabIndex;
|
||||
@end
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
// convenience
|
||||
- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame;
|
||||
- (NSUInteger)indexOfCellAtPoint:(NSPoint)point;
|
||||
- (NSUInteger)indexOfCellAtPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame;
|
||||
- (PSMTabBarCell *)lastVisibleTab;
|
||||
- (int)numberOfVisibleTabs;
|
||||
|
||||
@@ -98,6 +100,7 @@
|
||||
|
||||
// default config
|
||||
_allowsDragBetweenWindows = YES;
|
||||
_delegateHandlingDrag = NO;
|
||||
_canCloseOnlyTab = NO;
|
||||
_showAddTabButton = NO;
|
||||
_hideForSingleTab = NO;
|
||||
@@ -144,7 +147,7 @@
|
||||
[_addTabButton setNeedsDisplay:YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
@@ -377,6 +380,22 @@
|
||||
return _overflowPopUpButton;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Tool tips
|
||||
|
||||
- (void)setToolTip:(NSString *)value forTabViewItem:(NSTabViewItem *)tvi
|
||||
{
|
||||
int i, cellCount = [_cells count];
|
||||
for (i = 0; i < cellCount; i++) {
|
||||
PSMTabBarCell *cell = [_cells objectAtIndex:i];
|
||||
if ([cell representedObject] == tvi)
|
||||
[cell setToolTip:value];
|
||||
}
|
||||
|
||||
[self update];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Functionality
|
||||
- (void)addTabViewItem:(NSTabViewItem *)item
|
||||
@@ -393,7 +412,7 @@
|
||||
[bindingOptions setObject:NSNegateBooleanTransformerName forKey:@"NSValueTransformerName"];
|
||||
[[cell indicator] bind:@"animate" toObject:[item identifier] withKeyPath:@"selection.isProcessing" options:nil];
|
||||
[[cell indicator] bind:@"hidden" toObject:[item identifier] withKeyPath:@"selection.isProcessing" options:bindingOptions];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.isProcessing" options:nil context:nil];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.isProcessing" options:0 context:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -406,7 +425,7 @@
|
||||
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
|
||||
[bindingOptions setObject:NSIsNotNilTransformerName forKey:@"NSValueTransformerName"];
|
||||
[cell bind:@"hasIcon" toObject:[item identifier] withKeyPath:@"selection.icon" options:bindingOptions];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.icon" options:nil context:nil];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.icon" options:0 context:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -417,7 +436,7 @@
|
||||
if([[item identifier] respondsToSelector:@selector(content)]){
|
||||
if([[[[cell representedObject] identifier] content] respondsToSelector:@selector(objectCount)]){
|
||||
[cell bind:@"count" toObject:[item identifier] withKeyPath:@"selection.objectCount" options:nil];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.objectCount" options:nil context:nil];
|
||||
[[item identifier] addObserver:self forKeyPath:@"selection.objectCount" options:0 context:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -644,7 +663,10 @@
|
||||
[self removeTrackingRect:[cell cellTrackingTag]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// nuke old tool tips
|
||||
[self removeAllToolTips];
|
||||
|
||||
// calculate number of cells to fit in control and cell widths
|
||||
float availableWidth = [self availableCellWidth];
|
||||
NSMutableArray *newWidths = [NSMutableArray arrayWithCapacity:cellCount];
|
||||
@@ -740,6 +762,7 @@
|
||||
NSRect cellRect = [self genericCellRect];
|
||||
for(i = 0; i < cellCount; i++){
|
||||
PSMTabBarCell *cell = [_cells objectAtIndex:i];
|
||||
NSTabViewItem *tvi = [cell representedObject];
|
||||
int tabState = 0;
|
||||
if (i < numberOfVisibleCells) {
|
||||
// set cell frame
|
||||
@@ -757,9 +780,14 @@
|
||||
tag = [self addTrackingRect:cellRect owner:cell userData:nil assumeInside:NO];
|
||||
[cell setCellTrackingTag:tag];
|
||||
[cell setEnabled:YES];
|
||||
|
||||
|
||||
// add tool tip
|
||||
NSString *tt = [cell toolTip];
|
||||
if (tt && [tt length] > 0)
|
||||
[self addToolTipRect:cellRect owner:tt userData:NULL];
|
||||
|
||||
// selected? set tab states...
|
||||
if([[cell representedObject] isEqualTo:[tabView selectedTabViewItem]]){
|
||||
if([tvi isEqualTo:[tabView selectedTabViewItem]]){
|
||||
[cell setState:NSOnState];
|
||||
tabState |= PSMTab_SelectedMask;
|
||||
// previous cell
|
||||
@@ -808,13 +836,13 @@
|
||||
}
|
||||
menuItem = [[[NSMenuItem alloc] initWithTitle:[[cell attributedStringValue] string] action:@selector(overflowMenuAction:) keyEquivalent:@""] autorelease];
|
||||
[menuItem setTarget:self];
|
||||
[menuItem setRepresentedObject:[cell representedObject]];
|
||||
[menuItem setRepresentedObject:tvi];
|
||||
[cell setIsInOverflowMenu:YES];
|
||||
[[cell indicator] removeFromSuperview];
|
||||
if ([[cell representedObject] isEqualTo:[tabView selectedTabViewItem]])
|
||||
if ([tvi isEqualTo:[tabView selectedTabViewItem]])
|
||||
[menuItem setState:NSOnState];
|
||||
if([cell hasIcon])
|
||||
[menuItem setImage:[[[[cell representedObject] identifier] content] icon]];
|
||||
[menuItem setImage:[[[tvi identifier] content] icon]];
|
||||
if([cell count] > 0)
|
||||
[menuItem setTitle:[[menuItem title] stringByAppendingFormat:@" (%d)",[cell count]]];
|
||||
[overflowMenu addItem:menuItem];
|
||||
@@ -965,7 +993,7 @@
|
||||
}
|
||||
|
||||
// NSDraggingSource
|
||||
- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal
|
||||
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
|
||||
{
|
||||
return (isLocal ? NSDragOperationMove : NSDragOperationNone);
|
||||
}
|
||||
@@ -975,16 +1003,28 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
|
||||
{
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggedImageEndedAt:aPoint operation:operation];
|
||||
}
|
||||
|
||||
// NSDraggingDestination
|
||||
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
{
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
_delegateHandlingDrag = NO;
|
||||
if([[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] != NSNotFound) {
|
||||
|
||||
if ([sender draggingSource] != self && ![self allowsDragBetweenWindows])
|
||||
return NSDragOperationNone;
|
||||
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingEnteredTabBar:self atPoint:[self convertPoint:[sender draggingLocation] fromView:nil]];
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingEnteredTabBar:self atPoint:point];
|
||||
return NSDragOperationMove;
|
||||
} else if (delegate && [delegate respondsToSelector:@selector(tabBarControl:draggingEntered:forTabAtIndex:)]) {
|
||||
NSDragOperation op = [delegate tabBarControl:self draggingEntered:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
_delegateHandlingDrag = (op != NSDragOperationNone);
|
||||
_delegateInitialDragOperation = op;
|
||||
return op;
|
||||
}
|
||||
|
||||
return NSDragOperationNone;
|
||||
@@ -992,13 +1032,19 @@
|
||||
|
||||
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
if ([[[sender draggingPasteboard] types] indexOfObject:@"PSMTabBarControlItemPBType"] != NSNotFound) {
|
||||
|
||||
if ([sender draggingSource] != self && ![self allowsDragBetweenWindows])
|
||||
return NSDragOperationNone;
|
||||
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingUpdatedInTabBar:self atPoint:[self convertPoint:[sender draggingLocation] fromView:nil]];
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingUpdatedInTabBar:self atPoint:point];
|
||||
return NSDragOperationMove;
|
||||
} else if (_delegateHandlingDrag) {
|
||||
if ([delegate respondsToSelector:@selector(tabBarControl:draggingUpdated:forTabAtIndex:)])
|
||||
return [delegate tabBarControl:self draggingUpdated:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
else
|
||||
return _delegateInitialDragOperation;
|
||||
}
|
||||
|
||||
return NSDragOperationNone;
|
||||
@@ -1006,44 +1052,61 @@
|
||||
|
||||
- (void)draggingExited:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingExitedTabBar:self];
|
||||
if (!_delegateHandlingDrag) {
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggingExitedTabBar:self];
|
||||
} else if ([delegate respondsToSelector:@selector(tabBarControl:draggingExited:forTabAtIndex:)]) {
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
[delegate tabBarControl:self draggingExited:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
if (_delegateHandlingDrag && [delegate respondsToSelector:@selector(tabBarControl:prepareForDragOperation:forTabAtIndex:)]) {
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
return [delegate tabBarControl:self prepareForDragOperation:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
if (!_delegateHandlingDrag) {
|
||||
#if 1
|
||||
// HACK! Used below.
|
||||
NSTabViewItem *tvi = [[[PSMTabDragAssistant sharedDragAssistant] draggedCell] representedObject];
|
||||
// HACK! Used below.
|
||||
NSTabViewItem *tvi = [[[PSMTabDragAssistant sharedDragAssistant] draggedCell] representedObject];
|
||||
#endif
|
||||
|
||||
[[PSMTabDragAssistant sharedDragAssistant] performDragOperation];
|
||||
[[PSMTabDragAssistant sharedDragAssistant] performDragOperation];
|
||||
|
||||
#if 1
|
||||
// HACK! Notify the delegate that a tab was dragged to a new position.
|
||||
if (delegate && [delegate respondsToSelector:@selector(tabView:didDragTabViewItem:toIndex:)]) {
|
||||
int idx = [[self representedTabViewItems] indexOfObject:tvi];
|
||||
if (NSNotFound != idx) {
|
||||
[delegate tabView:[self tabView] didDragTabViewItem:tvi toIndex:idx];
|
||||
// HACK! Notify the delegate that a tab was dragged to a new position.
|
||||
if (delegate && [delegate respondsToSelector:@selector(tabView:didDragTabViewItem:toIndex:)]) {
|
||||
NSUInteger idx = [[self representedTabViewItems] indexOfObject:tvi];
|
||||
if (NSNotFound != idx) {
|
||||
[delegate tabView:[self tabView] didDragTabViewItem:tvi toIndex:idx];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if ([delegate respondsToSelector:@selector(tabBarControl:performDragOperation:forTabAtIndex:)]) {
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
return [delegate tabBarControl:self performDragOperation:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
|
||||
{
|
||||
[[PSMTabDragAssistant sharedDragAssistant] draggedImageEndedAt:aPoint operation:operation];
|
||||
}
|
||||
|
||||
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
|
||||
if (_delegateHandlingDrag && [delegate respondsToSelector:@selector(tabBarControl:concludeDragOperation:forTabAtIndex:)]) {
|
||||
NSPoint point = [self convertPoint:[sender draggingLocation] fromView:nil];
|
||||
[delegate tabBarControl:self concludeDragOperation:sender forTabAtIndex:[self indexOfCellAtPoint:point]];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@@ -1189,7 +1252,9 @@
|
||||
{
|
||||
if([self delegate]){
|
||||
if([[self delegate] respondsToSelector:@selector(tabView:shouldSelectTabViewItem:)]){
|
||||
return (int)[[self delegate] performSelector:@selector(tabView:shouldSelectTabViewItem:) withObject:aTabView withObject:tabViewItem];
|
||||
// This is an ugly hack. tabView:shouldSelectTabViewItem: returns
|
||||
// a BOOL and performSelector: assumes that it returns an id.
|
||||
return nil != [[self delegate] performSelector:@selector(tabView:shouldSelectTabViewItem:) withObject:aTabView withObject:tabViewItem];
|
||||
} else {
|
||||
return YES;
|
||||
}
|
||||
@@ -1350,14 +1415,28 @@
|
||||
}
|
||||
|
||||
- (id)cellForPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame
|
||||
{
|
||||
NSUInteger i = [self indexOfCellAtPoint:point cellFrame:outFrame];
|
||||
if (i == NSNotFound)
|
||||
return nil;
|
||||
PSMTabBarCell *cell = [_cells objectAtIndex:i];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSUInteger)indexOfCellAtPoint:(NSPoint)point
|
||||
{
|
||||
return [self indexOfCellAtPoint:point cellFrame:NULL];
|
||||
}
|
||||
|
||||
- (NSUInteger)indexOfCellAtPoint:(NSPoint)point cellFrame:(NSRectPointer)outFrame
|
||||
{
|
||||
NSRect aRect = [self genericCellRect];
|
||||
|
||||
if(!NSPointInRect(point,aRect)){
|
||||
return nil;
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
int i, cnt = [_cells count];
|
||||
NSUInteger i, cnt = [_cells count];
|
||||
for(i = 0; i < cnt; i++){
|
||||
PSMTabBarCell *cell = [_cells objectAtIndex:i];
|
||||
float width = [cell width];
|
||||
@@ -1367,11 +1446,11 @@
|
||||
if(outFrame){
|
||||
*outFrame = aRect;
|
||||
}
|
||||
return cell;
|
||||
return i;
|
||||
}
|
||||
aRect.origin.x += width;
|
||||
}
|
||||
return nil;
|
||||
return NSNotFound;
|
||||
}
|
||||
|
||||
- (PSMTabBarCell *)lastVisibleTab
|
||||
|
||||
@@ -120,7 +120,7 @@ NSString *MMPlugInViewPboardType = @"MMPlugInViewPboardType";
|
||||
if ((self = [super init]) == nil) return nil;
|
||||
|
||||
if (![NSBundle loadNibNamed:@"PlugInView" owner:self])
|
||||
NSLog(@"Error loading PlugIn nib");
|
||||
ASLogErr(@"Error loading PlugIn nib");
|
||||
|
||||
[titleField setStringValue:title];
|
||||
|
||||
@@ -196,6 +196,8 @@ NSString *MMPlugInViewPboardType = @"MMPlugInViewPboardType";
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
ASLogDebug(@"");
|
||||
|
||||
[fillerView release]; fillerView = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ static int MMPlugInArchMinorVersion = 0;
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
//NSLog(@"%@ %s", [self className], _cmd);
|
||||
ASLogDebug(@"");
|
||||
|
||||
[plugInViews release]; plugInViews = nil;
|
||||
[instances release]; instances = nil;
|
||||
@@ -113,8 +113,10 @@ static int MMPlugInArchMinorVersion = 0;
|
||||
NSString *errstr = nil;
|
||||
id res = [vimController evaluateVimExpressionCocoa:vimExpression
|
||||
errorString:&errstr];
|
||||
if (!res)
|
||||
[NSException raise:@"VimEvaluationException" format:errstr];
|
||||
if (!res) {
|
||||
// Setting format to %@ instead of just passing errstr avoids warning.
|
||||
[NSException raise:@"VimEvaluationException" format:@"%@", errstr];
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -126,8 +128,6 @@ static int MMPlugInArchMinorVersion = 0;
|
||||
|
||||
- (void)addPlugInView:(NSView *)view withTitle:(NSString *)title
|
||||
{
|
||||
//NSLog(@"%@ %s", [self className], _cmd);
|
||||
|
||||
// Do this here so that the drawer is never opened automatically when there
|
||||
// are no plugin views.
|
||||
if ([[NSUserDefaults standardUserDefaults]
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// Copyright 2004-2006 Rainer Brockerhoff.
|
||||
// Some Rights Reserved under the Creative Commons Attribution License, version 2.5, and/or the MIT License.
|
||||
//
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
|
||||
#import "RBSplitView.h"
|
||||
#import "RBSplitViewPrivateDefines.h"
|
||||
@@ -925,3 +926,4 @@ static animationData* currentAnimation = NULL;
|
||||
|
||||
@end
|
||||
|
||||
#endif // MM_ENABLE_PLUGINS
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// Copyright 2004-2006 Rainer Brockerhoff.
|
||||
// Some Rights Reserved under the Creative Commons Attribution License, version 2.5, and/or the MIT License.
|
||||
//
|
||||
#ifdef MM_ENABLE_PLUGINS
|
||||
|
||||
#import "RBSplitView.h"
|
||||
#import "RBSplitViewPrivateDefines.h"
|
||||
@@ -1732,3 +1733,4 @@ static inline float fMAX(float a,float b) {
|
||||
|
||||
@end
|
||||
|
||||
#endif // MM_ENABLE_PLUGINS
|
||||
|
||||
+20
-21
@@ -20,16 +20,16 @@ is very easy to pick up if you know C and some object oriented programming.)
|
||||
Each editor window in MacVim runs its own Vim process (but there is always
|
||||
only one MacVim process). Communication between MacVim and a Vim process is
|
||||
done using Distributed Objects (DO). Each Vim process is represented by a
|
||||
backend object (MMBackend) and it communicates with a frontend object in the
|
||||
Vim process (MMVimController). The interface between the backend and frontend
|
||||
backend object (MMBackend) and it communicates with the frontend object in the
|
||||
Vim process (MMAppController). The interface between the backend and frontend
|
||||
is defined in MacVim.h.
|
||||
|
||||
The frontend sends input to the backend by calling
|
||||
-[MMBackend processInput:data:]. The backend queues output on a command queue
|
||||
and sends it to the frontend at opportune times by calling
|
||||
-[MMVimController processCommandQueue:]. These are both asynchronous calls so
|
||||
MacVim can keep drawing and receiving input while Vim is working away, thus
|
||||
always keeping the user interface responsive.
|
||||
-[MMAppController processInput:forIdentifier:]. These are both asynchronous
|
||||
calls so MacVim can keep drawing and receiving input while Vim is working away,
|
||||
thus always keeping the user interface responsive.
|
||||
|
||||
The state of each editor window is kept entirely in the Vim process. MacVim
|
||||
should remain "ignorant" in the sense that it knows nothing of the actual
|
||||
@@ -46,7 +46,7 @@ to MacVim inside -[MMBackend queueVimStateMessage].
|
||||
|
||||
Vim:
|
||||
|
||||
Hooks from within Vim are implmented in gui_macvim.m, the name of such
|
||||
Hooks from within Vim are implemented in gui_macvim.m, the name of such
|
||||
functions usually start with "gui_mch_" and they should simply put a message
|
||||
on the output queue, by calling queueMessage:properties: on the singleton
|
||||
MMBackend object [MMBackend sharedInstance] (see e.g. gui_mch_destroy_menu()).
|
||||
@@ -63,32 +63,31 @@ for some reason fails to update the run loop then incoming DO calls will not
|
||||
be processed and for this reason it is best to avoid making synchronous DO
|
||||
calls from MacVim. (If synchronous calls must be made then it is important to
|
||||
set proper timeouts so that MacVim doesn't "hang", see
|
||||
-[MMVimConroller sendMessageNow:::] to see how this can be done.)
|
||||
-[MMVimController sendMessageNow:::] to see how this can be done.)
|
||||
|
||||
|
||||
MacVim:
|
||||
|
||||
The main nib of MacVim.app is MainMenu.nib which contains the default menu and
|
||||
an instance of MMAppController, which is connected as the delegate of
|
||||
NSApplication. That mens, when MacVim starts it will load this nib file and
|
||||
automatically create an instance of the MMAppController singleton.
|
||||
NSApplication. That means, when MacVim starts it will load this nib file and
|
||||
automatically create an instance of the MMAppController singleton. All
|
||||
incoming distributed object calls go via MMAppController.
|
||||
|
||||
A new editor window is opened by calling
|
||||
-[MMAppController launchVimProcessWithArguments:]. This functions starts a
|
||||
new Vim process (by executing the Vim binary). The Vim process lets MacVim
|
||||
know when it has launched by calling -[MMAppController connectBackend:pid:]
|
||||
and MacVim responds to this message by calling a new frontend object
|
||||
(MMVimController) and returns a proxy to this object back to the Vim process.
|
||||
From this point onward the Vim process communicates directly with the
|
||||
MMVimController.
|
||||
and MacVim responds to this message by creating a new vim controller and
|
||||
returns an identifier for this object back to the Vim process.
|
||||
|
||||
The MMVimController represents the frontend of a Vim process inside MacVim.
|
||||
It coordinates all communication with the Vim process and delegates output
|
||||
that affects visual presentation to a MMWindowController object. Read the
|
||||
Cocoa documentation on the responsibilities of a window controller.
|
||||
|
||||
Input (keyboard & mouse) handling and drawing is handled by a MMTextView
|
||||
object.
|
||||
Input (keyboard & mouse) handling and drawing is handled by a helper object
|
||||
(MMTextViewHelper) to the current text view (MMTextView, MMAtsuiTextView, ...).
|
||||
|
||||
|
||||
Distributed Object dangers:
|
||||
@@ -106,7 +105,7 @@ message may arrive.
|
||||
the menu flashes briefly. During this "flash" a modal loop is entered.
|
||||
|
||||
Item 1 can cause a problem if MacVim sends a synchronous message and before a
|
||||
reply reacheds MacVim another message is received. From the source code it
|
||||
reply reaches MacVim another message is received. From the source code it
|
||||
looks like the synchronous message blocks but in fact the other message is
|
||||
executed during this "block". If the other message changes state radically
|
||||
something may go wrong after the synchronous DO message returns.
|
||||
@@ -117,8 +116,8 @@ which may be even more puzzling.
|
||||
One way to alleviate these problems is to ensure a DO message isn't entered
|
||||
twice by setting a boolean at the beginning of the message and clearing it
|
||||
afterwards. If the boolean is already set when entering the call must somehow
|
||||
be delayed. See -[MMVimController processCommandQueue:] for a concrete
|
||||
example.
|
||||
be delayed. See processInput:forIdentifier: and processInputQueues: inside
|
||||
MMAppController for a concrete example.
|
||||
|
||||
Another danger is that we must take care when releasing objects that Cocoa may
|
||||
be using. See -[MMVimController connectionDidDie:] how MacVim releases
|
||||
@@ -133,7 +132,7 @@ what they contain:
|
||||
MMAppController.* Everything related to running the application
|
||||
MMBackend.* Object representing a Vim process in backend
|
||||
MMTextView.* Handles input and drawing
|
||||
MMVimController.* Object representing a Vim Process in frontend
|
||||
MMVimController.* Object representing a Vim process in frontend
|
||||
MMVimView.* Cocoa view object
|
||||
MMWindowController.* Coordinates visual presentation
|
||||
MacVim.* Code shared between MacVim and Vim
|
||||
@@ -149,7 +148,7 @@ Steps to build MacVim.app (the text before the '$' shows the folder you should
|
||||
be in when executing these commands):
|
||||
|
||||
1. Configure Vim
|
||||
src/$ configure --enable-gui=macvim
|
||||
src/$ ./configure --enable-gui=macvim
|
||||
|
||||
2. Build Vim executable
|
||||
src/$ make
|
||||
@@ -161,4 +160,4 @@ The application bundle can be found inside "src/MacVim/build/Release".
|
||||
|
||||
|
||||
Bjorn Winckler <bjorn.winckler@gmail.com>
|
||||
June 22, 2008
|
||||
April 5, 2009
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
MacVim is a port of the text editor Vim to Mac OS X. More information can be
|
||||
found on the [project webpage][gcode]. The file `src/MacVim/README` gives an
|
||||
overview of the MacVim source code.
|
||||
|
||||
|
||||
### Branches ###
|
||||
|
||||
`master`
|
||||
: MacVim and core Vim sources
|
||||
`vim`
|
||||
: Core Vim sources pulled from the SVN repository with the latest runtime
|
||||
: files from the Vim FTP included
|
||||
`stable`
|
||||
: Used to build the Stable binary distribution
|
||||
|
||||
_Note:_ Branches starting with `feat/` are experimental and will be rebased
|
||||
against master occasionally (other branches will not be rebased).
|
||||
|
||||
|
||||
[gcode]: http://code.google.com/p/macvim/
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>KA</key>
|
||||
<string>KA</string>
|
||||
<key></key>
|
||||
<string>kb</string>
|
||||
<key></key>
|
||||
<string>ku</string>
|
||||
<key></key>
|
||||
<string>kd</string>
|
||||
<key></key>
|
||||
<string>kl</string>
|
||||
<key></key>
|
||||
<string>kr</string>
|
||||
<key></key>
|
||||
<string>k1</string>
|
||||
<key></key>
|
||||
<string>k2</string>
|
||||
<key></key>
|
||||
<string>k3</string>
|
||||
<key></key>
|
||||
<string>k4</string>
|
||||
<key></key>
|
||||
<string>k5</string>
|
||||
<key></key>
|
||||
<string>k6</string>
|
||||
<key></key>
|
||||
<string>k7</string>
|
||||
<key></key>
|
||||
<string>k8</string>
|
||||
<key></key>
|
||||
<string>k9</string>
|
||||
<key></key>
|
||||
<string>k;</string>
|
||||
<key></key>
|
||||
<string>F1</string>
|
||||
<key></key>
|
||||
<string>F2</string>
|
||||
<key></key>
|
||||
<string>F3</string>
|
||||
<key></key>
|
||||
<string>F4</string>
|
||||
<key></key>
|
||||
<string>F5</string>
|
||||
<key></key>
|
||||
<string>F6</string>
|
||||
<key></key>
|
||||
<string>kD</string>
|
||||
<key></key>
|
||||
<string>kh</string>
|
||||
<key></key>
|
||||
<string>@7</string>
|
||||
<key></key>
|
||||
<string>kP</string>
|
||||
<key></key>
|
||||
<string>kN</string>
|
||||
<key></key>
|
||||
<string>%1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
-185
@@ -1,185 +0,0 @@
|
||||
Active:
|
||||
|
||||
- transparent text view
|
||||
- Listen to NSSystemColorsDidChangeNotification and update highlighting
|
||||
- Add support for 'mousehide' (needs to check p_mh)
|
||||
- Build Vim (make) from Xcode project
|
||||
- Cmd-W in about box sends vimMenuAction: instead of performClose:
|
||||
- Terminal support. :!bash -> no cursor, arrow keys mucks up display
|
||||
- Press Cmd-n multiple times and quickly press Cmd-q; sometimes two or more
|
||||
instances of MacVim opens up
|
||||
- hide toolbar, open new tab, show toolbar: baseline sepearator still visible
|
||||
(seems like a drawing bug in PSMTabBarControl)
|
||||
- file modified outside vim dialog sometimes only appear after pressing a key
|
||||
- let user choose file encoding and format in open/save dialogs
|
||||
- autosave settings ?
|
||||
- encoding -- convert strings from vim to utf-8
|
||||
- main menu (buffers menu, window menu)
|
||||
- standardize NSString usage (initialization & how it is passed in messages)
|
||||
- autosave window rows&columns?
|
||||
- improve drag and drop support (modifier keys are ignored)
|
||||
- grey out menus which can't be used: Tab Next/Prev/Close, Undo/Redo, etc.
|
||||
- find/replace toolbar item (FIND_REPLACE_DIALOG)
|
||||
- drag-to-resize, delay if mouse button held down
|
||||
- ability to modify key equivalents at any time (?)
|
||||
- validate menu actions for when no windows are open (e.g. selectNextWindow:)
|
||||
- need E??? numbers for vim errors
|
||||
- tab-completion for :action command?
|
||||
- proper font handling
|
||||
- check for memory leaks
|
||||
- i8n
|
||||
- change building procedure so that the Makefile compiles and links VimTask and
|
||||
then calls pbxbuild to build MacVim (and put MacVim.app) in the src folder
|
||||
- icons for all built in toolbar items
|
||||
- window title is never set when starting with terminal vim and typing :gui
|
||||
- forking doesn't work with :gui (i think)
|
||||
- make sure [NSMutableData appendByte:length:] is never called with 0 length
|
||||
(this will lead to a crash)
|
||||
- update speed whilst resizing with mouse is excruciatingly slow
|
||||
- window count should be typeset nicely in tab ?
|
||||
- track pad scrolling is jerky
|
||||
- sanity check all input in handlePortMessage: etc.
|
||||
- nice looking cursors (both the block and in insert mode) ?
|
||||
- support project builder external editor
|
||||
http://www.codingmonkeys.de/techpubs/externaleditor/pbxexternaleditor.html
|
||||
- dock icon menu
|
||||
- horizontal scrolling with trackpad does not work
|
||||
- got this error when clicking to close second last tab:
|
||||
2007-07-23 08:19:29.398 MacVim[335] *** Assertion failure in -[PSMTabBarControl lockFocus], AppKit.subproj/NSView.m:3248
|
||||
2007-07-23 08:19:29.410 MacVim[335] lockFocus sent to a view whose window is deferred and does not yet have a corresponding platform window
|
||||
|
||||
|
||||
Pending:
|
||||
|
||||
- marked text
|
||||
- set gfn=*
|
||||
- improve drag and drop support (drop in command line mode not working)
|
||||
- System colors don't come out the same as in other apps (as measure with
|
||||
Digital Color Meter)
|
||||
- Select-mode for <S-Key>
|
||||
- Insertion point blinking
|
||||
- Hollow insertion point drawing does not always work
|
||||
- cursor in replace mode
|
||||
- should ignore action message if is called too often (e.g. in addNewTab:)
|
||||
- application:openFiles: should open in tabs in current window instead of in a
|
||||
new window, only if user default is set
|
||||
- Mouse cursor changes depeding on context
|
||||
- Ctrl-C does not update screen until another key press (in command window)
|
||||
- Underline color is never set properly (sp_color)
|
||||
- Lock up when opening large session files (increasing MMFlushTimeoutInterval
|
||||
alleviates this problem)
|
||||
- Respond to "should change" instead of "will change" tab messages
|
||||
- scrolling when mouse is over scrollbar doesn't work
|
||||
- gui dialogs (FEAT_GUI_DIALOG)
|
||||
- no warning when buffer modified outside vim (implement gui_mch_dialog())
|
||||
- call gui_focus_change() when appropriate
|
||||
- ability to interrupt vim (needs to check the run-loop for interrupts)
|
||||
- got this error on Cmd-N with no other windows open:
|
||||
2007-07-27 22:00:17.680 MacVim[454] *** -[NSToolbarView frameDidChange:]: selector not recognized [self = 0x39ba80]
|
||||
2007-07-27 22:00:17.690 MacVim[454] Exception raised during posting of notification. Ignored. exception: *** -[NSToolbarView frameDidChange:]: selector not recognized [self = 0x39ba80]
|
||||
- got this error when opening MacVim from terminal (with 'gvim gvimrc&'):
|
||||
Frost:~/Projects/vim7/src/MacVim winckler$ 2007-08-05 13:25:01.151 MacVim[223] *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
2007-08-05 13:25:01.152 MacVim[223] Exception raised during posting of notification. Ignored. exception: *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
2007-08-05 13:25:01.155 MacVim[223] *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
2007-08-05 13:25:01.156 MacVim[223] Exception raised during posting of notification. Ignored. exception: *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
2007-08-05 13:25:01.246 MacVim[223] *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
2007-08-05 13:25:01.247 MacVim[223] Exception raised during posting of notification. Ignored. exception: *** -[NSThemeFrame frameDidChange:]: selector not recognized [self = 0x3baa30]
|
||||
- toogle toolbar off, maximize window, toolbar on -> text view under toolbar
|
||||
- clicking pill button does not update 'guioptions'
|
||||
- detect Cmd-. (and Ctrl-C) for interrupt
|
||||
|
||||
|
||||
Done:
|
||||
|
||||
- :popup
|
||||
- popup menus
|
||||
- when only one tab open make <D-w> close window
|
||||
- cscope, ctags
|
||||
- Ctrl-O in insert mode
|
||||
- remember window position
|
||||
- font selection dialog (:set gfn=*)
|
||||
- services menu
|
||||
- wide characters are badly supported: they render as too wide
|
||||
- dropping directories does not work
|
||||
- memory leak with text view? (need to release text storage)
|
||||
- drag and drop inside view (FEAT_GUI_DND, gui_handle_drop())
|
||||
- hide baseline separator when tabbar is visible (and make sure clicking the
|
||||
hide/show toolbar button in the top right of the corner does not show it
|
||||
again)
|
||||
- toolbar drawing bug
|
||||
- Cmd-zoom -> no input received, drawing broken
|
||||
- scrollbars not positioned over resize box
|
||||
- offset text away from left edge
|
||||
- add menu options with key equiv:
|
||||
Cmd+Option+Left/Right to change tab, Cmd+x/c/v cut/copy/paste,
|
||||
Cmd+z/Z undo/redo, Cmd+o open, Cmd+w/W close tab/window,
|
||||
Cmd+Option+T special characters,
|
||||
etc.
|
||||
- menu key equivalents
|
||||
- startup is a bit flakey (up until openWindowWithRows:columns:)
|
||||
- background color of text view doesn't get set if :colorscheme is in .gvimrc,
|
||||
since textView=nil when setDefaultColorsBackground:foreground: is called
|
||||
- resize window on font change
|
||||
- don't clear the text storage on setMaxRows:: so that display does not go
|
||||
blank when dragging to resize
|
||||
- zoom&resize broken
|
||||
- add user default for min/max tab size
|
||||
- :colorscheme elflord, :set lines+=3 --> colors are not updated properly
|
||||
- use DO to communicate between GUI and Vim (only for two-way communication,
|
||||
one-way communication should still use mach ports)
|
||||
- make scrollbar inactive if it is too small to display properly
|
||||
- make vertical scrollbars cover command line as well
|
||||
- setting font in .gvimrc has no effect since textStorage has not been init'ed
|
||||
- fonts
|
||||
- scroll bars
|
||||
- Make MacVim project depend on PSMTabBarControl project
|
||||
- Change Makefile so that it builds a vim executable and copy this into the
|
||||
MacVim.app from the MacVim project
|
||||
- warning before closing modified buffer
|
||||
- On quitting, warn user if modified files are open
|
||||
- An untitled window should not open when the GUI is started from the terminal
|
||||
(figure out how to pass '-nowindow yes' option when launching GUI)
|
||||
- support using VimTask as a standalone terminal app, with support for :gui
|
||||
- path is set to / when not starting from command line, set it to $HOME instead
|
||||
- input of wide characters does not work
|
||||
- tab completion doesn't work on iMac
|
||||
- close icons on tabs don't appear on iMac
|
||||
- toolbar
|
||||
- copy runtime files to bundle properly (only works for debug at the moment)
|
||||
- don't resize to make window bigger than what can fit on screen
|
||||
- window resizing using mouse & zoom
|
||||
- cmd-click to maximize window, :tabnew...the text view overlaps the tabline
|
||||
- colorscheme changes are buggy (open two tabs, change colorscheme, open new
|
||||
tab; the new tab has wrong color on first and last lines.)
|
||||
- tab selection bug: open three tabs, selct middle, drag last tab so it becomes
|
||||
middle without selecting it, select middle tab...selects middle, then last
|
||||
- tab selection bug #2: :tabnew, drag tab #2 to pos #1, press enter. tab #2 is
|
||||
selected.
|
||||
- this stuffs up the display: set go-=e; :tabnew
|
||||
- with 2 tabs: closing one tab using mouse makes screen flash (does not happen
|
||||
if tab is closed using :q)
|
||||
- resize to fit every draw update
|
||||
- insertion point
|
||||
- copy/paste
|
||||
- compute text storage size based on actual content
|
||||
- color changes (:colorscheme)
|
||||
- set text storage dimensions properly when creating text view
|
||||
- text dimension changes
|
||||
- notify vim task when user closes/selects tabs
|
||||
- mouse handling in text view
|
||||
- file type associations (Info.plist)
|
||||
- drag and drop onto app icon
|
||||
- remove tab update hack when flushing (edit vim code to call update)
|
||||
- crash when typing :browse e $vim (but not :browse e $vim/)
|
||||
- maintain queue of messages to send from task (to ensure they are passed in
|
||||
the same order they arrive)
|
||||
- do not include shift flag in chars that are already shifted (%, A, etc.)
|
||||
- open file(s) in tab(s) (never open in new window?)
|
||||
- key handling:
|
||||
<M-Space> works, <M-S-Space> does not
|
||||
clean up dispatchKeyEvent
|
||||
- reordering tab pages (gui tabs must have same order as vim tabs)
|
||||
- make sure tab is wide enough to fit label
|
||||
- encoding (did_set_string_option, option.c, line 5675)
|
||||
in init:
|
||||
set_option_value((char_u *)"termencoding", 0L, (char_u *)"utf-8", 0);
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user