on master help sign in
improve test harness
502d329Skyler Hawthorne
Cargo.lock+187−98
@@ -13,9 +13,9 @@ dependencies = [
13
13
14[[package]]
14[[package]]
15name = "anyhow"
15name = "anyhow"
16−version = "1.0.57"
16+version = "1.0.53"
17source = "registry+https://github.com/rust-lang/crates.io-index"
17source = "registry+https://github.com/rust-lang/crates.io-index"
18−checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc"
18+checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
19
19
20[[package]]
20[[package]]
21name = "arc-swap"
21name = "arc-swap"
@@ -25,9 +25,9 @@ checksum = "c5d78ce20460b82d3fa150275ed9d55e21064fc7951177baacf86a145c4a4b1f"
25
25
26[[package]]
26[[package]]
27name = "autocfg"
27name = "autocfg"
28−version = "1.1.0"
28+version = "1.0.1"
29source = "registry+https://github.com/rust-lang/crates.io-index"
29source = "registry+https://github.com/rust-lang/crates.io-index"
30−checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
30+checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
31
31
32[[package]]
32[[package]]
33name = "bitflags"
33name = "bitflags"
@@ -66,9 +66,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
66
66
67[[package]]
67[[package]]
68name = "cc"
68name = "cc"
69−version = "1.0.73"
69+version = "1.0.72"
70source = "registry+https://github.com/rust-lang/crates.io-index"
70source = "registry+https://github.com/rust-lang/crates.io-index"
71−checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
71+checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
72
72
73[[package]]
73[[package]]
74name = "cfg-if"
74name = "cfg-if"
@@ -121,9 +121,9 @@ dependencies = [
121
121
122[[package]]
122[[package]]
123name = "crossbeam-utils"
123name = "crossbeam-utils"
124−version = "0.8.8"
124+version = "0.8.7"
125source = "registry+https://github.com/rust-lang/crates.io-index"
125source = "registry+https://github.com/rust-lang/crates.io-index"
126−checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
126+checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
127dependencies = [
127dependencies = [
128 "cfg-if",
128 "cfg-if",
129 "lazy_static",
129 "lazy_static",
@@ -131,15 +131,15 @@ dependencies = [
131
131
132[[package]]
132[[package]]
133name = "crossterm"
133name = "crossterm"
134−version = "0.23.2"
134+version = "0.23.0"
135source = "registry+https://github.com/rust-lang/crates.io-index"
135source = "registry+https://github.com/rust-lang/crates.io-index"
136−checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17"
136+checksum = "77b75a27dc8d220f1f8521ea69cd55a34d720a200ebb3a624d9aa19193d3b432"
137dependencies = [
137dependencies = [
138 "bitflags",
138 "bitflags",
139 "crossterm_winapi",
139 "crossterm_winapi",
140 "futures-core",
140 "futures-core",
141 "libc",
141 "libc",
142− "mio",
142+ "mio 0.7.14",
143 "parking_lot",
143 "parking_lot",
144 "signal-hook",
144 "signal-hook",
145 "signal-hook-mio",
145 "signal-hook-mio",
@@ -184,9 +184,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
184
184
185[[package]]
185[[package]]
186name = "encoding_rs"
186name = "encoding_rs"
187−version = "0.8.31"
187+version = "0.8.30"
188source = "registry+https://github.com/rust-lang/crates.io-index"
188source = "registry+https://github.com/rust-lang/crates.io-index"
189−checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
189+checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df"
190dependencies = [
190dependencies = [
191 "cfg-if",
191 "cfg-if",
192]
192]
@@ -293,9 +293,9 @@ dependencies = [
293
293
294[[package]]
294[[package]]
295name = "getrandom"
295name = "getrandom"
296−version = "0.2.6"
296+version = "0.2.4"
297source = "registry+https://github.com/rust-lang/crates.io-index"
297source = "registry+https://github.com/rust-lang/crates.io-index"
298−checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
298+checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
299dependencies = [
299dependencies = [
300 "cfg-if",
300 "cfg-if",
301 "libc",
301 "libc",
@@ -452,6 +452,7 @@ dependencies = [
452 "helix-tui",
452 "helix-tui",
453 "helix-view",
453 "helix-view",
454 "ignore",
454 "ignore",
455+ "indoc",
455 "log",
456 "log",
456 "once_cell",
457 "once_cell",
457 "pulldown-cmark",
458 "pulldown-cmark",
@@ -460,6 +461,7 @@ dependencies = [
460 "serde_json",
461 "serde_json",
461 "signal-hook",
462 "signal-hook",
462 "signal-hook-tokio",
463 "signal-hook-tokio",
464+ "smallvec",
463 "tokio",
465 "tokio",
464 "tokio-stream",
466 "tokio-stream",
465 "toml",
467 "toml",
@@ -544,11 +546,20 @@ dependencies = [
544 "winapi-util",
546 "winapi-util",
545]
547]
546
548
549+[[package]]
550+name = "indoc"
551+version = "1.0.3"
552+source = "registry+https://github.com/rust-lang/crates.io-index"
553+checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136"
554+dependencies = [
555+ "unindent",
556+]
557+
547[[package]]
558[[package]]
548name = "itoa"
559name = "itoa"
549−version = "1.0.2"
560+version = "1.0.1"
550source = "registry+https://github.com/rust-lang/crates.io-index"
561source = "registry+https://github.com/rust-lang/crates.io-index"
551−checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
562+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
552
563
553[[package]]
564[[package]]
554name = "lazy_static"
565name = "lazy_static"
@@ -558,9 +569,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
558
569
559[[package]]
570[[package]]
560name = "libc"
571name = "libc"
561−version = "0.2.126"
572+version = "0.2.125"
562source = "registry+https://github.com/rust-lang/crates.io-index"
573source = "registry+https://github.com/rust-lang/crates.io-index"
563−checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
574+checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
564
575
565[[package]]
576[[package]]
566name = "libloading"
577name = "libloading"
@@ -574,19 +585,18 @@ dependencies = [
574
585
575[[package]]
586[[package]]
576name = "lock_api"
587name = "lock_api"
577−version = "0.4.7"
588+version = "0.4.6"
578source = "registry+https://github.com/rust-lang/crates.io-index"
589source = "registry+https://github.com/rust-lang/crates.io-index"
579−checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
590+checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
580dependencies = [
591dependencies = [
581− "autocfg",
582 "scopeguard",
592 "scopeguard",
583]
593]
584
594
585[[package]]
595[[package]]
586name = "log"
596name = "log"
587−version = "0.4.17"
597+version = "0.4.14"
588source = "registry+https://github.com/rust-lang/crates.io-index"
598source = "registry+https://github.com/rust-lang/crates.io-index"
589−checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
599+checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
590dependencies = [
600dependencies = [
591 "cfg-if",
601 "cfg-if",
592]
602]
@@ -612,9 +622,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
612
622
613[[package]]
623[[package]]
614name = "memchr"
624name = "memchr"
615−version = "2.5.0"
625+version = "2.4.1"
616source = "registry+https://github.com/rust-lang/crates.io-index"
626source = "registry+https://github.com/rust-lang/crates.io-index"
617−checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
627+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
618
628
619[[package]]
629[[package]]
620name = "memmap2"
630name = "memmap2"
@@ -625,6 +635,19 @@ dependencies = [
625 "libc",
635 "libc",
626]
636]
627
637
638+[[package]]
639+name = "mio"
640+version = "0.7.14"
641+source = "registry+https://github.com/rust-lang/crates.io-index"
642+checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
643+dependencies = [
644+ "libc",
645+ "log",
646+ "miow",
647+ "ntapi",
648+ "winapi",
649+]
650+
628[[package]]
651[[package]]
629name = "mio"
652name = "mio"
630version = "0.8.3"
653version = "0.8.3"
@@ -634,14 +657,32 @@ dependencies = [
634 "libc",
657 "libc",
635 "log",
658 "log",
636 "wasi 0.11.0+wasi-snapshot-preview1",
659 "wasi 0.11.0+wasi-snapshot-preview1",
637− "windows-sys",
660+ "windows-sys 0.36.1",
661+]
662+
663+[[package]]
664+name = "miow"
665+version = "0.3.7"
666+source = "registry+https://github.com/rust-lang/crates.io-index"
667+checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
668+dependencies = [
669+ "winapi",
670+]
671+
672+[[package]]
673+name = "ntapi"
674+version = "0.3.6"
675+source = "registry+https://github.com/rust-lang/crates.io-index"
676+checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
677+dependencies = [
678+ "winapi",
638]
679]
639
680
640[[package]]
681[[package]]
641name = "num-integer"
682name = "num-integer"
642−version = "0.1.45"
683+version = "0.1.44"
643source = "registry+https://github.com/rust-lang/crates.io-index"
684source = "registry+https://github.com/rust-lang/crates.io-index"
644−checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
685+checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
645dependencies = [
686dependencies = [
646 "autocfg",
687 "autocfg",
647 "num-traits",
688 "num-traits",
@@ -649,9 +690,9 @@ dependencies = [
649
690
650[[package]]
691[[package]]
651name = "num-traits"
692name = "num-traits"
652−version = "0.2.15"
693+version = "0.2.14"
653source = "registry+https://github.com/rust-lang/crates.io-index"
694source = "registry+https://github.com/rust-lang/crates.io-index"
654−checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
695+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
655dependencies = [
696dependencies = [
656 "autocfg",
697 "autocfg",
657]
698]
@@ -684,15 +725,15 @@ dependencies = [
684
725
685[[package]]
726[[package]]
686name = "parking_lot_core"
727name = "parking_lot_core"
687−version = "0.9.3"
728+version = "0.9.1"
688source = "registry+https://github.com/rust-lang/crates.io-index"
729source = "registry+https://github.com/rust-lang/crates.io-index"
689−checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
730+checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
690dependencies = [
731dependencies = [
691 "cfg-if",
732 "cfg-if",
692 "libc",
733 "libc",
693 "redox_syscall",
734 "redox_syscall",
694 "smallvec",
735 "smallvec",
695− "windows-sys",
736+ "windows-sys 0.32.0",
696]
737]
697
738
698[[package]]
739[[package]]
@@ -703,9 +744,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
703
744
704[[package]]
745[[package]]
705name = "pin-project-lite"
746name = "pin-project-lite"
706−version = "0.2.9"
747+version = "0.2.8"
707source = "registry+https://github.com/rust-lang/crates.io-index"
748source = "registry+https://github.com/rust-lang/crates.io-index"
708−checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
749+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
709
750
710[[package]]
751[[package]]
711name = "pin-utils"
752name = "pin-utils"
@@ -715,11 +756,11 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
715
756
716[[package]]
757[[package]]
717name = "proc-macro2"
758name = "proc-macro2"
718−version = "1.0.39"
759+version = "1.0.36"
719source = "registry+https://github.com/rust-lang/crates.io-index"
760source = "registry+https://github.com/rust-lang/crates.io-index"
720−checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
761+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
721dependencies = [
762dependencies = [
722− "unicode-ident",
763+ "unicode-xid",
723]
764]
724
765
725[[package]]
766[[package]]
@@ -744,18 +785,18 @@ dependencies = [
744
785
745[[package]]
786[[package]]
746name = "quote"
787name = "quote"
747−version = "1.0.18"
788+version = "1.0.15"
748source = "registry+https://github.com/rust-lang/crates.io-index"
789source = "registry+https://github.com/rust-lang/crates.io-index"
749−checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
790+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
750dependencies = [
791dependencies = [
751 "proc-macro2",
792 "proc-macro2",
752]
793]
753
794
754[[package]]
795[[package]]
755name = "rand"
796name = "rand"
756−version = "0.8.5"
797+version = "0.8.4"
757source = "registry+https://github.com/rust-lang/crates.io-index"
798source = "registry+https://github.com/rust-lang/crates.io-index"
758−checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
799+checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
759dependencies = [
800dependencies = [
760 "rand_core",
801 "rand_core",
761]
802]
@@ -771,29 +812,28 @@ dependencies = [
771
812
772[[package]]
813[[package]]
773name = "redox_syscall"
814name = "redox_syscall"
774−version = "0.2.13"
815+version = "0.2.10"
775source = "registry+https://github.com/rust-lang/crates.io-index"
816source = "registry+https://github.com/rust-lang/crates.io-index"
776−checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
817+checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
777dependencies = [
818dependencies = [
778 "bitflags",
819 "bitflags",
779]
820]
780
821
781[[package]]
822[[package]]
782name = "redox_users"
823name = "redox_users"
783−version = "0.4.3"
824+version = "0.4.0"
784source = "registry+https://github.com/rust-lang/crates.io-index"
825source = "registry+https://github.com/rust-lang/crates.io-index"
785−checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
826+checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
786dependencies = [
827dependencies = [
787 "getrandom",
828 "getrandom",
788 "redox_syscall",
829 "redox_syscall",
789− "thiserror",
790]
830]
791
831
792[[package]]
832[[package]]
793name = "regex"
833name = "regex"
794−version = "1.5.6"
834+version = "1.5.4"
795source = "registry+https://github.com/rust-lang/crates.io-index"
835source = "registry+https://github.com/rust-lang/crates.io-index"
796−checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
836+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
797dependencies = [
837dependencies = [
798 "aho-corasick",
838 "aho-corasick",
799 "memchr",
839 "memchr",
@@ -808,15 +848,15 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
808
848
809[[package]]
849[[package]]
810name = "regex-syntax"
850name = "regex-syntax"
811−version = "0.6.26"
851+version = "0.6.25"
812source = "registry+https://github.com/rust-lang/crates.io-index"
852source = "registry+https://github.com/rust-lang/crates.io-index"
813−checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
853+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
814
854
815[[package]]
855[[package]]
816name = "retain_mut"
856name = "retain_mut"
817−version = "0.1.9"
857+version = "0.1.7"
818source = "registry+https://github.com/rust-lang/crates.io-index"
858source = "registry+https://github.com/rust-lang/crates.io-index"
819−checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
859+checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086"
820
860
821[[package]]
861[[package]]
822name = "ropey"
862name = "ropey"
@@ -830,9 +870,9 @@ dependencies = [
830
870
831[[package]]
871[[package]]
832name = "ryu"
872name = "ryu"
833−version = "1.0.10"
873+version = "1.0.9"
834source = "registry+https://github.com/rust-lang/crates.io-index"
874source = "registry+https://github.com/rust-lang/crates.io-index"
835−checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
875+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
836
876
837[[package]]
877[[package]]
838name = "same-file"
878name = "same-file"
@@ -851,18 +891,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
851
891
852[[package]]
892[[package]]
853name = "serde"
893name = "serde"
854−version = "1.0.137"
894+version = "1.0.136"
855source = "registry+https://github.com/rust-lang/crates.io-index"
895source = "registry+https://github.com/rust-lang/crates.io-index"
856−checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
896+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
857dependencies = [
897dependencies = [
858 "serde_derive",
898 "serde_derive",
859]
899]
860
900
861[[package]]
901[[package]]
862name = "serde_derive"
902name = "serde_derive"
863−version = "1.0.137"
903+version = "1.0.136"
864source = "registry+https://github.com/rust-lang/crates.io-index"
904source = "registry+https://github.com/rust-lang/crates.io-index"
865−checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
905+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
866dependencies = [
906dependencies = [
867 "proc-macro2",
907 "proc-macro2",
868 "quote",
908 "quote",
@@ -871,9 +911,9 @@ dependencies = [
871
911
872[[package]]
912[[package]]
873name = "serde_json"
913name = "serde_json"
874−version = "1.0.81"
914+version = "1.0.79"
875source = "registry+https://github.com/rust-lang/crates.io-index"
915source = "registry+https://github.com/rust-lang/crates.io-index"
876−checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
916+checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
877dependencies = [
917dependencies = [
878 "itoa",
918 "itoa",
879 "ryu",
919 "ryu",
@@ -882,9 +922,9 @@ dependencies = [
882
922
883[[package]]
923[[package]]
884name = "serde_repr"
924name = "serde_repr"
885−version = "0.1.8"
925+version = "0.1.7"
886source = "registry+https://github.com/rust-lang/crates.io-index"
926source = "registry+https://github.com/rust-lang/crates.io-index"
887−checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed"
927+checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5"
888dependencies = [
928dependencies = [
889 "proc-macro2",
929 "proc-macro2",
890 "quote",
930 "quote",
@@ -903,12 +943,12 @@ dependencies = [
903
943
904[[package]]
944[[package]]
905name = "signal-hook-mio"
945name = "signal-hook-mio"
906−version = "0.2.3"
946+version = "0.2.1"
907source = "registry+https://github.com/rust-lang/crates.io-index"
947source = "registry+https://github.com/rust-lang/crates.io-index"
908−checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
948+checksum = "29fd5867f1c4f2c5be079aee7a2adf1152ebb04a4bc4d341f504b7dece607ed4"
909dependencies = [
949dependencies = [
910 "libc",
950 "libc",
911− "mio",
951+ "mio 0.7.14",
912 "signal-hook",
952 "signal-hook",
913]
953]
914
954
@@ -941,9 +981,9 @@ checksum = "2e24979f63a11545f5f2c60141afe249d4f19f84581ea2138065e400941d83d3"
941
981
942[[package]]
982[[package]]
943name = "slab"
983name = "slab"
944−version = "0.4.6"
984+version = "0.4.5"
945source = "registry+https://github.com/rust-lang/crates.io-index"
985source = "registry+https://github.com/rust-lang/crates.io-index"
946−checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
986+checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
947
987
948[[package]]
988[[package]]
949name = "slotmap"
989name = "slotmap"
@@ -995,9 +1035,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
995
1035
996[[package]]
1036[[package]]
997name = "str-buf"
1037name = "str-buf"
998−version = "1.0.6"
1038+version = "1.0.5"
999source = "registry+https://github.com/rust-lang/crates.io-index"
1039source = "registry+https://github.com/rust-lang/crates.io-index"
1000−checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
1040+checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a"
1001
1041
1002[[package]]
1042[[package]]
1003name = "str_indices"
1043name = "str_indices"
@@ -1007,13 +1047,13 @@ checksum = "9d9199fa80c817e074620be84374a520062ebac833f358d74b37060ce4a0f2c0"
1007
1047
1008[[package]]
1048[[package]]
1009name = "syn"
1049name = "syn"
1010−version = "1.0.95"
1050+version = "1.0.86"
1011source = "registry+https://github.com/rust-lang/crates.io-index"
1051source = "registry+https://github.com/rust-lang/crates.io-index"
1012−checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942"
1052+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
1013dependencies = [
1053dependencies = [
1014 "proc-macro2",
1054 "proc-macro2",
1015 "quote",
1055 "quote",
1016− "unicode-ident",
1056+ "unicode-xid",
1017]
1057]
1018
1058
1019[[package]]
1059[[package]]
@@ -1029,18 +1069,18 @@ dependencies = [
1029
1069
1030[[package]]
1070[[package]]
1031name = "thiserror"
1071name = "thiserror"
1032−version = "1.0.31"
1072+version = "1.0.30"
1033source = "registry+https://github.com/rust-lang/crates.io-index"
1073source = "registry+https://github.com/rust-lang/crates.io-index"
1034−checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a"
1074+checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
1035dependencies = [
1075dependencies = [
1036 "thiserror-impl",
1076 "thiserror-impl",
1037]
1077]
1038
1078
1039[[package]]
1079[[package]]
1040name = "thiserror-impl"
1080name = "thiserror-impl"
1041−version = "1.0.31"
1081+version = "1.0.30"
1042source = "registry+https://github.com/rust-lang/crates.io-index"
1082source = "registry+https://github.com/rust-lang/crates.io-index"
1043−checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
1083+checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
1044dependencies = [
1084dependencies = [
1045 "proc-macro2",
1085 "proc-macro2",
1046 "quote",
1086 "quote",
@@ -1067,9 +1107,9 @@ dependencies = [
1067
1107
1068[[package]]
1108[[package]]
1069name = "tinyvec"
1109name = "tinyvec"
1070−version = "1.6.0"
1110+version = "1.5.1"
1071source = "registry+https://github.com/rust-lang/crates.io-index"
1111source = "registry+https://github.com/rust-lang/crates.io-index"
1072−checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
1112+checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
1073dependencies = [
1113dependencies = [
1074 "tinyvec_macros",
1114 "tinyvec_macros",
1075]
1115]
@@ -1089,7 +1129,7 @@ dependencies = [
1089 "bytes",
1129 "bytes",
1090 "libc",
1130 "libc",
1091 "memchr",
1131 "memchr",
1092− "mio",
1132+ "mio 0.8.3",
1093 "num_cpus",
1133 "num_cpus",
1094 "once_cell",
1134 "once_cell",
1095 "parking_lot",
1135 "parking_lot",
@@ -1133,9 +1173,9 @@ dependencies = [
1133
1173
1134[[package]]
1174[[package]]
1135name = "tree-sitter"
1175name = "tree-sitter"
1136−version = "0.20.6"
1176+version = "0.20.4"
1137source = "registry+https://github.com/rust-lang/crates.io-index"
1177source = "registry+https://github.com/rust-lang/crates.io-index"
1138−checksum = "09b3b781640108d29892e8b9684642d2cda5ea05951fd58f0fea1db9edeb9b71"
1178+checksum = "4e34327f8eac545e3f037382471b2b19367725a242bba7bc45edb9efb49fe39a"
1139dependencies = [
1179dependencies = [
1140 "cc",
1180 "cc",
1141 "regex",
1181 "regex",
@@ -1152,9 +1192,9 @@ dependencies = [
1152
1192
1153[[package]]
1193[[package]]
1154name = "unicode-bidi"
1194name = "unicode-bidi"
1155−version = "0.3.8"
1195+version = "0.3.7"
1156source = "registry+https://github.com/rust-lang/crates.io-index"
1196source = "registry+https://github.com/rust-lang/crates.io-index"
1157−checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
1197+checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
1158
1198
1159[[package]]
1199[[package]]
1160name = "unicode-general-category"
1200name = "unicode-general-category"
@@ -1162,12 +1202,6 @@ version = "0.5.1"
1162source = "registry+https://github.com/rust-lang/crates.io-index"
1202source = "registry+https://github.com/rust-lang/crates.io-index"
1163checksum = "1218098468b8085b19a2824104c70d976491d247ce194bbd9dc77181150cdfd6"
1203checksum = "1218098468b8085b19a2824104c70d976491d247ce194bbd9dc77181150cdfd6"
1164
1204
1165−[[package]]
1166−name = "unicode-ident"
1167−version = "1.0.0"
1168−source = "registry+https://github.com/rust-lang/crates.io-index"
1169−checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
1170−
1171[[package]]
1205[[package]]
1172name = "unicode-linebreak"
1206name = "unicode-linebreak"
1173version = "0.1.2"
1207version = "0.1.2"
@@ -1198,6 +1232,18 @@ version = "0.1.9"
1198source = "registry+https://github.com/rust-lang/crates.io-index"
1232source = "registry+https://github.com/rust-lang/crates.io-index"
1199checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
1233checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
1200
1234
1235+[[package]]
1236+name = "unicode-xid"
1237+version = "0.2.2"
1238+source = "registry+https://github.com/rust-lang/crates.io-index"
1239+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
1240+
1241+[[package]]
1242+name = "unindent"
1243+version = "0.1.7"
1244+source = "registry+https://github.com/rust-lang/crates.io-index"
1245+checksum = "f14ee04d9415b52b3aeab06258a3f07093182b88ba0f9b8d203f211a7a7d41c7"
1246+
1201[[package]]
1247[[package]]
1202name = "url"
1248name = "url"
1203version = "2.2.2"
1249version = "2.2.2"
@@ -1242,9 +1288,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
1242
1288
1243[[package]]
1289[[package]]
1244name = "which"
1290name = "which"
1245−version = "4.2.5"
1291+version = "4.2.4"
1246source = "registry+https://github.com/rust-lang/crates.io-index"
1292source = "registry+https://github.com/rust-lang/crates.io-index"
1247−checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
1293+checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
1248dependencies = [
1294dependencies = [
1249 "either",
1295 "either",
1250 "lazy_static",
1296 "lazy_static",
@@ -1282,43 +1328,86 @@ version = "0.4.0"
1282source = "registry+https://github.com/rust-lang/crates.io-index"
1328source = "registry+https://github.com/rust-lang/crates.io-index"
1283checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1329checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1284
1330
1331+[[package]]
1332+name = "windows-sys"
1333+version = "0.32.0"
1334+source = "registry+https://github.com/rust-lang/crates.io-index"
1335+checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
1336+dependencies = [
1337+ "windows_aarch64_msvc 0.32.0",
1338+ "windows_i686_gnu 0.32.0",
1339+ "windows_i686_msvc 0.32.0",
1340+ "windows_x86_64_gnu 0.32.0",
1341+ "windows_x86_64_msvc 0.32.0",
1342+]
1343+
1285[[package]]
1344[[package]]
1286name = "windows-sys"
1345name = "windows-sys"
1287version = "0.36.1"
1346version = "0.36.1"
1288source = "registry+https://github.com/rust-lang/crates.io-index"
1347source = "registry+https://github.com/rust-lang/crates.io-index"
1289checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
1348checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
1290dependencies = [
1349dependencies = [
1291− "windows_aarch64_msvc",
1350+ "windows_aarch64_msvc 0.36.1",
1292− "windows_i686_gnu",
1351+ "windows_i686_gnu 0.36.1",
1293− "windows_i686_msvc",
1352+ "windows_i686_msvc 0.36.1",
1294− "windows_x86_64_gnu",
1353+ "windows_x86_64_gnu 0.36.1",
1295− "windows_x86_64_msvc",
1354+ "windows_x86_64_msvc 0.36.1",
1296]
1355]
1297
1356
1357+[[package]]
1358+name = "windows_aarch64_msvc"
1359+version = "0.32.0"
1360+source = "registry+https://github.com/rust-lang/crates.io-index"
1361+checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
1362+
1298[[package]]
1363[[package]]
1299name = "windows_aarch64_msvc"
1364name = "windows_aarch64_msvc"
1300version = "0.36.1"
1365version = "0.36.1"
1301source = "registry+https://github.com/rust-lang/crates.io-index"
1366source = "registry+https://github.com/rust-lang/crates.io-index"
1302checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
1367checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
1303
1368
1369+[[package]]
1370+name = "windows_i686_gnu"
1371+version = "0.32.0"
1372+source = "registry+https://github.com/rust-lang/crates.io-index"
1373+checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
1374+
1304[[package]]
1375[[package]]
1305name = "windows_i686_gnu"
1376name = "windows_i686_gnu"
1306version = "0.36.1"
1377version = "0.36.1"
1307source = "registry+https://github.com/rust-lang/crates.io-index"
1378source = "registry+https://github.com/rust-lang/crates.io-index"
1308checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
1379checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
1309
1380
1381+[[package]]
1382+name = "windows_i686_msvc"
1383+version = "0.32.0"
1384+source = "registry+https://github.com/rust-lang/crates.io-index"
1385+checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
1386+
1310[[package]]
1387[[package]]
1311name = "windows_i686_msvc"
1388name = "windows_i686_msvc"
1312version = "0.36.1"
1389version = "0.36.1"
1313source = "registry+https://github.com/rust-lang/crates.io-index"
1390source = "registry+https://github.com/rust-lang/crates.io-index"
1314checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
1391checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
1315
1392
1393+[[package]]
1394+name = "windows_x86_64_gnu"
1395+version = "0.32.0"
1396+source = "registry+https://github.com/rust-lang/crates.io-index"
1397+checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
1398+
1316[[package]]
1399[[package]]
1317name = "windows_x86_64_gnu"
1400name = "windows_x86_64_gnu"
1318version = "0.36.1"
1401version = "0.36.1"
1319source = "registry+https://github.com/rust-lang/crates.io-index"
1402source = "registry+https://github.com/rust-lang/crates.io-index"
1320checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
1403checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
1321
1404
1405+[[package]]
1406+name = "windows_x86_64_msvc"
1407+version = "0.32.0"
1408+source = "registry+https://github.com/rust-lang/crates.io-index"
1409+checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
1410+
1322[[package]]
1411[[package]]
1323name = "windows_x86_64_msvc"
1412name = "windows_x86_64_msvc"
1324version = "0.36.1"
1413version = "0.36.1"
helix-core/Cargo.toml+1
@@ -12,6 +12,7 @@ include = ["src/**/*", "README.md"]
12
12
13[features]
13[features]
14unicode-lines = ["ropey/unicode_lines"]
14unicode-lines = ["ropey/unicode_lines"]
15+integration = []
15
16
16[dependencies]
17[dependencies]
17helix-loader = { version = "0.6", path = "../helix-loader" }
18helix-loader = { version = "0.6", path = "../helix-loader" }
helix-loader/src/lib.rs+5−5
@@ -11,17 +11,17 @@ pub fn runtime_dir() -> std::path::PathBuf {
11 return dir.into();
11 return dir.into();
12 }
12 }
13
13
14+ if let Ok(dir) = std::env::var("CARGO_MANIFEST_DIR") {
15+ // this is the directory of the crate being run by cargo, we need the workspace path so we take the parent
16+ return std::path::PathBuf::from(dir).parent().unwrap().join(RT_DIR);
17+ }
18+
14 const RT_DIR: &str = "runtime";
19 const RT_DIR: &str = "runtime";
15 let conf_dir = config_dir().join(RT_DIR);
20 let conf_dir = config_dir().join(RT_DIR);
16 if conf_dir.exists() {
21 if conf_dir.exists() {
17 return conf_dir;
22 return conf_dir;
18 }
23 }
19
24
20− if let Ok(dir) = std::env::var("CARGO_MANIFEST_DIR") {
21− // this is the directory of the crate being run by cargo, we need the workspace path so we take the parent
22− return std::path::PathBuf::from(dir).parent().unwrap().join(RT_DIR);
23− }
24−
25 // fallback to location of the executable being run
25 // fallback to location of the executable being run
26 std::env::current_exe()
26 std::env::current_exe()
27 .ok()
27 .ok()
helix-term/Cargo.toml+5
@@ -17,6 +17,7 @@ app = true
17
17
18[features]
18[features]
19unicode-lines = ["helix-core/unicode-lines"]
19unicode-lines = ["helix-core/unicode-lines"]
20+integration = []
20
21
21[[bin]]
22[[bin]]
22name = "hx"
23name = "hx"
@@ -73,3 +74,7 @@ signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
73
74
74[build-dependencies]
75[build-dependencies]
75helix-loader = { version = "0.6", path = "../helix-loader" }
76helix-loader = { version = "0.6", path = "../helix-loader" }
77+
78+[dev-dependencies]
79+smallvec = "1.8"
80+indoc = "1.0.3"
helix-term/src/application.rs+14−6
@@ -187,13 +187,21 @@ impl Application {
187 }
187 }
188
188
189 fn render(&mut self) {
189 fn render(&mut self) {
190+ #[cfg(feature = "integration")]
191+ return;
192+
193+ #[allow(unreachable_code)]
194+ {
190− let mut cx = crate::compositor::Context {
195+ let compositor = &mut self.compositor;
191− editor: &mut self.editor,
192− jobs: &mut self.jobs,
193− scroll: None,
194− };
195
196
197+ let mut cx = crate::compositor::Context {
198+ editor: &mut self.editor,
199+ jobs: &mut self.jobs,
200+ scroll: None,
201+ };
202+
196− // self.compositor.render(&mut cx);
203+ compositor.render(&mut cx);
204+ }
197 }
205 }
198
206
199 pub async fn event_loop(&mut self) {
207 pub async fn event_loop(&mut self) {
helix-term/tests/integration.rs+146−17
@@ -1,24 +1,153 @@
1−use helix_term::{application::Application, args::Args, config::Config};
1+#[cfg(feature = "integration")]
2−use helix_view::current;
2+mod integration {
3+ use std::path::PathBuf;
3
4
4−use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
5+ use helix_core::{syntax::AutoPairConfig, Position, Selection, Tendril, Transaction};
6+ use helix_term::{application::Application, args::Args, config::Config};
7+ use helix_view::{current, doc, input::parse_macro};
5
8
6−#[tokio::test]
9+ use crossterm::event::{Event, KeyEvent};
7−async fn it_works() {
10+ use indoc::indoc;
8− let args = Args::default();
9− let config = Config::default();
10− let mut app = Application::new(args, config).unwrap();
11
11
12− let inputs = &['i', 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'];
12+ pub struct TestCase {
13+ pub in_text: String,
14+ pub in_selection: Selection,
15+ pub in_keys: String,
16+ pub out_text: String,
17+ pub out_selection: Selection,
18+ }
19+
20+ fn test_key_sequence(
21+ app: Option<Application>,
22+ test_case: &TestCase,
23+ test_fn: &dyn Fn(&mut Application),
24+ ) -> anyhow::Result<()> {
25+ let mut app =
26+ app.unwrap_or_else(|| Application::new(Args::default(), Config::default()).unwrap());
27+
28+ let (view, doc) = current!(app.editor);
29+
30+ doc.apply(
31+ &Transaction::insert(
32+ doc.text(),
33+ &Selection::single(1, 0),
34+ Tendril::from(&test_case.in_text),
35+ )
36+ .with_selection(test_case.in_selection.clone()),
37+ view.id,
38+ );
39+
40+ let input_keys = parse_macro(&test_case.in_keys)?
41+ .into_iter()
42+ .map(|key_event| Event::Key(KeyEvent::from(key_event)));
43+
44+ for key in input_keys {
45+ app.handle_terminal_events(Ok(key));
46+ }
47+
48+ test_fn(&mut app);
49+
50+ Ok(())
51+ }
52+
53+ /// Use this for very simple test cases where there is one input
54+ /// document, selection, and sequence of key presses, and you just
55+ /// want to verify the resulting document and selection.
56+ fn test_key_sequence_text_result(
57+ args: Args,
58+ config: Config,
59+ test_case: TestCase,
60+ ) -> anyhow::Result<()> {
61+ let app = Application::new(args, config).unwrap();
62+
63+ test_key_sequence(Some(app), &test_case, &|app| {
64+ let doc = doc!(app.editor);
65+ assert_eq!(&test_case.out_text, doc.text());
13
66
14− for input in inputs {
67+ let mut selections: Vec<_> = doc.selections().values().cloned().collect();
15− // TODO: use input.parse::<KeyEvent>
68+ assert_eq!(1, selections.len());
16− app.handle_terminal_events(Ok(Event::Key(KeyEvent {
69+
17− code: KeyCode::Char(*input),
70+ let sel = selections.pop().unwrap();
18− modifiers: KeyModifiers::NONE,
71+ assert_eq!(test_case.out_selection, sel);
19− })));
72+ })?;
73+
74+ Ok(())
75+ }
76+
77+ #[tokio::test]
78+ async fn hello_world() -> anyhow::Result<()> {
79+ test_key_sequence_text_result(
80+ Args::default(),
81+ Config::default(),
82+ TestCase {
83+ in_text: String::new(),
84+ in_selection: Selection::single(0, 1),
85+ // TODO: fix incorrect selection on new doc
86+ in_keys: String::from("ihello world<esc>hl"),
87+ out_text: String::from("hello world\n"),
88+ out_selection: Selection::single(11, 12),
89+ },
90+ )?;
91+
92+ Ok(())
20 }
93 }
21
94
22− let (_, doc) = current!(app.editor);
95+ #[tokio::test]
23− assert_eq!(doc.text(), "hello world\n");
96+ async fn auto_pairs_basic() -> anyhow::Result<()> {
97+ test_key_sequence_text_result(
98+ Args::default(),
99+ Config::default(),
100+ TestCase {
101+ in_text: String::new(),
102+ in_selection: Selection::single(0, 1),
103+ in_keys: String::from("i(<esc>hl"),
104+ out_text: String::from("()\n"),
105+ out_selection: Selection::single(1, 2),
106+ },
107+ )?;
108+
109+ test_key_sequence_text_result(
110+ Args::default(),
111+ Config {
112+ editor: helix_view::editor::Config {
113+ auto_pairs: AutoPairConfig::Enable(false),
114+ ..Default::default()
115+ },
116+ ..Default::default()
117+ },
118+ TestCase {
119+ in_text: String::new(),
120+ in_selection: Selection::single(0, 1),
121+ in_keys: String::from("i(<esc>hl"),
122+ out_text: String::from("(\n"),
123+ out_selection: Selection::single(1, 2),
124+ },
125+ )?;
126+
127+ Ok(())
128+ }
129+
130+ #[tokio::test]
131+ async fn auto_indent_rs() -> anyhow::Result<()> {
132+ test_key_sequence_text_result(
133+ Args {
134+ files: vec![(PathBuf::from("foo.c"), Position::default())],
135+ ..Default::default()
136+ },
137+ Config::default(),
138+ TestCase {
139+ in_text: String::from("void foo() {}"),
140+ in_selection: Selection::single(12, 13),
141+ in_keys: String::from("i<ret><esc>"),
142+ out_text: String::from(indoc! {r#"
143+ void foo() {
144+
145+ }
146+ "#}),
147+ out_selection: Selection::single(15, 16),
148+ },
149+ )?;
150+
151+ Ok(())
152+ }
24}
153}
helix-view/src/editor.rs+1
@@ -769,6 +769,7 @@ impl Editor {
769 Ok(self.new_file_from_document(action, Document::from(rope, Some(encoding))))
769 Ok(self.new_file_from_document(action, Document::from(rope, Some(encoding))))
770 }
770 }
771
771
772+ // ???
772 pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
773 pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> {
773 let path = helix_core::path::get_canonicalized_path(&path)?;
774 let path = helix_core::path::get_canonicalized_path(&path)?;
774 let id = self.document_by_path(&path).map(|doc| doc.id);
775 let id = self.document_by_path(&path).map(|doc| doc.id);