Compare commits
2430 Commits
v4.7
...
line-foldi
| Author | SHA1 | Date | |
|---|---|---|---|
| c56bbe74bf | |||
|
|
8e6360d166 | ||
|
|
4e8238edec | ||
|
|
c497a5f90b | ||
|
|
b04a2a18ea | ||
|
|
613fe4b9b2 | ||
|
|
27bf87d21a | ||
|
|
b6faa5d5bb | ||
|
|
4ebd490225 | ||
|
|
f6e9c00f59 | ||
|
|
79b18f462c | ||
|
|
ff68fa7304 | ||
|
|
b6aa309aa7 | ||
|
|
6e39b405c8 | ||
|
|
0c3e596ad7 | ||
|
|
b41de01e6c | ||
|
|
e075df83e9 | ||
|
|
1cff717d98 | ||
|
|
68d4b84610 | ||
|
|
a41f238042 | ||
|
|
e18c6c95e7 | ||
|
|
c4948d5035 | ||
|
|
4c3ab6f5fb | ||
|
|
757ce59330 | ||
|
|
9375b99c52 | ||
|
|
50df473643 | ||
|
|
0c242b8666 | ||
|
|
96adcef377 | ||
|
|
a6046c6668 | ||
|
|
cfb9c08580 | ||
|
|
fde24946da | ||
|
|
9797150ffd | ||
|
|
d43809146f | ||
|
|
2c1bbb5552 | ||
|
|
f63547027c | ||
|
|
ab597a6c2f | ||
|
|
9383ed03a2 | ||
|
|
e1d954c739 | ||
|
|
6d98026285 | ||
|
|
21d5d8707f | ||
|
|
982bca3bd3 | ||
|
|
834b88eed9 | ||
|
|
b273b69cad | ||
|
|
81a3c3e82f | ||
|
|
cebb2a383d | ||
|
|
2adaa1139c | ||
|
|
ad92fe6638 | ||
|
|
4b21ed39c7 | ||
|
|
21b833d423 | ||
|
|
afb9cdac24 | ||
|
|
ca9d6e7dec | ||
|
|
03a1a00ef3 | ||
|
|
1e5c40765d | ||
|
|
67af31e8f3 | ||
|
|
57d70fedf1 | ||
|
|
bf4bc730c4 | ||
|
|
6adbd4249e | ||
|
|
96cf1b3807 | ||
|
|
be46139504 | ||
|
|
61abc2e59a | ||
|
|
b53833c4f3 | ||
|
|
f6d38a5be0 | ||
|
|
00d137baf3 | ||
|
|
27244483fe | ||
|
|
78f7424f37 | ||
|
|
2a9121fc2d | ||
|
|
c77a5e5169 | ||
|
|
21bedd0db9 | ||
|
|
7fe76a4dfb | ||
|
|
fd72375aa4 | ||
|
|
e9c0c8b930 | ||
|
|
66da03e555 | ||
|
|
382bcc77c0 | ||
|
|
dbc1f29296 | ||
|
|
799577b4df | ||
|
|
57e2cc251d | ||
|
|
8cb86c9582 | ||
|
|
e4852e4f56 | ||
|
|
2abf56546b | ||
|
|
02825602e2 | ||
|
|
0daeab17cd | ||
|
|
6b49b498cc | ||
|
|
924190ce7d | ||
|
|
4a347cd7dc | ||
|
|
1e022b55d1 | ||
|
|
29ff6abec6 | ||
|
|
054b478999 | ||
|
|
e6ce29d531 | ||
|
|
b3c195ef00 | ||
|
|
f0b1606f28 | ||
|
|
d0ee91f4eb | ||
|
|
266a4fc748 | ||
|
|
d985946ef5 | ||
|
|
9644ca0ca5 | ||
|
|
83f0a593fd | ||
|
|
3948c09d2b | ||
|
|
b89ab4a99d | ||
|
|
c04aa40543 | ||
|
|
6ee4c67226 | ||
|
|
b70851e488 | ||
|
|
7cf20d7227 | ||
|
|
355a5a3bfa | ||
|
|
6c3e9848b2 | ||
|
|
ac83dddcd2 | ||
|
|
e40ba24d89 | ||
|
|
9639971a0e | ||
|
|
bbab2770c5 | ||
|
|
0e7f744744 | ||
|
|
0d36dc4942 | ||
|
|
faf90cfaa6 | ||
|
|
34cfbcc4d0 | ||
|
|
376ae53608 | ||
|
|
95bcb90691 | ||
|
|
0edc6610dd | ||
|
|
fc84a19883 | ||
|
|
35e11ce7ff | ||
|
|
269b96b703 | ||
|
|
286aefa34a | ||
| 3cdc00fdf6 | |||
|
|
5660833ce8 | ||
|
|
8499183c02 | ||
|
|
2e59a695e7 | ||
|
|
6fe93a6c3f | ||
|
|
09db112412 | ||
|
|
2de91de36b | ||
|
|
f43240e9b0 | ||
|
|
ac1bf7d60e | ||
|
|
b11349d901 | ||
|
|
2838b2429e | ||
|
|
97d72f4821 | ||
|
|
5bb19b0598 | ||
|
|
22e2ea3cf4 | ||
|
|
cad7948400 | ||
|
|
bf342bcb3c | ||
|
|
d75b7a3072 | ||
| bf4d6244c6 | |||
|
|
c7276e58c9 | ||
|
|
b7c9882428 | ||
|
|
cb43493e00 | ||
|
|
7cf0125e9c | ||
|
|
3b22c1cce8 | ||
|
|
c1ea0601c9 | ||
|
|
0b7328bce4 | ||
|
|
0e430310b8 | ||
|
|
dbfce437af | ||
|
|
a01bc5f117 | ||
|
|
adff8171cc | ||
|
|
f16e8d8888 | ||
|
|
e637fdb42c | ||
|
|
0b17713756 | ||
|
|
5d31b0f595 | ||
|
|
a3cb12ccff | ||
|
|
84f7eb2d1e | ||
|
|
9e2f8e0fb3 | ||
|
|
8abdd80f24 | ||
|
|
3dc49fa6b8 | ||
|
|
d3019a1c40 | ||
|
|
63594a3f92 | ||
|
|
3e104064db | ||
|
|
c05a9009be | ||
|
|
902378fd7d | ||
|
|
3ac3b27259 | ||
|
|
a334b64e89 | ||
|
|
f6e9b78b73 | ||
|
|
d896becfee | ||
|
|
98ad9496cc | ||
|
|
80f6650c81 | ||
|
|
c3139b8d65 | ||
|
|
50107bd23a | ||
|
|
df20e9895f | ||
|
|
df0aa86e05 | ||
|
|
81a6abc623 | ||
|
|
4b14e562e2 | ||
|
|
6aa0f3ba39 | ||
|
|
c65d25da2f | ||
| 49a78cbb75 | |||
| 68f10939d4 | |||
|
|
287b7ef90b | ||
|
|
b1f5531063 | ||
|
|
9713f804df | ||
|
|
bdac995173 | ||
|
|
793d6723ec | ||
|
|
5670c57dd2 | ||
|
|
bf8b527375 | ||
|
|
a63141ecf4 | ||
|
|
dd50adb61b | ||
|
|
4694c95524 | ||
|
|
49be1275e6 | ||
|
|
8d49be96d6 | ||
|
|
5df0b2e41a | ||
|
|
07f84b7b61 | ||
|
|
083d6c70ee | ||
|
|
83ef26dc74 | ||
|
|
f1db15c7b6 | ||
|
|
93ae8259c8 | ||
|
|
8771acb98a | ||
|
|
a29c225b7a | ||
|
|
db9ada1bf8 | ||
|
|
1d3a8bc24e | ||
|
|
00bfeb2dcf | ||
|
|
617c559628 | ||
|
|
6b547f3afe | ||
|
|
a8dca7c918 | ||
|
|
965531485f | ||
|
|
9419bc38de | ||
|
|
1b7e24dc30 | ||
|
|
bf194dae5d | ||
|
|
46a015c624 | ||
|
|
20c554c9b3 | ||
|
|
c5902343bd | ||
|
|
aca7face38 | ||
|
|
5131dca77f | ||
| 869f75830d | |||
|
|
2e2a40ea09 | ||
|
|
38f87fb5c3 | ||
|
|
f6297f0933 | ||
|
|
a7e8dd7d6b | ||
|
|
7779a19903 | ||
|
|
255845cc13 | ||
| 244b25c88a | |||
|
|
f7c96dba4a | ||
|
|
299aab6acf | ||
|
|
3295ca6bd8 | ||
|
|
632542462a | ||
|
|
bd72b21c18 | ||
|
|
31fc5194b2 | ||
|
|
fc1d88a00f | ||
|
|
54e1619d6e | ||
|
|
b4246d2cac | ||
|
|
3539d4862e | ||
|
|
1457013c53 | ||
|
|
c32fdec09f | ||
|
|
3b983dd889 | ||
|
|
71c60563a2 | ||
|
|
fd531c248e | ||
|
|
9735af4d78 | ||
|
|
88aa9157d1 | ||
|
|
2593572392 | ||
|
|
e83e1ca4e3 | ||
|
|
75ed9e4d55 | ||
|
|
3c129ffded | ||
|
|
6136b28af7 | ||
|
|
c11569fb99 | ||
|
|
a23ad70e0e | ||
|
|
e1df83c885 | ||
|
|
ffc456ebac | ||
|
|
4b7ec23db3 | ||
|
|
50e186bc81 | ||
|
|
3823e8e209 | ||
|
|
f08c0300ce | ||
|
|
43f0618f77 | ||
|
|
54c7709964 | ||
|
|
326e4146b2 | ||
|
|
fd5900c252 | ||
|
|
74faba1251 | ||
|
|
70e580c002 | ||
|
|
1ee74172c2 | ||
| 625e1b9d12 | |||
|
|
121dd596d9 | ||
|
|
ea5e199d3b | ||
|
|
e7c28bcb66 | ||
|
|
21207b47a0 | ||
|
|
09d574bae9 | ||
|
|
b68d74effc | ||
|
|
88309f981a | ||
|
|
653432b6a8 | ||
|
|
4d4c231dad | ||
|
|
a195ba6cc0 | ||
|
|
e05b7a5cd5 | ||
|
|
2a51d35e25 | ||
|
|
d7e427daac | ||
|
|
ee37afd1e2 | ||
|
|
d2e261d873 | ||
|
|
2525291ef0 | ||
|
|
124b41acdb | ||
|
|
2ce71a1332 | ||
|
|
a74e326448 | ||
|
|
173cd01731 | ||
|
|
737f4057fb | ||
|
|
62966d085f | ||
|
|
8036d4beaa | ||
|
|
14f17c3601 | ||
|
|
8cfa180fae | ||
|
|
e95469bcbb | ||
|
|
cf71d761dc | ||
|
|
c2b9211bd5 | ||
|
|
7a7405571c | ||
|
|
1270657602 | ||
|
|
6c80b97694 | ||
|
|
e6b087bcae | ||
|
|
a0918c5e98 | ||
|
|
879885a736 | ||
|
|
155258e06e | ||
|
|
06e48df8a3 | ||
|
|
88776e0eee | ||
|
|
9be62a6964 | ||
|
|
c000917cda | ||
|
|
76b87890d8 | ||
|
|
d0796bde4f | ||
|
|
a6e7d5c99b | ||
|
|
b37cc32de0 | ||
|
|
6d724f6d07 | ||
|
|
1cc19c8c6a | ||
|
|
60e2f2baf2 | ||
|
|
b8c684193e | ||
|
|
84b1fdf6c6 | ||
|
|
2181853574 | ||
|
|
281197895f | ||
|
|
d50e8feed9 | ||
|
|
8e104117a4 | ||
|
|
b8b71399e8 | ||
|
|
fb78eea6fc | ||
|
|
a942be9f6f | ||
|
|
34db8682b3 | ||
|
|
61dee21466 | ||
|
|
820f68f147 | ||
|
|
fabc1e1219 | ||
|
|
2fec40e2ec | ||
|
|
95731b800d | ||
|
|
3142d471e1 | ||
|
|
045664107e | ||
|
|
e512466ff0 | ||
|
|
131849e7e8 | ||
| 9a96973b00 | |||
|
|
186896f072 | ||
|
|
78eb483bc2 | ||
|
|
c7033324a9 | ||
|
|
334604a591 | ||
|
|
7905ba80ea | ||
|
|
ccff4685df | ||
|
|
0167f78dca | ||
|
|
282ec08e5e | ||
|
|
5efb7f31df | ||
|
|
bf39ffe903 | ||
|
|
f2c30aa437 | ||
|
|
bf12c90b07 | ||
|
|
615570cf5e | ||
|
|
aff9f4742c | ||
|
|
31a2cc9d76 | ||
|
|
9c6a62d319 | ||
|
|
38c8845b05 | ||
|
|
934d122dd4 | ||
|
|
f8de98f7cd | ||
|
|
ef7f825d97 | ||
|
|
41c1b9623e | ||
|
|
555a987844 | ||
| 1d4ac090d8 | |||
|
|
c1df6dfd05 | ||
|
|
163c569919 | ||
|
|
63a7be115a | ||
|
|
fed31f2a79 | ||
|
|
5d496b3152 | ||
|
|
f5a2b8983d | ||
|
|
8f44800588 | ||
|
|
68c9b6af07 | ||
|
|
8536b4bfcb | ||
|
|
0694c616a2 | ||
|
|
8e456bab9f | ||
|
|
aa663ae386 | ||
|
|
01c8ffd61f | ||
|
|
58c7358cb3 | ||
|
|
1a150bf544 | ||
|
|
98bab0db07 | ||
|
|
b9c65193af | ||
|
|
20403ef8bb | ||
|
|
e26cdd3dab | ||
|
|
2065713e5c | ||
|
|
a9cf841042 | ||
|
|
46466530a5 | ||
|
|
94ed548366 | ||
|
|
1e4c69baa7 | ||
|
|
f04c1a6ab5 | ||
|
|
6393edf40a | ||
|
|
7fd38e88c1 | ||
|
|
ee66c13487 | ||
|
|
250192c603 | ||
|
|
9d181a1cc6 | ||
|
|
07a92c3988 | ||
|
|
e9b0a57490 | ||
|
|
2fca581095 | ||
|
|
53afd90ad4 | ||
|
|
d9ea07515b | ||
|
|
de82920819 | ||
|
|
9a842e4bf2 | ||
| 9cfda05f71 | |||
|
|
1862995aab | ||
|
|
468613c9db | ||
|
|
28642cd047 | ||
|
|
f96f3546c7 | ||
|
|
205066ed12 | ||
|
|
7e8ee46c09 | ||
|
|
d1e2febb6d | ||
|
|
3d0273de45 | ||
|
|
109386dfe8 | ||
|
|
ebddb49041 | ||
|
|
b5f320a2f9 | ||
|
|
7568bd9af5 | ||
|
|
0384c251ff | ||
|
|
b812ad2926 | ||
|
|
fe0b928b39 | ||
|
|
4b1a81e773 | ||
|
|
af2f218192 | ||
|
|
572247dbd8 | ||
|
|
c5a0e6b60c | ||
| 9c2ec9f3af | |||
|
|
d7e8665782 | ||
|
|
7c86c1a185 | ||
|
|
4b03cc60cf | ||
|
|
c356db9f44 | ||
|
|
c53839cefa | ||
|
|
887803cb67 | ||
|
|
f69a08fc63 | ||
|
|
4ddd61cfde | ||
|
|
fe39d137c7 | ||
|
|
ade975891b | ||
|
|
479e56bdd6 | ||
|
|
e5d36de24c | ||
|
|
d824c4e633 | ||
|
|
f499635461 | ||
|
|
e8cf0f37f1 | ||
|
|
12a0c0f690 | ||
|
|
77a8841d25 | ||
|
|
7d8f13b9f7 | ||
|
|
ec177c84b3 | ||
|
|
3809c67bb2 | ||
|
|
dff779e3ad | ||
|
|
ef1c9b9f2b | ||
|
|
90e62db26e | ||
|
|
498154804c | ||
|
|
34dda64610 | ||
|
|
d1c723bc14 | ||
|
|
d477bfd4ee | ||
|
|
6c81f60914 | ||
|
|
aa844ada4e | ||
|
|
9b7a813069 | ||
| baadfa34f1 | |||
|
|
bc09f0992e | ||
|
|
00e2309987 | ||
|
|
a98f82e27b | ||
|
|
c70e6919c2 | ||
|
|
abdf069ce3 | ||
|
|
6be1f7e95a | ||
|
|
a1159ff484 | ||
|
|
0c2caa50cc | ||
|
|
dcbbbf8134 | ||
|
|
05602e29cd | ||
|
|
cd53f7cf8c | ||
|
|
689748843c | ||
|
|
ea07eb6aa3 | ||
|
|
5251ce1b20 | ||
|
|
b3780aab33 | ||
|
|
5bc6d0ef2e | ||
|
|
b92cbf5f09 | ||
|
|
c26f901ba9 | ||
|
|
a590645cde | ||
|
|
49c2f5dea9 | ||
|
|
b408147f48 | ||
|
|
4930fbbba7 | ||
|
|
02dd0b4ed5 | ||
|
|
add945e717 | ||
|
|
259a3c70e3 | ||
|
|
2445e77535 | ||
|
|
d64235eb6e | ||
|
|
54c8cb8c81 | ||
| 758130f5b9 | |||
|
|
803a16cbcd | ||
|
|
0b43c8da11 | ||
|
|
c446904c19 | ||
|
|
363a4378b7 | ||
|
|
f70f528730 | ||
|
|
2334dedba6 | ||
|
|
e9c7dfa992 | ||
|
|
33eaf3e947 | ||
|
|
ce5513b009 | ||
|
|
a98b03e46e | ||
|
|
e4c3ffcd38 | ||
|
|
5e7a3c2e7e | ||
|
|
c020d53e23 | ||
|
|
cb02937714 | ||
|
|
1327e296c2 | ||
|
|
d53521a631 | ||
|
|
5beb14cffe | ||
|
|
7b07e1ee5c | ||
|
|
c02aec557c | ||
|
|
c695d49a86 | ||
|
|
3cd3ba0397 | ||
|
|
829ab5e72d | ||
|
|
4ae8082552 | ||
|
|
2c8d57fbb2 | ||
|
|
e51a28e492 | ||
|
|
72c83badf6 | ||
|
|
fe4f74f631 | ||
|
|
2b335060b0 | ||
|
|
c3fc3ec73d | ||
|
|
be14fc593f | ||
|
|
f2bfa53b61 | ||
|
|
25d07b422d | ||
|
|
8610857015 | ||
|
|
17abce073f | ||
|
|
02d50bd4aa | ||
|
|
67d459b262 | ||
|
|
5ecefb8766 | ||
|
|
52eb0e992d | ||
|
|
19ddc081c1 | ||
|
|
8e91e26cc5 | ||
|
|
c2322f8563 | ||
|
|
4f0683a481 | ||
|
|
b9449de5cf | ||
|
|
c3a9578b82 | ||
|
|
6351dab3e6 | ||
|
|
3ef6399d56 | ||
|
|
f4754bfb5a | ||
|
|
3fb8efc8f2 | ||
|
|
9ae84071eb | ||
|
|
c2b4c2ae0e | ||
|
|
9f1431be17 | ||
|
|
e1c6ae7cf3 | ||
|
|
bb7a9fe7d2 | ||
|
|
d77263d8ed | ||
|
|
fdd92af3ac | ||
|
|
dd009e0bc7 | ||
|
|
170e7d79e7 | ||
|
|
a7635ceb5d | ||
|
|
64fb0be8b2 | ||
|
|
a5a8487132 | ||
|
|
8cf61af551 | ||
|
|
778f000a3b | ||
|
|
623ff4e1ed | ||
|
|
260f00c76d | ||
|
|
0c8a3b5c3e | ||
|
|
e76068a2de | ||
|
|
a12e45c355 | ||
|
|
74b9dd6881 | ||
|
|
edd0823d96 | ||
|
|
4ef4eb4f12 | ||
|
|
862574f381 | ||
|
|
c67ea1ffc1 | ||
|
|
5bd5bcd06a | ||
|
|
a13cd6a177 | ||
|
|
f60c6b25ad | ||
|
|
c6a2664106 | ||
|
|
4ab80abb5e | ||
|
|
f37d097c1c | ||
|
|
191cf671be | ||
|
|
3098315e05 | ||
|
|
39db2e9d66 | ||
|
|
ee1a1306e2 | ||
|
|
db72774458 | ||
|
|
3d727266c3 | ||
|
|
4673e709b2 | ||
|
|
f1a04f780a | ||
|
|
eca5856d99 | ||
|
|
190221c91c | ||
|
|
77d74b5d81 | ||
|
|
0e44752ba1 | ||
|
|
20692e0c29 | ||
|
|
206b4e2a7e | ||
|
|
8fefee2d41 | ||
|
|
cdaa43b396 | ||
|
|
a0eebf20db | ||
|
|
b84f6fc15f | ||
|
|
d0a1bc361a | ||
|
|
d35650b034 | ||
|
|
580eaf29d6 | ||
|
|
a27da0d75b | ||
|
|
26c75a6828 | ||
|
|
c32828bb13 | ||
|
|
18b37c980a | ||
|
|
64ac4610de | ||
|
|
dea34733a4 | ||
|
|
0e72c0d372 | ||
|
|
88c8da143f | ||
|
|
367f84b0ec | ||
|
|
1a3ef7e497 | ||
|
|
c19012d4cd | ||
|
|
b502631d10 | ||
|
|
6728e5d791 | ||
|
|
101b53b541 | ||
|
|
11c492fdd0 | ||
|
|
792d4e9a23 | ||
|
|
c59e9d228e | ||
|
|
d8848df14f | ||
|
|
4a2729b780 | ||
|
|
7c174a1a25 | ||
|
|
f0e69b4a51 | ||
|
|
4a915b1ed5 | ||
|
|
cbf5a5b5d3 | ||
|
|
41b52d70be | ||
|
|
129696cdbe | ||
|
|
8cc3ab213d | ||
|
|
9bf966af37 | ||
|
|
a76a6bf692 | ||
|
|
6a7a0c8f50 | ||
|
|
f5bc261944 | ||
|
|
8a304bdf7c | ||
|
|
124e86a6d2 | ||
|
|
96df9e0a20 | ||
| 9228180b1e | |||
|
|
a04d2a433c | ||
|
|
ef35ea72cf | ||
|
|
8804b6dcd4 | ||
|
|
86b8388889 | ||
|
|
812c48dde4 | ||
|
|
f0f1c94afa | ||
|
|
75b312ded1 | ||
| b2f79e3a6e | |||
|
|
e65b0ba654 | ||
|
|
d3dd403dc7 | ||
|
|
7f4c2c6a25 | ||
| 4622210cfb | |||
|
|
cb1b3a28ab | ||
|
|
f7d8735b6b | ||
|
|
fc42ab9b46 | ||
|
|
7f17777a4b | ||
|
|
bcdb27416c | ||
|
|
15c6396d42 | ||
|
|
2c19345e58 | ||
|
|
69a7dd86ec | ||
| 9317206586 | |||
| 7027b9b601 | |||
| fc3598f116 | |||
| 90dac326c1 | |||
| a299827554 | |||
| a39e61a3e0 | |||
| 584571248f | |||
|
|
fdcafb83e3 | ||
|
|
b8ead3b511 | ||
|
|
ffff664918 | ||
|
|
bf984ecb9b | ||
|
|
f1e238a9af | ||
|
|
5290a85afd | ||
|
|
b5157dd9cb | ||
|
|
94812d17c8 | ||
|
|
7681090c12 | ||
|
|
866490c41f | ||
|
|
0662fc4d42 | ||
|
|
078d612b9e | ||
|
|
26025f79ce | ||
|
|
1c307bc1be | ||
|
|
7abddbd752 | ||
|
|
51c9f7270c | ||
|
|
b896670e85 | ||
|
|
69dd0c40bb | ||
|
|
c374c773ad | ||
|
|
2fd7888a51 | ||
|
|
d19915ea44 | ||
|
|
549e37d218 | ||
|
|
7b48a9f671 | ||
|
|
344db835e4 | ||
|
|
04353acccf | ||
|
|
c33f0b7d8d | ||
|
|
fd51fee424 | ||
|
|
c8b44816fe | ||
|
|
6e88389fb8 | ||
|
|
298447e22d | ||
|
|
a3c7de8a50 | ||
|
|
264f305d94 | ||
|
|
f8ec08a928 | ||
|
|
f09e6c183e | ||
|
|
3791ed86a3 | ||
|
|
7f772693eb | ||
|
|
5771f1ea14 | ||
|
|
0f4db1ed0d | ||
|
|
4b35626aec | ||
|
|
846588ee81 | ||
|
|
4f92b12a6a | ||
|
|
4b4b20f8a9 | ||
|
|
e26fe9bddd | ||
|
|
972be2df04 | ||
|
|
374cb6a7f8 | ||
|
|
923d6300ad | ||
|
|
baa4edc6ca | ||
|
|
9875311bcc | ||
|
|
c3a453512a | ||
|
|
e413ed8e1d | ||
|
|
858f411447 | ||
|
|
19c8cea8e5 | ||
|
|
1ae10b1487 | ||
|
|
35cde9f8d7 | ||
|
|
d4d2840f5d | ||
|
|
119ec47072 | ||
|
|
ceb305a780 | ||
|
|
1dc2a75cb6 | ||
|
|
8d7b716ea7 | ||
|
|
034af70a65 | ||
|
|
162c213e7b | ||
|
|
6fde7d8a51 | ||
|
|
e4abef5768 | ||
|
|
3922b531a8 | ||
|
|
0d1438a731 | ||
|
|
7eb66d3e09 | ||
|
|
c7a600063d | ||
|
|
5b654ce9fb | ||
|
|
98e9a881c0 | ||
|
|
f420f7c177 | ||
|
|
50954a4b6a | ||
|
|
567310e698 | ||
|
|
f90b710c9b | ||
|
|
bdaec3f934 | ||
|
|
8198fd9c58 | ||
|
|
358a10e3cc | ||
|
|
7b935e0d40 | ||
|
|
7034c3cc47 | ||
|
|
e30eadb4de | ||
|
|
3e3f4a167a | ||
|
|
c98528f8d3 | ||
|
|
75e5f885e5 | ||
|
|
40b9e68e02 | ||
|
|
e7491920fd | ||
|
|
9904aa5538 | ||
|
|
41b89aef8c | ||
|
|
3925c137a4 | ||
|
|
97fa42c82b | ||
|
|
ccabaac5a0 | ||
|
|
80f7852941 | ||
|
|
6243831dfb | ||
|
|
4f9abb52a4 | ||
|
|
7bab8780ad | ||
|
|
d0dc270eec | ||
|
|
cd9402075a | ||
|
|
b1f3bdfcbd | ||
|
|
541a2dbc88 | ||
|
|
d1e28417d5 | ||
|
|
9410a55679 | ||
|
|
25ceefbd89 | ||
|
|
a37c4bb59e | ||
|
|
ee1f8a0494 | ||
|
|
2c5459a1b7 | ||
|
|
b561c386c3 | ||
|
|
a374dd0359 | ||
|
|
aba4f4e0e2 | ||
|
|
210c94d82f | ||
|
|
c410ba4d42 | ||
|
|
f3738fe164 | ||
|
|
04a08fe6a5 | ||
|
|
69d33ec170 | ||
|
|
40a4225ed8 | ||
|
|
801622ce19 | ||
|
|
67750a30ba | ||
|
|
2f25b6a650 | ||
|
|
5a3bd329d6 | ||
|
|
8b4bf2bb8d | ||
|
|
2a515058be | ||
|
|
3785f762fc | ||
|
|
5cee9f183b | ||
|
|
958ec294b2 | ||
|
|
3a781fd719 | ||
|
|
f4a2e7efe2 | ||
|
|
027365503f | ||
|
|
e31d59ebc8 | ||
|
|
11178e14ab | ||
|
|
0bcbd0015f | ||
|
|
271bd5d3ba | ||
|
|
74d252a68f | ||
|
|
4b928b466a | ||
|
|
10b4d0c8ad | ||
|
|
433dd92196 | ||
|
|
78d284881c | ||
|
|
a36b726bde | ||
|
|
83629b9991 | ||
|
|
405c66e864 | ||
|
|
e5df84a9ed | ||
|
|
614a977259 | ||
|
|
f1651abdac | ||
|
|
05a06048fc | ||
|
|
c599bc9bff | ||
|
|
54ded4527a | ||
|
|
4f433cd601 | ||
|
|
accecb9863 | ||
|
|
079588cac5 | ||
|
|
1d10ee71bf | ||
|
|
0520cbdccb | ||
|
|
3d3270c1b2 | ||
|
|
b60a26d40b | ||
|
|
36fcdce886 | ||
|
|
b760388bbf | ||
|
|
bb18524cce | ||
|
|
05eaa0f0d7 | ||
|
|
d4a1dbd4a9 | ||
|
|
0e9bef3429 | ||
|
|
34238dc119 | ||
|
|
18a40caa48 | ||
|
|
1980f1b2ba | ||
|
|
ec0c13afda | ||
|
|
ed41b3cefa | ||
|
|
80a924edfa | ||
|
|
98f9518bf2 | ||
|
|
1de47610f4 | ||
|
|
25ba7712f7 | ||
|
|
a6b534d760 | ||
|
|
494b191d55 | ||
|
|
450bfa7a75 | ||
|
|
a52ac1375a | ||
|
|
4990713e9e | ||
|
|
c022c4cc6d | ||
|
|
6257dec0a7 | ||
|
|
ea9d49b9d8 | ||
|
|
42c7bfcf8a | ||
|
|
e67d1bfeb8 | ||
|
|
e2f444cfdf | ||
|
|
03b85df4eb | ||
|
|
7db5c2f225 | ||
|
|
603ce231d0 | ||
|
|
940b5eaad1 | ||
|
|
fdd946c02c | ||
|
|
81e5b57d74 | ||
|
|
b568705eec | ||
|
|
fe42eb7a1a | ||
|
|
df7b0a6d97 | ||
|
|
fcf598e797 | ||
|
|
d9cb12f6e3 | ||
|
|
0f23729253 | ||
|
|
3def429290 | ||
|
|
803ea0d7a0 | ||
|
|
9b014876cd | ||
|
|
9ccf85eaa8 | ||
|
|
93fa53c3e8 | ||
|
|
eea3e1f0b2 | ||
|
|
e6e22ea976 | ||
|
|
80c2000f87 | ||
|
|
15a0a129c8 | ||
|
|
51bd04b541 | ||
|
|
18ba7f60c1 | ||
|
|
5c3e00d70a | ||
|
|
6c4c77971e | ||
|
|
67adef8f6c | ||
|
|
ed60e16974 | ||
|
|
47c11ae83d | ||
|
|
8173b1bfbe | ||
|
|
93400ec8a1 | ||
|
|
0d85a798e5 | ||
|
|
d4d534925f | ||
|
|
a1ba7ee786 | ||
|
|
756cd4a4b8 | ||
|
|
1b186fcff3 | ||
|
|
165da9b447 | ||
|
|
aea10ed383 | ||
|
|
8fccb31436 | ||
|
|
89bb88e4f5 | ||
|
|
a58efa70bc | ||
|
|
fe1fecc5da | ||
|
|
87612582ff | ||
|
|
c3a53cffbc | ||
|
|
aeea83703b | ||
|
|
27c8f13fc9 | ||
|
|
c6ddae70f7 | ||
|
|
e4ecd03e3f | ||
|
|
a6dc5c963c | ||
|
|
989e6a9a7e | ||
|
|
c28048d20f | ||
|
|
a24e72f972 | ||
|
|
a29aa31e93 | ||
|
|
8546139997 | ||
|
|
a61586947e | ||
|
|
5e4645b082 | ||
|
|
f9f0a8fd67 | ||
|
|
637a2eeb66 | ||
|
|
13caef2de0 | ||
|
|
61c6d43231 | ||
|
|
a04f6e0165 | ||
|
|
3f494e359d | ||
|
|
8a06f70379 | ||
|
|
2290152743 | ||
|
|
3b657a26a6 | ||
|
|
ff5084479b | ||
|
|
97f4a3f4eb | ||
|
|
1ca1732d32 | ||
|
|
accd2308f1 | ||
|
|
10eec2fe17 | ||
|
|
d69cd759cb | ||
|
|
f261a8aca5 | ||
|
|
bdf64d660b | ||
|
|
2fd30ee095 | ||
|
|
9bc6f1797e | ||
|
|
32e63fe1b8 | ||
|
|
1c074cc8cc | ||
|
|
ebf6228f21 | ||
|
|
4a1db96db8 | ||
|
|
16ee4636bc | ||
|
|
6831b37b43 | ||
|
|
4d16f26ba4 | ||
|
|
4a7bc73e03 | ||
|
|
caf583ec4b | ||
|
|
e20880da21 | ||
|
|
19ff9a507b | ||
|
|
33ba6be91f | ||
|
|
9c1c6c18ae | ||
|
|
fae5f823e1 | ||
|
|
bdf8e41a72 | ||
|
|
c00c12b64b | ||
|
|
02d77ad5ad | ||
|
|
7ab903f072 | ||
|
|
266ed0612f | ||
|
|
27af34a853 | ||
|
|
abafc2ba14 | ||
|
|
1f0eb8d915 | ||
|
|
48a19178b8 | ||
|
|
e542e5943e | ||
|
|
44836e77be | ||
|
|
5cec57719b | ||
|
|
d6f101daef | ||
|
|
350cdd9827 | ||
|
|
5dc48d54f2 | ||
|
|
41975265bf | ||
|
|
598f13107d | ||
|
|
248ebf9117 | ||
|
|
1c6f6ba212 | ||
|
|
58cba6a7c6 | ||
|
|
b55474788b | ||
|
|
5c8de3e39f | ||
|
|
8aaa57a573 | ||
|
|
19e743c7e4 | ||
|
|
56aacb3e32 | ||
|
|
f2c9aed16c | ||
|
|
7c6d3942c4 | ||
|
|
27aff84f74 | ||
|
|
a43ee17ad0 | ||
|
|
abd4c47acf | ||
|
|
b87722ab2d | ||
|
|
b5448615b9 | ||
|
|
d14d9069cd | ||
|
|
93df6ab385 | ||
|
|
be87f110ce | ||
|
|
9ebee362a5 | ||
|
|
27928e47be | ||
|
|
79def643a3 | ||
|
|
9a8d9ef496 | ||
|
|
7336c28ca8 | ||
|
|
6a521da437 | ||
|
|
6d828cf470 | ||
|
|
511a2850a1 | ||
|
|
be61aad935 | ||
|
|
c06f7d43e9 | ||
|
|
3638fb9da4 | ||
|
|
2fc1f08573 | ||
|
|
90946c5e9e | ||
|
|
9a778f9a00 | ||
|
|
8d6b468cdc | ||
|
|
0941185fcf | ||
|
|
8850015822 | ||
|
|
3be4ea0dc1 | ||
|
|
3eda0135bc | ||
|
|
9c9de85afb | ||
|
|
addac49465 | ||
|
|
839d29be3f | ||
|
|
b2f0721b69 | ||
|
|
b228c9fe6c | ||
|
|
8e7738e22e | ||
|
|
84f8445b7b | ||
|
|
5cf412320d | ||
|
|
c9fb1cf85a | ||
|
|
bbed065fa8 | ||
|
|
dde74dee78 | ||
|
|
966da68228 | ||
|
|
f147131e7c | ||
|
|
7785c3f7cf | ||
|
|
9d3d354bd4 | ||
|
|
51a5f33b5b | ||
|
|
8aea8625be | ||
|
|
931bf96c1d | ||
|
|
956a1c2327 | ||
|
|
4f15890105 | ||
|
|
0afe38d81a | ||
|
|
3dfd798d51 | ||
|
|
1235a5a365 | ||
|
|
c772e1cb6b | ||
|
|
e35b6636ab | ||
|
|
bd4eed9cb1 | ||
|
|
2b0bcc7cee | ||
|
|
3b5f650621 | ||
|
|
b66a040828 | ||
|
|
f757c4a512 | ||
|
|
06ad77895f | ||
|
|
2cbd4d29a0 | ||
|
|
d93a5594cd | ||
|
|
a2a00577cd | ||
|
|
b92b9e5cac | ||
|
|
d19842ed73 | ||
|
|
0655c8aa6c | ||
|
|
30595dd2bb | ||
|
|
b76b5b9967 | ||
|
|
1007ca5af8 | ||
|
|
f3fab1440f | ||
|
|
affca9b523 | ||
|
|
2f53760689 | ||
|
|
3409cb2b77 | ||
|
|
be6860b33e | ||
|
|
3a94a0bb89 | ||
|
|
8234c22c1e | ||
|
|
496dad696c | ||
|
|
a623f5836c | ||
|
|
f42821293e | ||
|
|
0363703073 | ||
|
|
dfbe3ce6dc | ||
|
|
e4a247f7c9 | ||
|
|
69b2467a9a | ||
|
|
cc24e8b86b | ||
|
|
27f170815f | ||
|
|
d3c7e9d2f6 | ||
|
|
ea4bbf4285 | ||
|
|
308d6e73e3 | ||
|
|
167c93b85c | ||
|
|
13c5bcb4d8 | ||
|
|
c692a6ca70 | ||
|
|
0346e63c20 | ||
|
|
9e982f3283 | ||
|
|
11fec6f63c | ||
|
|
d0c2c1e6b9 | ||
|
|
fab4d0afcb | ||
|
|
d9e42cb274 | ||
|
|
4d9be13316 | ||
|
|
7365ef4092 | ||
|
|
13edbedc79 | ||
|
|
fc5d58ad97 | ||
|
|
a373fa500a | ||
|
|
8da098f5e0 | ||
|
|
52d4b96639 | ||
|
|
83f94a88df | ||
|
|
8762e04631 | ||
|
|
256a0d670e | ||
|
|
50106266bc | ||
|
|
ba093b0b48 | ||
|
|
33041d0ad5 | ||
|
|
b46c8c586b | ||
|
|
0e1d45dc36 | ||
|
|
1cd92458e9 | ||
|
|
7bd68365ec | ||
|
|
485eb18d83 | ||
|
|
375b30507e | ||
|
|
7691527f35 | ||
|
|
3313fac8eb | ||
|
|
e52c81f5db | ||
|
|
9b419d0bff | ||
|
|
0f40752139 | ||
|
|
d57bfc057f | ||
|
|
918ce1afa3 | ||
|
|
5d285ca896 | ||
|
|
f368e2732d | ||
|
|
ad13746da9 | ||
|
|
440f39e558 | ||
|
|
108c84daf8 | ||
|
|
e63fe3be69 | ||
|
|
bc4a141cba | ||
|
|
0dbe857ba2 | ||
|
|
483538f8f3 | ||
|
|
1f36d5411a | ||
|
|
46f76ca8b8 | ||
|
|
3a09577e0c | ||
|
|
b9f472a905 | ||
|
|
557d8131ca | ||
|
|
89fd11109d | ||
|
|
badf3edc55 | ||
|
|
36e3284979 | ||
|
|
4ac932bd21 | ||
|
|
f9468fa987 | ||
|
|
fb7c12f644 | ||
|
|
9341c96def | ||
|
|
74fd78adb1 | ||
|
|
c8ab81dd1c | ||
|
|
185e4d6b12 | ||
|
|
99607a5bbe | ||
|
|
7e807cdd2f | ||
|
|
e51f6596d4 | ||
|
|
42610db847 | ||
|
|
6018de2466 | ||
|
|
af757d3b3f | ||
|
|
30abc02277 | ||
|
|
9a9714fe0c | ||
|
|
77457fa6e9 | ||
|
|
9c45b5da6c | ||
|
|
e9f0597e2e | ||
|
|
87cde1590d | ||
|
|
65d81c60cd | ||
|
|
3d6dcb9568 | ||
|
|
1ca2911b84 | ||
|
|
8ef74b3aac | ||
|
|
aeae4fb4b9 | ||
|
|
bc22b3c876 | ||
|
|
64c9d3c143 | ||
|
|
bec0cdcb54 | ||
|
|
ba9e5ac05d | ||
|
|
46b5f83601 | ||
|
|
6d5b16562f | ||
|
|
508301a2ef | ||
|
|
2f216281e7 | ||
|
|
9459030d66 | ||
|
|
f545735638 | ||
|
|
bb8f40989f | ||
|
|
675ad6386d | ||
|
|
6ce3487b65 | ||
|
|
bc7e7d847e | ||
|
|
71a73a1a10 | ||
|
|
c2790a8af3 | ||
|
|
fde86518ae | ||
|
|
61b3aa6626 | ||
|
|
6799bc69a6 | ||
|
|
0c01227d86 | ||
|
|
c74fd81302 | ||
|
|
4b30cfb8f8 | ||
|
|
36b6416a7b | ||
|
|
e0334e861d | ||
|
|
b07fb5a811 | ||
|
|
9ab49658d7 | ||
|
|
bb3d367716 | ||
|
|
26c0a7962e | ||
|
|
a2b20a1915 | ||
|
|
2087c20a83 | ||
|
|
5512c63bdd | ||
|
|
d31cf1da68 | ||
|
|
ce656cfca8 | ||
|
|
46cdf8b745 | ||
|
|
fdc0b0ac24 | ||
|
|
42b7dea14b | ||
|
|
239c794503 | ||
|
|
189960c467 | ||
|
|
04f8aa83ef | ||
|
|
802a20b222 | ||
|
|
88f7ec38f8 | ||
|
|
baaff48547 | ||
|
|
0010cd4443 | ||
|
|
7d6ffd9e78 | ||
|
|
b8daf1fb0b | ||
|
|
fe5f05f037 | ||
|
|
5cedb53c62 | ||
|
|
650dc14e0f | ||
|
|
43ebabe05d | ||
|
|
b6366411dc | ||
|
|
914921887e | ||
|
|
64a8f1930e | ||
|
|
0ac2dfd920 | ||
|
|
aa553ee5d6 | ||
|
|
a8961c561f | ||
|
|
abce19b0e4 | ||
|
|
fc317660cb | ||
|
|
949fcde6f7 | ||
|
|
9f24b6ea65 | ||
|
|
c6ba4ae89a | ||
|
|
dab3f95c71 | ||
|
|
840ad5890f | ||
|
|
ae61bab60b | ||
|
|
d3a7f3abed | ||
|
|
694cd9ddd4 | ||
|
|
47c8e627f4 | ||
|
|
f429ebe34d | ||
|
|
083bbae0e4 | ||
|
|
eaff5ec9e5 | ||
|
|
51eb938fea | ||
|
|
296c5a32c7 | ||
|
|
ef6ccc47c8 | ||
|
|
eea2dfce48 | ||
|
|
85682abbd5 | ||
|
|
4005ee3284 | ||
|
|
9ead4c87a7 | ||
|
|
1b5d9171f2 | ||
|
|
50543300d9 | ||
|
|
d9469b894f | ||
|
|
6b9c24f7dd | ||
|
|
5954eeaff2 | ||
|
|
c84a769733 | ||
|
|
e3ef778756 | ||
|
|
806e8e439f | ||
|
|
30aaea2d04 | ||
|
|
d0cb64650b | ||
|
|
0694255893 | ||
|
|
5563c710d0 | ||
|
|
177e4e5805 | ||
|
|
8d1a666dcf | ||
|
|
fc01c5a10e | ||
|
|
896f174f94 | ||
|
|
7b4a835df4 | ||
|
|
ac85e16458 | ||
|
|
45420968ee | ||
|
|
3c35538e8b | ||
|
|
4f981cd5d9 | ||
|
|
44a6c4963b | ||
|
|
622bfb5b83 | ||
|
|
a2cb22faab | ||
|
|
9f8309fba8 | ||
|
|
bf7954bdb7 | ||
|
|
0371dd1bde | ||
|
|
7c53b133a1 | ||
|
|
b1e5f9d9a8 | ||
|
|
424969258a | ||
|
|
6d0fc38285 | ||
|
|
984c9e1078 | ||
|
|
101dc4e805 | ||
|
|
d7e3226158 | ||
|
|
74c6bdac9f | ||
|
|
73168bb1b9 | ||
|
|
f895f1beba | ||
|
|
e2e8bf0a3e | ||
|
|
3f340836a6 | ||
|
|
092c62ccb8 | ||
|
|
97dd505647 | ||
|
|
635977fe33 | ||
|
|
6ab70c2b0a | ||
|
|
3a86b24a3e | ||
|
|
77ca8735ab | ||
|
|
3a0922799d | ||
|
|
b27efce732 | ||
|
|
8974430c11 | ||
|
|
e044284998 | ||
|
|
4f9d55bb15 | ||
|
|
89adacff3d | ||
|
|
2314a1932f | ||
|
|
fb5eb4856b | ||
|
|
f857959b8e | ||
|
|
405c2162b5 | ||
|
|
8797ada815 | ||
|
|
30bafc70cc | ||
|
|
b38f0cbaf4 | ||
|
|
ceaae49b2d | ||
|
|
d1957819c4 | ||
|
|
7993fc8b12 | ||
|
|
51adf02d34 | ||
|
|
f23e98dd3a | ||
|
|
6472a6b828 | ||
|
|
b741b1c985 | ||
|
|
5f87ed5644 | ||
|
|
8d974cd292 | ||
|
|
2cf28f9db7 | ||
|
|
36ffb5f0ac | ||
|
|
07fd4c4598 | ||
|
|
44fb3e9991 | ||
|
|
088557c516 | ||
|
|
4712d46462 | ||
|
|
c01b13a32c | ||
|
|
b368faf11c | ||
|
|
7303f0c7b4 | ||
|
|
eb3cc3a32d | ||
|
|
02df950240 | ||
|
|
a69a8ce3ca | ||
|
|
8a03d55c53 | ||
|
|
544351f3be | ||
|
|
96ebaf8ab4 | ||
|
|
6b7c661fb7 | ||
|
|
6823831c06 | ||
|
|
ec82530125 | ||
|
|
a45e1f89c0 | ||
|
|
c1cd813dcb | ||
|
|
c96e62e33a | ||
|
|
6283557d2f | ||
|
|
af90f03ac5 | ||
|
|
588022ab8c | ||
|
|
cf0820549b | ||
|
|
f54bc6c7d6 | ||
|
|
2cdff6c32c | ||
|
|
49d8b99e4f | ||
|
|
bb81932422 | ||
|
|
5efb6836a8 | ||
|
|
48fa14acc0 | ||
|
|
eb7181b35e | ||
|
|
8db42023bb | ||
|
|
018a8e12ca | ||
|
|
b4a5aedc6c | ||
|
|
d6ed174d09 | ||
|
|
78f92e044a | ||
|
|
f11931a0dd | ||
|
|
31a6931be9 | ||
|
|
debb288115 | ||
|
|
c75a3839da | ||
|
|
b6a32fbd5f | ||
|
|
09e4c86606 | ||
|
|
20eb422829 | ||
|
|
90c6b572d0 | ||
|
|
712b574fb7 | ||
|
|
fd023d6dcf | ||
|
|
9c16be32d7 | ||
|
|
c3cdb099da | ||
|
|
682a088fb8 | ||
|
|
8c25bd0e94 | ||
|
|
20e122ef41 | ||
|
|
0dcac9188f | ||
|
|
1c010d8ec9 | ||
|
|
b020937475 | ||
|
|
e3f46b066a | ||
|
|
df7fe1280d | ||
|
|
929770191e | ||
|
|
66d9d6c6d2 | ||
|
|
de816840cb | ||
|
|
74fcc3be79 | ||
|
|
b6909d3737 | ||
|
|
823d79b36c | ||
|
|
735757b0c1 | ||
|
|
09b919a68f | ||
|
|
2f718e11a7 | ||
|
|
77da54c6c6 | ||
|
|
6bf52dcc8d | ||
|
|
3d9e803aed | ||
|
|
ede64d7ea0 | ||
|
|
e8db390d6f | ||
|
|
0c1bf429e8 | ||
|
|
f6357a73f0 | ||
|
|
49ca7e5aa8 | ||
|
|
be9b1a1887 | ||
|
|
bb74aacf2d | ||
|
|
b72d9af52c | ||
|
|
a9ccd99b90 | ||
|
|
ac5e5179fb | ||
|
|
a543f8cd8f | ||
|
|
d7853df8b6 | ||
|
|
1e9d12abc5 | ||
|
|
3bce9fb755 | ||
|
|
0a57da42e0 | ||
|
|
73067e0e16 | ||
|
|
b9328d0eac | ||
|
|
0596b875f0 | ||
|
|
b94dcfd34b | ||
|
|
4238564673 | ||
|
|
764ab96bda | ||
|
|
f0cc59bead | ||
|
|
282f438967 | ||
|
|
1b01adfa9f | ||
|
|
87fe73ddaa | ||
|
|
c2746c0bb2 | ||
|
|
399a024857 | ||
|
|
d131c2d438 | ||
|
|
eb0962fb06 | ||
|
|
7bf253702e | ||
|
|
76742cc193 | ||
|
|
37717baeed | ||
|
|
ade2fafbd3 | ||
|
|
53fe7ba26a | ||
|
|
7e04fea92b | ||
|
|
1fdd23d347 | ||
|
|
5ea930e25f | ||
|
|
45defd25f3 | ||
|
|
0d11964503 | ||
|
|
7545eb5bbf | ||
|
|
878bd53d11 | ||
|
|
e0a4ee0148 | ||
|
|
d3fbc4d498 | ||
|
|
a8e2a24f60 | ||
|
|
36855544d1 | ||
|
|
dc745c0b77 | ||
|
|
a8ed1d7a9a | ||
|
|
94c371a38f | ||
|
|
36618f1dca | ||
|
|
3ea2694d9c | ||
|
|
85cc99a2a3 | ||
|
|
befe4ea5de | ||
|
|
43d94692ce | ||
|
|
1364b41dc9 | ||
|
|
7d3a555464 | ||
|
|
0508520b47 | ||
|
|
6cbb7bc443 | ||
|
|
055e262b56 | ||
|
|
9d8388e836 | ||
|
|
895de17a58 | ||
|
|
b202966d30 | ||
|
|
a19a7820f9 | ||
|
|
0122119a44 | ||
|
|
64bf03b0d9 | ||
|
|
4bc6d67052 | ||
|
|
7519a458b2 | ||
|
|
bc36813349 | ||
|
|
9bd7d62c10 | ||
|
|
735a608e80 | ||
|
|
71402bb7e9 | ||
|
|
9266fa6657 | ||
|
|
6360e4170a | ||
|
|
dcb072d04b | ||
|
|
4c6ce3c39d | ||
|
|
41fd09706d | ||
|
|
24e5f956d0 | ||
|
|
f602613a9a | ||
|
|
ba124ffa5d | ||
|
|
d30ddf0add | ||
|
|
e66c7d0f8d | ||
|
|
7b9567719c | ||
|
|
04d33e7981 | ||
|
|
c62d12ca93 | ||
|
|
297633d086 | ||
|
|
10b99d8ac0 | ||
|
|
0693d6974a | ||
|
|
5129e718d7 | ||
|
|
8c406bc875 | ||
|
|
c53da9aa5b | ||
|
|
e7a420eca7 | ||
|
|
1236341746 | ||
|
|
c96c343fac | ||
|
|
02f1fec497 | ||
|
|
a102e45e90 | ||
|
|
86c9b9b54e | ||
|
|
e14127b843 | ||
|
|
67cdd71352 | ||
|
|
6a88fe8807 | ||
|
|
90f6f25e31 | ||
|
|
0f4bb64eaf | ||
|
|
45efe28f05 | ||
|
|
c8c7986f65 | ||
|
|
f437117bf2 | ||
|
|
33e882e6f8 | ||
|
|
bad591d43d | ||
|
|
7b48458380 | ||
|
|
1e16a3f411 | ||
|
|
6a3ba2ab50 | ||
|
|
1878168ae3 | ||
|
|
545709a165 | ||
|
|
ca398fdfdf | ||
|
|
d0bceb1449 | ||
|
|
caef3128eb | ||
|
|
856a6ecde3 | ||
|
|
e353203010 | ||
|
|
f1fc66060f | ||
|
|
ba4f4bdc64 | ||
|
|
2b6c08b955 | ||
|
|
b86f7868d1 | ||
|
|
54995defd2 | ||
|
|
b89bc2cce6 | ||
|
|
8f24ffaaef | ||
|
|
d31cc373de | ||
|
|
f52f503c38 | ||
|
|
8939163659 | ||
|
|
265bdd94f1 | ||
|
|
d1c412d200 | ||
|
|
5c4c30e26b | ||
|
|
1b65d39722 | ||
|
|
96e4fec31c | ||
|
|
208146f2f2 | ||
|
|
89e84e76c3 | ||
|
|
c44a5e960e | ||
|
|
c1bd54dd47 | ||
|
|
3efb9c3a2e | ||
|
|
b87d7f69fc | ||
|
|
8ba653f395 | ||
|
|
c6501beba7 | ||
|
|
dbf522b750 | ||
|
|
651e97ceef | ||
|
|
d8500f0467 | ||
|
|
a9bc118178 | ||
|
|
903942b4f0 | ||
|
|
7ebf5f52b8 | ||
|
|
4f7593b704 | ||
|
|
2157738a18 | ||
|
|
681d11c0cf | ||
|
|
d96f296b8e | ||
|
|
048ab0ee0b | ||
|
|
16dff06a4c | ||
|
|
c3900e90f0 | ||
|
|
0f334f8ee4 | ||
|
|
587e6e2c88 | ||
|
|
a3a1391a51 | ||
|
|
a4675acdba | ||
|
|
00ac41f632 | ||
|
|
fe22da6b2a | ||
|
|
0c87a4ba41 | ||
|
|
39705c60df | ||
|
|
9da23799ff | ||
|
|
29276d1d3a | ||
|
|
13b839734f | ||
|
|
63bb1b62b7 | ||
|
|
743100feab | ||
|
|
d3d2d324d2 | ||
|
|
925a1a11f9 | ||
|
|
5918ca6cab | ||
|
|
dc907bfe43 | ||
|
|
687efd210c | ||
|
|
b7539ea985 | ||
|
|
7d35f71c87 | ||
|
|
7f184ee2ba | ||
|
|
ec9fc5d320 | ||
|
|
3c2eb96243 | ||
|
|
de313586ab | ||
|
|
e96bda4b9f | ||
|
|
d9944c03c4 | ||
|
|
b9d6d547b8 | ||
|
|
622b031e27 | ||
|
|
26f5c8b9d5 | ||
|
|
e1601d2eb5 | ||
|
|
bc14fc35d7 | ||
|
|
f660f22623 | ||
|
|
300f67d78f | ||
|
|
8a3ecfe5c1 | ||
|
|
ced0019b6c | ||
|
|
5d88528fe4 | ||
|
|
1572248866 | ||
|
|
d26916199b | ||
|
|
2e9fb7d840 | ||
|
|
7a086bef08 | ||
|
|
777082a7b8 | ||
|
|
a4e3d88c67 | ||
|
|
06b903f807 | ||
|
|
d2869ab348 | ||
|
|
072c8aa39b | ||
|
|
5bd92d4c60 | ||
|
|
d6c194265f | ||
|
|
3f938e29b6 | ||
|
|
037b77555e | ||
|
|
51b9e86d13 | ||
|
|
cbf6fd021a | ||
|
|
b093d19262 | ||
|
|
7c698a9c3a | ||
|
|
17f531890a | ||
|
|
dac58bb651 | ||
|
|
4a403ae00f | ||
|
|
2c41600957 | ||
|
|
58a3293efc | ||
|
|
0906181d75 | ||
|
|
d5fcc9271a | ||
|
|
844c671bf1 | ||
|
|
7ff6b97e5c | ||
|
|
d679bbc802 | ||
|
|
6d88281357 | ||
|
|
32787a9f22 | ||
|
|
9709dfd563 | ||
|
|
6dd5a75d13 | ||
|
|
9c04d0c956 | ||
|
|
c3e74f02c2 | ||
|
|
cb56cd70f5 | ||
|
|
de0395bee9 | ||
|
|
abb5b14281 | ||
|
|
2289bb7c19 | ||
|
|
746ef89745 | ||
|
|
ffc0b4863b | ||
|
|
89f8d71001 | ||
|
|
a2878bff67 | ||
|
|
34cfa55f58 | ||
|
|
7dd5484cb5 | ||
|
|
37f1d43ce3 | ||
|
|
07b5d97a3a | ||
|
|
cb841de3fc | ||
|
|
e12f397140 | ||
|
|
3a22028042 | ||
|
|
f12264723d | ||
|
|
65f14624c8 | ||
|
|
30016a7e19 | ||
|
|
e8abbc7045 | ||
|
|
235f92ce09 | ||
|
|
22fc10911a | ||
|
|
11ae201d71 | ||
|
|
8586efda0b | ||
|
|
9e382ba691 | ||
|
|
accb645d3f | ||
|
|
620496f5cd | ||
|
|
73cd96838e | ||
|
|
82080b044b | ||
|
|
93b25ce014 | ||
|
|
f883465263 | ||
|
|
ba049fcaf8 | ||
|
|
ba47abb473 | ||
|
|
b9a1a586c0 | ||
|
|
7b19b4114c | ||
|
|
3e9c2ecc85 | ||
|
|
3940032cd3 | ||
|
|
d2d0c665b1 | ||
|
|
50aa3587d4 | ||
|
|
0bc834e6f3 | ||
|
|
dd24f6a18d | ||
|
|
462e9d4822 | ||
|
|
48ac0a64c6 | ||
|
|
cf4901da2d | ||
|
|
9f20fadee1 | ||
|
|
0f7a309adc | ||
|
|
c771167b6a | ||
|
|
e1cf93640c | ||
|
|
1716f140b7 | ||
|
|
586a7d22e7 | ||
|
|
cab9294f62 | ||
|
|
98a24fc8f9 | ||
|
|
bbc7c59563 | ||
|
|
b122d3b8e5 | ||
|
|
46e769a113 | ||
|
|
79545187b8 | ||
|
|
413a83c2e2 | ||
|
|
ab08eebfc1 | ||
|
|
ac4c56f636 | ||
|
|
1db7d57a24 | ||
|
|
e32ca98ccf | ||
|
|
5a635db262 | ||
|
|
c87bc1d55f | ||
|
|
5c63975097 | ||
|
|
fee905a34a | ||
|
|
070c9c60ec | ||
|
|
63ac050733 | ||
|
|
3ade8b29cc | ||
|
|
51a6d5897e | ||
|
|
785d28d5d1 | ||
|
|
4873cc26f2 | ||
|
|
0f8423eb4c | ||
|
|
b60fec5db3 | ||
|
|
7ffbf01607 | ||
|
|
f6b4c243d8 | ||
|
|
0287be7660 | ||
|
|
e6709d684b | ||
|
|
aa257ef58e | ||
|
|
8daa7cbda0 | ||
|
|
8a5449cebe | ||
|
|
9229834935 | ||
|
|
6469e9668b | ||
|
|
68d71f649e | ||
|
|
71752f47cb | ||
|
|
51f27d3f0c | ||
|
|
b38265cfb8 | ||
|
|
b5fb41e963 | ||
|
|
a14c894325 | ||
|
|
bc6b9bf955 | ||
|
|
4b6090ded3 | ||
|
|
fb98f0ced7 | ||
|
|
d09055db43 | ||
|
|
50b61bef6f | ||
|
|
3d0bfb0a00 | ||
|
|
3cb55c8b27 | ||
|
|
306906a8a7 | ||
|
|
6e2c245ecc | ||
|
|
74a0ffcbc5 | ||
|
|
b1a0f5e65a | ||
|
|
7e8b1ed420 | ||
|
|
b2ea7d29d0 | ||
|
|
e597ad4908 | ||
|
|
100747f56b | ||
|
|
d7b2b55bf5 | ||
|
|
9875252fd7 | ||
|
|
1551c1c771 | ||
|
|
8e226a9f28 | ||
|
|
be20383240 | ||
|
|
cf769bbd2f | ||
|
|
4ec96f9f2e | ||
|
|
bdc856812f | ||
|
|
96bb8149e9 | ||
|
|
07e69d54b2 | ||
|
|
aeb15e9549 | ||
|
|
435d9acb5c | ||
|
|
12fe0a3b29 | ||
|
|
c14e77ce9e | ||
|
|
2c8c061e67 | ||
|
|
5fab1e6754 | ||
|
|
b0e3767af5 | ||
|
|
4923119174 | ||
|
|
cdd6882541 | ||
|
|
5a6a74fe70 | ||
|
|
d7c2b98ead | ||
|
|
4c63ef204d | ||
|
|
4c6b6cad99 | ||
|
|
cc6d1d59a6 | ||
|
|
f80ce71d13 | ||
|
|
2bbbd85852 | ||
|
|
54238a5c46 | ||
|
|
8b2114a25f | ||
|
|
65da6341ba | ||
|
|
c8a87b4d2a | ||
|
|
551a971e16 | ||
|
|
c2b6eb01cd | ||
|
|
e9e26934ea | ||
|
|
5b56791aef | ||
|
|
71c0cde5ce | ||
|
|
18a4658d4f | ||
|
|
6fa81ca5b8 | ||
|
|
4940b02ae0 | ||
|
|
7942dab014 | ||
|
|
312bcebf44 | ||
|
|
eb57b10273 | ||
|
|
844f95e6df | ||
|
|
67d22f4cce | ||
|
|
59bbc0b858 | ||
|
|
731fd935ff | ||
|
|
0e1f7fe2ef | ||
|
|
3eff34b075 | ||
|
|
40b03162c3 | ||
|
|
34f4ceb77e | ||
|
|
d0ad1e42d9 | ||
|
|
59bdce9503 | ||
|
|
9517766aab | ||
|
|
c561b4280f | ||
|
|
df9ca85961 | ||
|
|
7475b4d3bf | ||
|
|
f502f6fdb2 | ||
|
|
fd667b5191 | ||
|
|
aabfefde7e | ||
|
|
bccb0ea0bb | ||
|
|
6ca22b80ef | ||
|
|
cf52f2ed62 | ||
|
|
294051769c | ||
|
|
7157f5a3ce | ||
|
|
5ca4e9f5b3 | ||
|
|
3e899b15c2 | ||
|
|
a33b04ce90 | ||
|
|
36ab5d91de | ||
|
|
8dc1b97465 | ||
|
|
350115242d | ||
|
|
7bf413db76 | ||
|
|
aafda2358f | ||
|
|
6b9084ad09 | ||
|
|
d0501d0ebd | ||
|
|
ba5a191f26 | ||
|
|
364a1518de | ||
|
|
93b2877758 | ||
|
|
832037e2ec | ||
|
|
ad2920acd0 | ||
|
|
e59a0f5e77 | ||
|
|
fd10c0eadd | ||
|
|
7e53fcb581 | ||
|
|
8249f3560f | ||
|
|
dd1b16cd54 | ||
|
|
43b39ed04f | ||
|
|
17a8b24fe5 | ||
|
|
b9db967bc4 | ||
|
|
2a5d129738 | ||
|
|
6980cfbf70 | ||
|
|
a0d2e63c8e | ||
|
|
57c52de99a | ||
|
|
9067f7a0c7 | ||
|
|
e4fa0b54a2 | ||
|
|
b41405233f | ||
|
|
88561506c9 | ||
|
|
a08ca026f0 | ||
|
|
180a53cc0c | ||
|
|
d18cfb26cd | ||
|
|
eb70578c5e | ||
|
|
63efc59758 | ||
|
|
dcd34b246a | ||
|
|
b0dcb15f94 | ||
|
|
7dbfbbb8d6 | ||
|
|
4cefd699ca | ||
|
|
8eddf7bc26 | ||
|
|
2623f39c7b | ||
|
|
da71322000 | ||
|
|
292e505e01 | ||
|
|
a322dab482 | ||
|
|
0ed1695fd4 | ||
|
|
60d31d2ea6 | ||
|
|
b744eec1a9 | ||
|
|
a6f64212ae | ||
|
|
a6cee410ef | ||
|
|
f7682730bd | ||
|
|
5f90e067f1 | ||
|
|
b0f563980d | ||
|
|
258e7c6e65 | ||
|
|
65321f9234 | ||
|
|
bde8858a3a | ||
|
|
a2b7fc1c81 | ||
|
|
69e6ccf641 | ||
|
|
14717d7449 | ||
|
|
ed76a045ae | ||
|
|
62ffc221aa | ||
|
|
ec8fd9f365 | ||
|
|
d3a8488b0e | ||
|
|
b3d6c27502 | ||
|
|
2e4d78a714 | ||
|
|
476c838753 | ||
|
|
ecb4dac494 | ||
|
|
95df7dbc8e | ||
|
|
a84cdaaa50 | ||
|
|
97a993d401 | ||
|
|
1542cbf942 | ||
|
|
727abceb0f | ||
|
|
5899181a31 | ||
|
|
a2fdf6c486 | ||
|
|
29d493a986 | ||
|
|
940a17268b | ||
|
|
ee78f2348b | ||
|
|
2261377309 | ||
|
|
cb1675dac7 | ||
|
|
808d0894f1 | ||
|
|
07c1ac9035 | ||
|
|
2b9c0c5724 | ||
|
|
abfde53945 | ||
|
|
f21508f071 | ||
|
|
2c228796a8 | ||
|
|
a84653dc19 | ||
|
|
1388af2bdc | ||
|
|
2e6886406c | ||
|
|
80ff5e76d6 | ||
|
|
1a2d0c1770 | ||
|
|
eb413a99f2 | ||
|
|
fcb9e58b2d | ||
|
|
675a8e4899 | ||
|
|
3344571227 | ||
|
|
f9b1306adf | ||
|
|
722467cb6b | ||
|
|
b3b3d04552 | ||
|
|
b9e3e4edb8 | ||
|
|
2d204bcbfd | ||
|
|
3e609ee4c7 | ||
|
|
13327203e0 | ||
|
|
da0ac58ecc | ||
|
|
712f68c697 | ||
|
|
331bd7662e | ||
|
|
009fb2fae6 | ||
|
|
7fa6e95ce1 | ||
|
|
8bce70e038 | ||
|
|
b55153524a | ||
|
|
a9ce488cc5 | ||
|
|
8061a981b1 | ||
|
|
e64c950896 | ||
|
|
69b12d907e | ||
|
|
c0c4a1b2b5 | ||
|
|
18659f3485 | ||
|
|
94f49e208f | ||
|
|
3f63982593 | ||
|
|
7f77cad1b4 | ||
|
|
e7511abd86 | ||
|
|
b1b89f01b7 | ||
|
|
24740815f6 | ||
|
|
c7356c2d85 | ||
|
|
91ba76e1e0 | ||
|
|
3dcabd6d03 | ||
|
|
0f843b007a | ||
|
|
ff11ab6b66 | ||
|
|
096e36279f | ||
|
|
5eb3b8feb5 | ||
|
|
f601eeda57 | ||
|
|
2430c5b230 | ||
|
|
9b8930cc13 | ||
|
|
0f0b620c65 | ||
|
|
a7aab18dfe | ||
|
|
a9e171de52 | ||
|
|
ad2490c3fc | ||
|
|
380589d95d | ||
|
|
bb496bf456 | ||
|
|
b086d0bad0 | ||
|
|
a13b0bc854 | ||
|
|
bbdbf4586f | ||
|
|
af5010c96f | ||
|
|
90f6342fd1 | ||
|
|
84b187f627 | ||
|
|
499b926b74 | ||
|
|
61dda8ff62 | ||
|
|
6ce4e3ede8 | ||
|
|
287718cf8b | ||
|
|
78f54523d9 | ||
|
|
9faa95450b | ||
|
|
26d7a7494e | ||
|
|
d8249917c3 | ||
|
|
054cafa138 | ||
|
|
bafcc19b7a | ||
|
|
61c94c2f81 | ||
|
|
69a90dd7af | ||
|
|
fae2eeadce | ||
|
|
3ff524821c | ||
|
|
290b250141 | ||
|
|
b61d97eb9a | ||
|
|
0bced0a5e9 | ||
|
|
23c62c5032 | ||
|
|
2770ec81e2 | ||
|
|
c35c5af5d8 | ||
|
|
f6e7b7fbc5 | ||
|
|
96a5aa9e90 | ||
|
|
e998c35c53 | ||
|
|
4d7e7e28fd | ||
|
|
648eac936e | ||
|
|
26fb83c61f | ||
|
|
2fd9974e0e | ||
|
|
7ff82aa5e2 | ||
|
|
fd28e5f36c | ||
|
|
7f40eeab0a | ||
|
|
d67faa2bb5 | ||
|
|
24cdf78a93 | ||
|
|
d01dbbb284 | ||
|
|
c275c5158e | ||
|
|
adf7f33ea8 | ||
|
|
4d10f583e4 | ||
|
|
926bc6751e | ||
|
|
1c8c02f63b | ||
|
|
43a1756783 | ||
|
|
34528db096 | ||
|
|
c79b52da1d | ||
|
|
454dc6e1ec | ||
|
|
23460bc6a8 | ||
|
|
ba2807c6f7 | ||
|
|
3899a09dea | ||
|
|
b535714671 | ||
|
|
8535b3db4c | ||
|
|
77bce9f1c4 | ||
|
|
a2b85e0c12 | ||
|
|
786d2221e1 | ||
|
|
9a9f36fca7 | ||
|
|
00d4a06cc7 | ||
|
|
2aec478ea6 | ||
|
|
ae7f5ebdeb | ||
|
|
bea5e85f3e | ||
|
|
32ee39e44a | ||
|
|
8e7b869cd9 | ||
|
|
6bccedb319 | ||
|
|
b33a62af8c | ||
|
|
d729edaeda | ||
|
|
bc92e28b30 | ||
|
|
c5b0e1958a | ||
|
|
da43cc0959 | ||
|
|
506f617d5b | ||
|
|
e81e18dd14 | ||
|
|
569d00564b | ||
|
|
881106c487 | ||
|
|
2a44cb2ed8 | ||
|
|
19a124e806 | ||
|
|
d9106abfda | ||
|
|
bc0ea5ea71 | ||
|
|
ee03c4b857 | ||
|
|
6d7ff17901 | ||
|
|
7bad92c50b | ||
|
|
d3954901a9 | ||
|
|
cd594b85f4 | ||
|
|
933dd567de | ||
|
|
248d392c4d | ||
|
|
e1f80b9707 | ||
|
|
6b4e7d0f78 | ||
|
|
4b4a8be58b | ||
|
|
512b0fd32d | ||
|
|
586d22109b | ||
|
|
47953bd6ac | ||
|
|
11d3b01050 | ||
|
|
eddd8963e7 | ||
|
|
160f07baba | ||
|
|
822d764d27 | ||
|
|
6d00e75dc2 | ||
|
|
90772ad05b | ||
|
|
756b95748b | ||
|
|
8d31ad8a70 | ||
|
|
3480518a5c | ||
|
|
b48dfde3b2 | ||
|
|
f8366cd5c9 | ||
|
|
423105e371 | ||
|
|
5a7cdacf46 | ||
|
|
d909291b0c | ||
|
|
b30522463a | ||
|
|
5449d1e6a5 | ||
|
|
d7743b05f0 | ||
|
|
8089f5ad54 | ||
|
|
2579b105da | ||
|
|
09a004cad9 | ||
|
|
3162e73540 | ||
|
|
2c5045bfce | ||
|
|
53c5ace8c3 | ||
|
|
e0d00bc750 | ||
|
|
b72f3b10ba | ||
|
|
c9482bcd2b | ||
|
|
747ce3b5da | ||
|
|
10800ee410 | ||
|
|
b4299f4f4e | ||
|
|
c45df589fa | ||
|
|
44fd299921 | ||
|
|
40a0463250 | ||
|
|
187843d2da | ||
|
|
0f2dd8456f | ||
|
|
821fbf713d | ||
|
|
ebc2364742 | ||
|
|
15fadd700a | ||
|
|
78bfc9223a | ||
|
|
e8e9b8ad82 | ||
|
|
964771afc3 | ||
|
|
fe94999c1c | ||
|
|
56bf29409b | ||
|
|
fcbf85887b | ||
|
|
ac0f2c9485 | ||
|
|
0a1817e893 | ||
|
|
b18f1265ff | ||
|
|
2dd97a0352 | ||
|
|
ef4b0edd4e | ||
|
|
b47d111a3d | ||
|
|
d80ecf0209 | ||
|
|
ff4973458c | ||
|
|
f9ff902bbc | ||
|
|
95c966c3fc | ||
|
|
982e226c3f | ||
|
|
42ca89039a | ||
|
|
07b48024d1 | ||
|
|
1c4dd79b9b | ||
|
|
56fc8f6d30 | ||
|
|
ad1331527e | ||
|
|
1bbf07b27e | ||
|
|
b9deb883fa | ||
|
|
9c4ebed3ff | ||
|
|
e64e54d57f | ||
|
|
d4ee6a2b53 | ||
|
|
af062af490 | ||
|
|
4bdd6013b0 | ||
|
|
11f099e1da | ||
|
|
703cebaaac | ||
|
|
4710b94cfb | ||
|
|
5ca2fd887a | ||
|
|
d1e1438ca0 | ||
|
|
382ec84248 | ||
|
|
bc4240dda5 | ||
|
|
b97da1dfe4 | ||
|
|
e62a6964f7 | ||
|
|
fd70c25d21 | ||
|
|
227467adb9 | ||
|
|
afce41c754 | ||
|
|
36e22c99a1 | ||
|
|
dd25d807df | ||
|
|
fea5d7c612 | ||
|
|
c859fd40b6 | ||
|
|
890e12fc79 | ||
|
|
ab1a5c7abb | ||
|
|
079a679431 | ||
|
|
56d1214187 | ||
|
|
fb53ad9c3a | ||
|
|
5755ecdbfc | ||
|
|
bcaa1ef7f2 | ||
|
|
9bb9a747e2 | ||
|
|
e86180119e | ||
|
|
40053593a8 | ||
|
|
732cf88786 | ||
|
|
9fb0beca1d | ||
|
|
f091c34bac | ||
|
|
fd9f6e4619 | ||
|
|
4f9bebddec | ||
|
|
edf2d8d68f | ||
|
|
654d694e39 | ||
|
|
19a6120dc8 | ||
|
|
f4a33b868a | ||
|
|
cd3db5fcc4 | ||
|
|
ae5a4ecee2 | ||
|
|
fd4a5fc473 | ||
|
|
66e64dd2d2 | ||
|
|
a0119b83ca | ||
|
|
dba7a8a70a | ||
|
|
5c3a22dbd6 | ||
|
|
b70510f4be | ||
|
|
2d4bacf61d | ||
|
|
547de4a7bb | ||
|
|
845a5973c9 | ||
|
|
6e5195f650 | ||
|
|
f3624b1b87 | ||
|
|
1a2c9044d7 | ||
|
|
9a67d7958f | ||
|
|
23f73cb8b3 | ||
|
|
9f6962f3f1 | ||
|
|
958e3ec201 | ||
|
|
ce9cfdaa45 | ||
|
|
56a111afa3 | ||
|
|
38bbdf8fc3 | ||
|
|
a0e523cd4b | ||
|
|
7660849b8f | ||
|
|
4b814698bd | ||
|
|
96046f1e82 | ||
|
|
387be713c8 | ||
|
|
d9943120ed | ||
|
|
a1907d77f8 | ||
|
|
f25a3f8a36 | ||
|
|
9f1c3c8513 | ||
|
|
d1521c584d | ||
|
|
f52b6cf19f | ||
|
|
59040169ed | ||
|
|
8f6559828d | ||
|
|
619962ee18 | ||
|
|
7ebe44ac25 | ||
|
|
0cc2104257 | ||
|
|
9a6158cd94 | ||
|
|
7d3aad403d | ||
|
|
aa70f3d95e | ||
|
|
ec457dc33a | ||
|
|
31b978ca3e | ||
|
|
9a4586557b | ||
|
|
02c48dc8a4 | ||
|
|
384c9aaad3 | ||
|
|
0c249de9e5 | ||
|
|
abf4658ab9 | ||
|
|
ba25d0df1d | ||
|
|
e7fa43d600 | ||
|
|
49a84f9e8a | ||
|
|
6ee657b7d8 | ||
|
|
6866ea0d0e | ||
|
|
34d38fe1c6 | ||
|
|
b17309b652 | ||
|
|
107abd2654 | ||
|
|
f528ced22b | ||
|
|
71628ad0b8 | ||
|
|
481529e865 | ||
|
|
bc6645f753 | ||
|
|
c1ca578853 | ||
|
|
4ce2e146ea | ||
|
|
39ed865043 | ||
|
|
0de4700002 | ||
|
|
ea95ad24be | ||
|
|
415e55ff37 | ||
|
|
c20134c20d | ||
|
|
56308b3256 | ||
|
|
3d8cd65b1b | ||
|
|
2b6924ef6e | ||
|
|
01d8b0e15d | ||
|
|
16f17f3f1b | ||
|
|
09042f5499 | ||
|
|
3690d60b71 | ||
|
|
4dedb1c1b1 | ||
|
|
067ee1a6b1 | ||
|
|
0c1db4879e | ||
|
|
02efc760bf | ||
|
|
a91bc04e04 | ||
|
|
9a59cddcd4 | ||
|
|
6ab754676a | ||
|
|
9917a05f04 | ||
|
|
fcda76f684 | ||
|
|
639f37669a | ||
|
|
6d720bf7b2 | ||
|
|
f3b030c8e5 | ||
|
|
6b8b7c9d55 | ||
|
|
21ed79938e | ||
|
|
004af03ea5 | ||
|
|
b2c63c3d3c | ||
|
|
ae139021eb | ||
|
|
f6dedf3598 | ||
|
|
8003842e5c | ||
|
|
01477d3b81 | ||
|
|
ebf9279f95 | ||
|
|
304548ef82 | ||
|
|
dd6f129c3c | ||
|
|
c2f007afc5 | ||
|
|
8dc83951ee | ||
|
|
b7dc5abca7 | ||
|
|
8b784785ec | ||
|
|
750b51c343 | ||
|
|
e09ed765a1 | ||
|
|
70a765e387 | ||
|
|
c65fa25ce2 | ||
|
|
cbbfebbc7a | ||
|
|
9d499c769b | ||
|
|
dad2b5541e | ||
|
|
56960ce05e | ||
|
|
e247be69bf | ||
|
|
e209686835 | ||
|
|
047936c338 | ||
|
|
ca0571ea52 | ||
|
|
655cf9573f | ||
|
|
c457f744ef | ||
|
|
8f3ea23ece | ||
|
|
3225c71ecd | ||
|
|
5310a355ef | ||
|
|
d7875cdf4f | ||
|
|
dc05defb8a | ||
|
|
98c11d0a82 | ||
|
|
14f1652842 | ||
|
|
d4b97a08cd | ||
|
|
c934c1d71b | ||
|
|
a16315a65f | ||
|
|
d6beca5dcf | ||
|
|
9d7e62be1a | ||
|
|
5c008726f0 | ||
|
|
8c506d86af | ||
|
|
db7a49edc6 | ||
|
|
2428c5cbe6 | ||
|
|
01bc0148c0 | ||
|
|
a92511ceaf | ||
|
|
19517fc51e | ||
|
|
71c35d3ca2 | ||
|
|
38af812a82 | ||
|
|
622111613f | ||
|
|
21ef05058c | ||
|
|
abcdd6605c | ||
|
|
f2d89cb3bc | ||
|
|
2d05ce37c6 | ||
|
|
2bc5c1987c | ||
|
|
e39e2ddf52 | ||
|
|
ac61254581 | ||
|
|
9e182fde66 | ||
|
|
70d59ffe16 | ||
|
|
fb4bcd8cfd | ||
|
|
2288abcd49 | ||
|
|
42fde1cbc6 | ||
|
|
d675a549de | ||
|
|
6bab8d19c6 | ||
|
|
365058c48f | ||
|
|
5eb7145939 | ||
|
|
4dab491df2 | ||
|
|
9f92341c84 | ||
|
|
3357712928 | ||
|
|
0e59c12af4 | ||
|
|
aab0d43f47 | ||
|
|
9cc32c920b | ||
|
|
72ad00f9d0 | ||
|
|
89217f20af | ||
|
|
477a9b33b4 | ||
|
|
5c6fe50487 | ||
|
|
6c34ae5804 | ||
|
|
4409b275fc | ||
|
|
8848ac5a9b | ||
|
|
c055e629c7 | ||
|
|
e6f26464d7 | ||
|
|
a0aeeba075 | ||
|
|
c640a55b1c | ||
|
|
7d0b7e47c1 | ||
|
|
132ed5c8f0 | ||
|
|
bd88b8b5a6 | ||
|
|
0568f7a2b6 | ||
|
|
1a28b08694 | ||
|
|
3b3a6b12a7 | ||
|
|
50213eee81 | ||
|
|
7cd2a7da7c | ||
|
|
4f67f364bc | ||
|
|
7cf08b93ff | ||
|
|
474a1f0447 | ||
|
|
76d7fbd5ee | ||
|
|
8d87410c94 | ||
|
|
1961c052c8 | ||
|
|
843dbd56ef | ||
|
|
be3c54c670 | ||
|
|
01afcb243c | ||
|
|
b0eb73f7b3 | ||
|
|
1907174c5f | ||
|
|
4da604be5a | ||
|
|
43754bd11d | ||
|
|
acd9046093 | ||
|
|
2fd6181873 | ||
|
|
b15c5a7eaf | ||
|
|
1b1d60b9d7 | ||
|
|
9c70fdaef9 | ||
|
|
fcbe5aedbd | ||
|
|
6c6a3f6bd3 | ||
|
|
e873121372 | ||
|
|
ad52830fb8 | ||
|
|
c802f91f4e | ||
|
|
51913542f4 | ||
|
|
be7e000389 | ||
|
|
1d4411a474 | ||
|
|
76f1a4af4f | ||
|
|
bb1a0bd86c | ||
|
|
8b2b9654ab | ||
|
|
60ae71bf3a | ||
|
|
8625609c2d | ||
|
|
3c4a4b04ce | ||
|
|
b3faf353c9 | ||
|
|
f700b422be | ||
|
|
1b2a2e6737 | ||
|
|
12e5c2f07d | ||
|
|
5c07a747bb | ||
|
|
a9f7277b1b | ||
|
|
d13b6d6896 | ||
|
|
819066c5d5 | ||
|
|
a65982bffb | ||
|
|
6b8f446b52 | ||
|
|
2b97d6563d | ||
|
|
a0506a15ee | ||
|
|
68ca1732b8 | ||
|
|
75f4309c1f | ||
|
|
78767b583d | ||
|
|
a0703ab62d | ||
|
|
9d232cd8af | ||
|
|
03d296eb35 | ||
|
|
2b27df6733 | ||
|
|
f012d54a1d | ||
|
|
61dc2cab0b | ||
|
|
a2313f499c | ||
|
|
cbda89766f | ||
|
|
070ccf4a5b | ||
|
|
8e4b68917c | ||
|
|
0d0d011579 | ||
|
|
71daa1ef6b | ||
|
|
0ed62e84de | ||
|
|
0a31a9aa38 | ||
|
|
6747142cd7 | ||
|
|
6cf442e329 | ||
|
|
d26f16a175 | ||
|
|
8d7f8cda8c | ||
|
|
75a70d98d5 | ||
|
|
b3374ea1fb | ||
|
|
0905c6ae7e | ||
|
|
3eeedd7caf | ||
|
|
410dcee0a1 | ||
|
|
5b4d2350e6 | ||
|
|
cbeea859c2 | ||
|
|
422cd726fa | ||
|
|
9f43b4c758 | ||
|
|
dd429d9c00 | ||
|
|
b63c90bf6b | ||
|
|
fa26889d03 | ||
|
|
30011b8525 | ||
|
|
3ac5432e29 | ||
|
|
1d52548575 | ||
|
|
d5ce44820a | ||
|
|
cc2b4f712c | ||
|
|
98f038ad96 | ||
|
|
f8d2f552bd | ||
|
|
f2ae08ab19 | ||
|
|
325d774393 | ||
|
|
0856f53703 | ||
|
|
7f0bfdfeb2 | ||
|
|
51371e0ca5 | ||
|
|
3bd66b78c1 | ||
|
|
5ea6054a75 | ||
|
|
04738996fc | ||
|
|
07a9477213 | ||
|
|
a5b48f9a0d | ||
|
|
d141e849a3 | ||
|
|
da68ee19e7 | ||
|
|
8b2f7bd5a2 | ||
|
|
6119756347 | ||
|
|
06c80b6ccd | ||
|
|
7ce1f6d86d | ||
|
|
88087f2b2f | ||
|
|
16c4f5bbd0 | ||
|
|
e877c2406e | ||
|
|
b6a1583e8e | ||
|
|
48df800db3 | ||
|
|
ee05daab92 | ||
|
|
74f4c37d5f | ||
|
|
3f5ba950d6 | ||
|
|
0a52e92d4c | ||
|
|
7c57806c6f | ||
|
|
a2f8703df5 | ||
|
|
073251fdb1 | ||
|
|
5a0ee3c2f9 | ||
|
|
6bd5dce954 | ||
|
|
f25059c244 | ||
|
|
856f2c433e | ||
|
|
38c5a4465b | ||
|
|
f494bfcbb9 | ||
|
|
b856fc4664 | ||
|
|
faa96ead44 | ||
|
|
26444bf8df | ||
|
|
4eaade2938 | ||
|
|
662e8b2d20 | ||
|
|
4502295a34 | ||
|
|
25b0bf0ae8 | ||
|
|
f6b6bc47d6 | ||
|
|
a692b01c04 | ||
|
|
a197ccf12d | ||
|
|
67e5913edf | ||
|
|
e864107046 | ||
|
|
7984ea4eb6 | ||
|
|
f38bd5030d | ||
|
|
a2fea9928d | ||
|
|
c64f506933 | ||
|
|
445cd2a6c5 | ||
|
|
fb073ec88d | ||
|
|
c09e96f294 | ||
|
|
0b54785fe5 | ||
|
|
8835c0d486 | ||
|
|
0442eef95b | ||
|
|
6ae11071b3 | ||
|
|
3c177c1bb9 | ||
|
|
e0213b1a41 | ||
|
|
e70ff87c86 | ||
|
|
db10a421dc | ||
|
|
5725336149 | ||
|
|
b8ba27bbc0 | ||
|
|
e3f6638a76 | ||
|
|
f8553f6d3a | ||
|
|
a78da18aa4 | ||
|
|
d764d7094f | ||
|
|
2651554721 | ||
|
|
fa686457c2 | ||
|
|
a65f0ec80c | ||
|
|
e01e1d8ab5 | ||
|
|
58597b6d9b | ||
|
|
196e913681 | ||
|
|
620553b795 | ||
|
|
6df50790cd | ||
|
|
6cd98e32f7 | ||
|
|
f9baa4de71 | ||
|
|
1cd5005d06 | ||
|
|
f7a3b996fa | ||
|
|
ea874112d8 | ||
|
|
25d397e7b3 | ||
|
|
5111b20bf5 | ||
|
|
f571d6ba36 | ||
|
|
0e21baf611 | ||
|
|
1e78881a70 | ||
|
|
077d307b30 | ||
|
|
998992ddcb | ||
|
|
0ff9499583 | ||
|
|
eb1668ce81 | ||
|
|
54b97a6f03 | ||
|
|
5e48c36877 | ||
|
|
9e3fca4021 | ||
|
|
5130c35b85 | ||
|
|
e01651cde1 | ||
|
|
12cf1c9980 | ||
|
|
092711e412 | ||
|
|
0e6d693dc8 | ||
|
|
aac3126183 | ||
|
|
63cddceeaa | ||
|
|
486d4956ff | ||
|
|
7567a67cdd | ||
|
|
c4939c76a5 | ||
|
|
04e557fdaf | ||
|
|
7dcc8f1d7a | ||
|
|
343f97b3ac | ||
|
|
706f3e93f4 | ||
|
|
f47ef539db | ||
|
|
2148e857e5 | ||
|
|
afa4c6b9fc | ||
|
|
27127853db | ||
|
|
a81ba0215a | ||
|
|
3e0bd533db | ||
|
|
e8d20a8e4b | ||
|
|
6896d8df47 | ||
|
|
8455251c35 | ||
|
|
5cf351913e | ||
|
|
416386edcd | ||
|
|
497f126bb2 | ||
|
|
4687322398 | ||
|
|
99f0265d34 | ||
|
|
7b0b9a12ea | ||
|
|
7d483987ce | ||
|
|
f705a9674b | ||
|
|
3233e9cfe0 | ||
|
|
5a98a51173 | ||
|
|
2eaba21a4c | ||
|
|
9a227de3e7 | ||
|
|
3f57200e10 | ||
|
|
1486f32d42 | ||
|
|
e3edce4e7b | ||
|
|
0e559c5bbc | ||
|
|
edfbfbfd0a | ||
|
|
a4eae770ce | ||
|
|
72e5c15110 | ||
|
|
97c8140cea | ||
|
|
c5b03ca4ae | ||
|
|
c2f2c659d9 | ||
|
|
9364bd6c81 | ||
|
|
baa2be3217 | ||
|
|
12742586e5 | ||
|
|
194620c5f0 | ||
|
|
67d37adf98 | ||
|
|
3f0d2fd5ca | ||
|
|
5b07e5fd1f | ||
|
|
3cae32390d | ||
|
|
1be0285832 | ||
|
|
2867f1bbde | ||
|
|
c4d2bf59fb | ||
|
|
5527883c43 | ||
|
|
ade93ccf25 | ||
|
|
84b305f3f0 | ||
|
|
67b89459d5 | ||
|
|
6d916c6c4a | ||
|
|
87542eeaf1 | ||
|
|
29f2e3181a | ||
|
|
8255696b45 | ||
|
|
fc00e89499 | ||
|
|
55946c15e7 | ||
|
|
2e539e2c97 | ||
|
|
38c286c019 | ||
|
|
56d842258c | ||
|
|
8ed8ab69d5 | ||
|
|
4dcbd40c49 | ||
|
|
72645b160d | ||
|
|
dda1b167c9 | ||
|
|
074cf40409 | ||
|
|
6c09504040 | ||
|
|
4991b3bb1a |
12
.gitignore
vendored
12
.gitignore
vendored
@@ -13,6 +13,9 @@ core
|
||||
.gdb_history
|
||||
.gdbinit
|
||||
|
||||
/src/nano
|
||||
/src/revision.h
|
||||
|
||||
/ABOUT-NLS
|
||||
/INSTALL
|
||||
/aclocal.m4
|
||||
@@ -35,13 +38,14 @@ core
|
||||
/mkinstalldirs
|
||||
/stamp-h1
|
||||
|
||||
# gettext m4 files.
|
||||
# Gettext m4 files:
|
||||
/m4/codeset.m4
|
||||
/m4/extern-inline.m4
|
||||
/m4/fcntl-o.m4
|
||||
/m4/gettext.m4
|
||||
/m4/glibc2.m4
|
||||
/m4/glibc21.m4
|
||||
/m4/host-cpu-c-abi.m4
|
||||
/m4/iconv.m4
|
||||
/m4/intdiv0.m4
|
||||
/m4/intl.m4
|
||||
@@ -69,13 +73,9 @@ core
|
||||
/m4/wint_t.m4
|
||||
/m4/xsize.m4
|
||||
|
||||
# gnulib entries
|
||||
# Gnulib stuff:
|
||||
/gnulib/
|
||||
/lib/
|
||||
/m4/.gitignore
|
||||
/m4/gnulib-cache.m4
|
||||
/snippet/
|
||||
|
||||
/nano.spec
|
||||
/src/nano
|
||||
/src/revision.h
|
||||
|
||||
36
AUTHORS
36
AUTHORS
@@ -8,19 +8,20 @@ Chris Allegretta <chrisa@asty.org>
|
||||
Benno Schulenberg <bensberg@telfort.nl>
|
||||
* An array of small bug fixes, the cut-word and block-jump
|
||||
routines, text selection by holding Shift, macro recording
|
||||
and replay, plus some key bindings. Current maintainer.
|
||||
and replay, extra key bindings, the --indicator, --minibar,
|
||||
and --zero options, and braced functions in string binds.
|
||||
Current maintainer.
|
||||
|
||||
David Lawrence Ramsey <pooka109@gmail.com>
|
||||
* Former stable series maintainer. Multiple buffer support,
|
||||
operating dir (-o) option, bug fixes for display routines,
|
||||
wrapping code, spelling fixes, constantshow mode, parts of
|
||||
UTF-8 support, softwrap overhaul, undoable (un)indentations,
|
||||
undoable justifications, justifiable regions, and numerous
|
||||
other fixes.
|
||||
* Multiple-buffer support, operating-dir option (-o), bug fixes
|
||||
for display routines, wrapping code, spelling fixes, parts of
|
||||
UTF-8 support, softwrap overhaul, constantshow mode, undoable
|
||||
indentations, undoable justifications, justifiable regions,
|
||||
and numerous other fixes. Former stable-series maintainer.
|
||||
|
||||
Jordi Mallach <jordi@gnu.org>
|
||||
* Debian package maintainer, fellow bug squasher.
|
||||
* Internationalization support head, ca.po maintainer.
|
||||
* Debian package maintainer, fellow bug squasher, translator
|
||||
for Catalan. Former head of internationalization support.
|
||||
|
||||
Adam Rogoyski <rogoyski@cs.utexas.edu>
|
||||
* New write_file() function, read_file() optimization, mouse
|
||||
@@ -33,9 +34,9 @@ Robert Siemborski <rjs3@andrew.cmu.edu>
|
||||
new edit display routines.
|
||||
|
||||
Rocco Corsi <rocco.corsi@sympatico.ca>
|
||||
* Internal spelling code, many optimizations and bug fixes for
|
||||
findnextstr() and search-related functions, various display
|
||||
and file handling fixes.
|
||||
* Internal spelling code, many optimizations and bug fixes
|
||||
for findnextstr() and search-related functions, various
|
||||
display and file-handling fixes.
|
||||
|
||||
David Benbennick <dbenbenn@math.cornell.edu>
|
||||
* Wrap and justify bugfixes/enhancements, new color syntax
|
||||
@@ -43,11 +44,11 @@ David Benbennick <dbenbenn@math.cornell.edu>
|
||||
miscellaneous fixes.
|
||||
|
||||
Mike Frysinger <vapier@gentoo.org>
|
||||
* Gentoo package maintainer. Whitespace display mode,
|
||||
--enable-utf8/--disable-utf8 configure options for ncurses,
|
||||
many new color regexes and improvements to existing color
|
||||
regexes in syntax/*.nanorc, the move from svn to git, the
|
||||
conversion to gnulib, and miscellaneous bug fixes.
|
||||
* Whitespace display mode, --enable-utf8/--disable-utf8 configure
|
||||
options for ncurses, many new color regexes and improvements to
|
||||
existing ones in syntax/*.nanorc, the move from svn to git, the
|
||||
conversion to gnulib, and miscellaneous bug fixes. Former
|
||||
Gentoo package maintainer.
|
||||
|
||||
Mark Majeres <mark@engine12.com>
|
||||
* A functional undo/redo system, and coloring nano's interface.
|
||||
@@ -69,6 +70,7 @@ Rishabh Dave <rishabhddave@gmail.com>
|
||||
|
||||
Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
|
||||
* Filtering text through an external command.
|
||||
* Placing anchors (bookmarks) and jumping to them.
|
||||
|
||||
Brand Huntsman <alpha@qzx.com>
|
||||
* The delayed parsing of syntax files.
|
||||
|
||||
@@ -3007,7 +3007,7 @@ GNU nano 1.3.5 - 2004.11.22
|
||||
- Don't change the file format when we insert another file into
|
||||
the current one. (DLR)
|
||||
do_insertfile()
|
||||
- Simplify by reusing variables whereever possible, and add a
|
||||
- Simplify by reusing variables wherever possible, and add a
|
||||
parameter execute to indicate whether or not to be in "Execute
|
||||
Command" mode. (DLR)
|
||||
- Rework so that goto is no longer needed, using do_writeout()
|
||||
@@ -5035,7 +5035,7 @@ GNU nano 1.1.99pre2 - 2003.02.03
|
||||
- Fix the mouse code to work with lines longer than COLS and
|
||||
with the proper positioning, including special characters.
|
||||
(David Benbennick)
|
||||
do_preserve_msg():
|
||||
do_preserve_msg()
|
||||
- Unsplit error message into a single fprintf call. (Jordi)
|
||||
main()
|
||||
- Call load_file with arg 0 for insert, as we aren't really
|
||||
@@ -5143,7 +5143,7 @@ GNU nano 1.1.99pre1 - 2003.01.17
|
||||
- Added --enable-all option to compile in all the extra stuff
|
||||
we'd normally need extra flags for.
|
||||
- color.c:
|
||||
update_color():
|
||||
update_color()
|
||||
- Remove an unneeded edit_refresh() call after do_colorinit().
|
||||
(David Benbennick)
|
||||
- cut.c:
|
||||
@@ -5778,7 +5778,7 @@ GNU nano 1.1.10 - 2002.07.25
|
||||
Also, pass current_x_find to strstrwrapper() so we know whether
|
||||
we're at the beginning of a string or not (see changes to
|
||||
strstrwrapper() below), and reset it between lines. (DLR)
|
||||
do_gotoline():
|
||||
do_gotoline()
|
||||
- Make sure placewewant is zero after we go to a line. (David
|
||||
Benbennick)
|
||||
do_gotopos()
|
||||
@@ -6036,7 +6036,7 @@ GNU nano 1.1.8 - 2002.03.30
|
||||
- Catalan and Spanish translation updates. (Jordi)
|
||||
- Typo. (DLR)
|
||||
- po/fr.po:
|
||||
- French translation updates (Jean-Philippe Guérard).
|
||||
- French translation updates. (Jean-Philippe Guérard)
|
||||
- po/gl.po:
|
||||
- Galician translation updates. (Jacobo Tarrio)
|
||||
- po/uk.po, po/ru.po:
|
||||
@@ -6156,10 +6156,9 @@ GNU nano 1.1.7 - 2002.03.05
|
||||
- po/it.po:
|
||||
- Italian translation updates. (Marco Colombo)
|
||||
- po/cs.po:
|
||||
- Partial Czech translation updates. (Vaclav Haisman)
|
||||
- Partial Czech translation updates. (Václav Haisman)
|
||||
- po/hu.po:
|
||||
- Hungarian translation updates, or to be precise, rewrite.
|
||||
(Gergely Nagy)
|
||||
- Hungarian translation updates, or to be precise, rewrite. (Gergely Nagy)
|
||||
- po/uk.po, po/ru.po:
|
||||
- Russian and Ukrainian translation updates. (Sergey A. Ribalchenko)
|
||||
- po/da.po:
|
||||
@@ -6268,7 +6267,7 @@ nano-1.1.6 - 2002.01.25
|
||||
- po/nn.po:
|
||||
- Norwegian nynorsk translation updates. (Kjetil Torgrim Homme)
|
||||
- po/nb.po:
|
||||
- New Norwegian bokmål translation. (Stig E Sandoe <stig@ii.uib.no>)
|
||||
- New Norwegian bokmål translation, by Stig E Sandoe <stig@ii.uib.no>.
|
||||
- po/da.po:
|
||||
- Danish translation update. (Keld Simonsen)
|
||||
|
||||
@@ -6380,8 +6379,10 @@ nano-1.1.4 - 2001.12.11
|
||||
do_wrap()
|
||||
- Many fixes. (David Lawrence Ramsey)
|
||||
do_spell()
|
||||
- Dont prompt for replace if we don't change the word in
|
||||
- Don't prompt for replace if we don't change the word in
|
||||
question. (Rocco Corsi)
|
||||
- m4/gettext.m4:
|
||||
- diff against mutt 1.2.5's gettext.m4.
|
||||
- po/de.po:
|
||||
- German translation updates. (Karl Eichwalder)
|
||||
- po/ru.po:
|
||||
@@ -6394,8 +6395,6 @@ nano-1.1.4 - 2001.12.11
|
||||
- Spanish translation updates. (Jordi)
|
||||
- po/fr.po:
|
||||
- French translation updates. (Michel Robitaille)
|
||||
- m4/gettext.m4:
|
||||
- diff against mutt 1.2.5's gettext.m4.
|
||||
|
||||
nano-1.1.3 - 2001.10.26
|
||||
- General
|
||||
@@ -6770,7 +6769,7 @@ nano-1.1.0 - 2001.07.15
|
||||
- po/es.po, po/ca.po:
|
||||
- Updated. (Jordi)
|
||||
- po/gl.po:
|
||||
- Galician translation by Jacobo Tarrío.
|
||||
- New Galician translation, by Jacobo Tarrío <jtarrio@trasno.net>.
|
||||
- po/uk.po, po/ru.po:
|
||||
- New Ukrainian and Russian translations by Sergey A. Ribalchenko
|
||||
<fisher@obu.ck.ua>, thanks!
|
||||
@@ -6779,9 +6778,9 @@ nano-1.1.0 - 2001.07.15
|
||||
- po/it.po
|
||||
- Updated Italian translation by Marco Colombo.
|
||||
- po/no.po:
|
||||
- New Norwegian translation by Eivind Kjørstad <ekj@vestdata.no>.
|
||||
- New Norwegian translation, by Eivind Kjørstad <ekj@vestdata.no>.
|
||||
- po/sv.po:
|
||||
- New Swedish translation by Christian Rose <menthos@menthos.com>.
|
||||
- New Swedish translation, by Christian Rose <menthos@menthos.com>.
|
||||
|
||||
nano 1.0.1 - 2001.04.06
|
||||
- General:
|
||||
@@ -6825,15 +6824,15 @@ nano-1.0.0 - 2001.03.22
|
||||
the "new" C++ reserved word, even though there is likely no way
|
||||
nano will EVER be compilable with a C++ compiler. (suggested by
|
||||
Rocco Corsi).
|
||||
- ca.po, es.po:
|
||||
- Final tweaks for Nano 1.0.
|
||||
- cs.po:
|
||||
- Czech translation from Vaclav Haisman.
|
||||
- nano.info:
|
||||
- Added dir entry. (Albert Chin)
|
||||
- winio.c:
|
||||
statusq()
|
||||
- Added NANO_BACK_KEY and NANO_FORWARD_KEY cases for left and right.
|
||||
- ca.po, es.po:
|
||||
- Final tweaks for Nano 1.0.
|
||||
- cs.po:
|
||||
- New Czech translation, by Václav Haisman <V.Haisman@sh.cvut.cz>.
|
||||
|
||||
1.0-test prerelease - 2001.03.17
|
||||
- nano.c:
|
||||
@@ -6847,7 +6846,7 @@ nano-1.0.0 - 2001.03.22
|
||||
edit update. Fixes bug #57.
|
||||
- search.c:
|
||||
print_replaced()
|
||||
- s/occurence/occurrence typos. (Jordi)
|
||||
- Fix typos in "occurrence". (Jordi)
|
||||
search_init()
|
||||
- If using Pico mode and regex and same answer is entered, use
|
||||
last_search string instead of answer. Fixes bug #56.
|
||||
@@ -6888,13 +6887,13 @@ nano-0.9.99pre3 - 2001.02.19
|
||||
- fi.po:
|
||||
- Translation updates by Pauli Virtanen.
|
||||
- hu.po:
|
||||
- Hungarian translation by Horvath Szabolcs.
|
||||
- New Hungarian translation, by Horvath Szabolcs <horvaths@penguinpowered.com>.
|
||||
- id.po:
|
||||
- Translation updates by Tedi Heriyanto.
|
||||
- es.po:
|
||||
- Translation updates and grammatical/typo fixes. (Jordi)
|
||||
- ca.po:
|
||||
- Catalan translation by Jordi Mallach :)
|
||||
- Catalan translation by Jordi Mallach. :)
|
||||
- Miquel Vidal <miquel@sindominio.net> went over it and corrected
|
||||
many typos and completed bits that remained untranslated by error.
|
||||
|
||||
@@ -6998,7 +6997,6 @@ General
|
||||
repeated string defs and globals.
|
||||
do_justify()
|
||||
- Small fix for totsize calculation. (Rob)
|
||||
|
||||
- fi.po:
|
||||
- Update by Pauli Virtanen.
|
||||
|
||||
@@ -7395,7 +7393,7 @@ nano 0.9.18 - 2000.09.18
|
||||
- es.po:
|
||||
- Translated new strings and minor updates. (Jordi)
|
||||
- de.po
|
||||
- Revised translations by <floki@bigfoot.com>.
|
||||
- Revised translations by Florian König.
|
||||
|
||||
nano-0.9.17 - 2000.09.04
|
||||
- General
|
||||
@@ -7426,7 +7424,7 @@ nano-0.9.17 - 2000.09.04
|
||||
do_toggle()
|
||||
- Added checks for no help and no wrap mode, and print opposite
|
||||
enable/disable message.
|
||||
do_suspend(), do_cont():
|
||||
do_suspend(), do_cont()
|
||||
- New functions, handle suspend signal in a Pico-like manner and
|
||||
work with Meta-Z.
|
||||
- winio.c:
|
||||
@@ -7447,7 +7445,7 @@ nano-0.9.17 - 2000.09.04
|
||||
search_abort()
|
||||
- Now calls edit_refresh_clearok when MARK_ISSET to handle screen
|
||||
ugliness bug (reported by Ken Tyler).
|
||||
findnextstr():
|
||||
findnextstr()
|
||||
- Added reset for placewewant. (Ben Roberts)
|
||||
- Fixed check for string that only occurs on the same line failing
|
||||
(bug discovered by Ken Tyler).
|
||||
@@ -7532,10 +7530,10 @@ nano-0.9.14 - 2000.07.27
|
||||
- Changed check for filename to filename[0]. Added some code,
|
||||
overall fixes bug #30 =-)
|
||||
- nano.c:
|
||||
do_justify() & do_wrap():
|
||||
do_justify(), do_wrap()
|
||||
- totsize-related fixes. (Rob)
|
||||
- de.po
|
||||
- Revised translations by floki@bigfoot.com
|
||||
- Revised translations by Florian König.
|
||||
|
||||
nano-0.9.13 - 2000.07.23
|
||||
- Implemented Pico's -k mode. New flag CUT_TO_END, option (-k, --cut),
|
||||
@@ -7548,32 +7546,32 @@ nano-0.9.13 - 2000.07.23
|
||||
- Don't edit_refresh() if the bottom of the file is in the edit
|
||||
buffer. (Adam)
|
||||
- nano.c:
|
||||
main():
|
||||
main()
|
||||
- TABSIZE now set before first call to edit_refresh. (Bill Soudan)
|
||||
- Different ^C kill code (patch by Christian Weisgerber).
|
||||
die():
|
||||
die()
|
||||
- More intelligent emergency-save filename selection. (Rob)
|
||||
do_spell():
|
||||
do_spell()
|
||||
- Changed exit semantics a bit so that aspell wouldn't get
|
||||
all screwy (bug discovered by Joshua Jensen).
|
||||
- files.c:
|
||||
read_file():
|
||||
read_file()
|
||||
- Added init of buf variable, hopefully this will stop the
|
||||
"bleeding" of text seen with mutt and using i18n.
|
||||
write_file():
|
||||
write_file()
|
||||
- Added code to check to see if using -l and the file is not
|
||||
in fact a link. This should fix the behavior where a file
|
||||
that does not have write permission but could be removed and
|
||||
rewritten is saved without error. Please test this feature
|
||||
and give feedback.
|
||||
- search.c:
|
||||
search_init():
|
||||
search_init()
|
||||
- Added " (to replace)" statement to end of search string if
|
||||
we are doing a replace. Manually converted all the translations
|
||||
from '%s' to '%s%s' to ensure they still work with the new code.
|
||||
Also put in the translation for " (replace)" in the .po's. Hope
|
||||
I didn't step on your toes doing this Jordi. (Chris)
|
||||
do_search(), do_replace():
|
||||
do_search(), do_replace()
|
||||
- Removed call to search_abort()/replace_abort() before call to
|
||||
the opposite function.
|
||||
- Fixed bug #28.
|
||||
@@ -7612,52 +7610,47 @@ nano-0.9.12 - 2000.07.07
|
||||
- Corrected FIXME in do_enter with explanation. (Rob)
|
||||
- Fixed FIXME in do_justify, resulted in creation of
|
||||
fix_editbot [also fixed in do_enter] (winio.c). (Rob)
|
||||
help_init():
|
||||
help_init()
|
||||
- Moved newline out of if statement. (Rocco Corsi)
|
||||
do_char():
|
||||
do_char()
|
||||
- Magic Line related code in do_char. (Rob)
|
||||
do_backspace(), do_delete():
|
||||
do_backspace(), do_delete()
|
||||
- Added magic line code here too.
|
||||
|
||||
- de.po:
|
||||
- Revised translations by floki@bigfoot.com.
|
||||
- fi.po:
|
||||
- Finnish translation by pauli.virtanen@saunalahti.fi.
|
||||
- utils.c:
|
||||
- Added new_magicline()
|
||||
- winio.c:
|
||||
- Added stdlib.h to includes, found by OpenBSD gcc.
|
||||
- lots of new commenting around display functions
|
||||
do_yesno(), nanogetstr():
|
||||
do_yesno(), nanogetstr()
|
||||
- Removed now unnecessary raw/cbreak combos.
|
||||
- Removed gettext calls from "Y(es)", "N(o)", "A(ll)" and "^C", till
|
||||
we decide if those keybindings should be translated. (Jordi)
|
||||
clear_bottomwin():
|
||||
clear_bottomwin()
|
||||
- Removed wrefresh(edit) call.
|
||||
edit_update_top():
|
||||
edit_update_top()
|
||||
- Fixed a bug that caused nano to not update when
|
||||
current->next == NULL (e.g. paging down to the very bottom of
|
||||
ABOUT NLS wouldn't work).
|
||||
fix_editbot:
|
||||
fix_editbot()
|
||||
- Added (should rebuild editbot from a valid edittop). (Rob)
|
||||
edit_add:
|
||||
edit_add()
|
||||
- removal of redundant call to mvwaddnstr.
|
||||
- de.po:
|
||||
- Revised translations by Florian König.
|
||||
- fi.po:
|
||||
- New Finnish translation, by Pauli Virtanen <pauli.virtanen@saunalahti.fi>.
|
||||
|
||||
nano-0.9.11 - 2000.06.20
|
||||
- New flag "-T" or "--tabsize" to specify how to display tab widths.
|
||||
Affects main() in nano.c, strlenpt(), xpt() and actual_x() (et al) in
|
||||
winio.c, and nano.h. Many hardcoded "8"s have been changed to the
|
||||
TABSIZE int. Added changes to nano.1 and nano.1.html.
|
||||
- id.po:
|
||||
- Indonesian translation by Tedi Heriyanto.
|
||||
- es.po:
|
||||
- Updated translation. (Jordi Mallach)
|
||||
- winio.c
|
||||
- Rewrite of display functions to correct the display problems
|
||||
we had been seeing. Affects: add_marked_sameline, edit_add,
|
||||
and many others. (Rob Siemborski)
|
||||
- totsize fixes. (Rob Siemborski)
|
||||
total_refresh():
|
||||
total_refresh()
|
||||
- Cut display_main_list call, as this function is only supposed to
|
||||
refresh what's already on the screen, not go through the process
|
||||
of adding the text again.
|
||||
@@ -7669,12 +7662,12 @@ nano-0.9.11 - 2000.06.20
|
||||
Changed all calls to editwinrows - 1 in nano.c and move.c.
|
||||
- Removed all functions that were split into other files.
|
||||
Affects LOTS of funcs.
|
||||
do_enter():
|
||||
do_enter()
|
||||
- Added reset of placewewant to end.
|
||||
do_insertfile():
|
||||
do_insertfile()
|
||||
- Fix display problem when using Ctrl-R to load a file
|
||||
into the buffer. (Rob Siemborski)
|
||||
handle_sigwinch():
|
||||
handle_sigwinch()
|
||||
- Added titlebar(), edit_refresh() and display_main_list() calls
|
||||
because a resize wasn't picking up on possible different width
|
||||
correctly.
|
||||
@@ -7689,17 +7682,21 @@ nano-0.9.11 - 2000.06.20
|
||||
- search.c:
|
||||
- Contains all our searching and related functions, (do_search(),
|
||||
findnextstr(), do_replace(), do_gotoline()).
|
||||
- id.po:
|
||||
- New Indonesian translation, by Tedi Heriyanto <tedi_h@gmx.net>.
|
||||
- es.po:
|
||||
- Updated translation. (Jordi Mallach)
|
||||
|
||||
nano-0.9.10 - 2000.06.04
|
||||
- es.po:
|
||||
- Translation updates. (Jordi)
|
||||
- AUTHORS, nano.1.html, TODO, README:
|
||||
- Documentation and email address updates. (Jordi)
|
||||
- nano.c:
|
||||
main():
|
||||
main()
|
||||
- Moved Adam's termio code down to after getopt() and before initscr()
|
||||
to stop people losing their SIGINT character when using args that
|
||||
exit nano before it runs (--version, --help, etc).
|
||||
- es.po:
|
||||
- Translation updates. (Jordi)
|
||||
|
||||
nano-0.9.9 - 2000.05.31
|
||||
- Makefile.am:
|
||||
@@ -7708,8 +7705,6 @@ nano-0.9.9 - 2000.05.31
|
||||
- Spelling fixes. (Jordi Mallach)
|
||||
- Removed CFLAGS changes for gcc, reduces portability according to
|
||||
some, and it certainly doesn't seem to decrease exe size.
|
||||
- es.po:
|
||||
- Spanish translation updates. (Jordi Mallach)
|
||||
- POTFILES.in:
|
||||
- Added global.c file, was screwing up translations (i.e. they
|
||||
weren't getting done).
|
||||
@@ -7747,6 +7742,8 @@ nano-0.9.9 - 2000.05.31
|
||||
- winio.c:
|
||||
total_refresh():
|
||||
- Completely rewrote function, not quite so brain-damaged now.
|
||||
- es.po:
|
||||
- Spanish translation updates. (Jordi Mallach)
|
||||
|
||||
nano-0.9.8 - 2000.05.18
|
||||
- nano.c:
|
||||
@@ -7768,7 +7765,7 @@ nano-0.9.8 - 2000.05.18
|
||||
should now only be called once, at the bottom of the main()
|
||||
loop.
|
||||
- global.c:
|
||||
shortcut_init():
|
||||
shortcut_init():
|
||||
- Removed suspend sc_init call and suspend message because suspend
|
||||
is no longer needed in the shortcut list to work properly.
|
||||
|
||||
@@ -7787,7 +7784,6 @@ nano-0.9.7 - 2000.05.14
|
||||
display update (bug discovered by Ken Tyler).
|
||||
|
||||
nano-0.9.6 - 2000.05.08
|
||||
- New Italian translation (it.po), by Daniele Medri.
|
||||
- nano.c:
|
||||
page_up(), page_down():
|
||||
- Added reset of placewewant to 0, as it should be.
|
||||
@@ -7806,6 +7802,12 @@ nano-0.9.6 - 2000.05.08
|
||||
- Removed yucky code that didn't work, this function now just
|
||||
computes edittop and editbot and calls edit_refresh() to do the
|
||||
rest, which removes a lot of duplicate code...
|
||||
- it.po:
|
||||
- New Italian translation, by Daniele Medri <madrid@linux.it>.
|
||||
- fr.po:
|
||||
- New French translation, by Pierre Tane <tanep@bigfoot.com>.
|
||||
- de.po:
|
||||
- New German translation, by Florian König <floki@bigfoot.com>.
|
||||
|
||||
nano-0.9.5 - 2000.05.01
|
||||
- Removed bytes from file struct because it was computationally wasteful.
|
||||
@@ -7831,25 +7833,23 @@ nano-0.9.5 - 2000.05.01
|
||||
- Removed inefficient call to edit_refresh() after every keystroke.
|
||||
It is now up each function to leave the screen in a good state.
|
||||
- winio.c:
|
||||
do_cursorpos()
|
||||
do_cursorpos():
|
||||
- Rewritten to not use bytes from filestruct by an incremental sum.
|
||||
update_line(), reset_cursor():
|
||||
- Optimized calls to xplustabs() through a single variable.
|
||||
- update_line() now takes a new arg, an index into the string
|
||||
for where to update the line from. Needed for new update
|
||||
code.
|
||||
for where to update the line from. Needed for new update code.
|
||||
- configure.in:
|
||||
- Better checks for slang, allows argument to --with-slang.
|
||||
(Albert Chin-A-Young)
|
||||
- Removed -Iintl from CFLAGS in gcc check.
|
||||
- Makefile.am:
|
||||
- Addition of -Iintl for gettext (Albert Chin-A-Young)
|
||||
- Addition of -Iintl for gettext. (Albert Chin-A-Young)
|
||||
|
||||
nano-0.9.4 - 2000.04.25
|
||||
- Fixed calls to no_help and changed them to the more consistent
|
||||
ISSET(NO_HELP). Fixed return val of no_help to be what it should (2,
|
||||
not 1. Code to temporarily disable NO_HELP when in the
|
||||
help system. (Adam Rogoyski)
|
||||
- Fixed calls to no_help and changed them to the more consistent ISSET(NO_HELP).
|
||||
Fixed return val of no_help to be what it should (2, not 1). Code to
|
||||
temporarily disable NO_HELP when in the help system. (Adam Rogoyski)
|
||||
- cut.c:
|
||||
do_marked_cut(), do_cut(), do_uncut():
|
||||
- Commented out unnecessary bits when NANO_SMALL is being used.
|
||||
@@ -7985,23 +7985,26 @@ nano-0.8.8 - 2000.03.12
|
||||
support i18n.
|
||||
- nano.c:
|
||||
includes: Added sys/param.h and limits.h. (Adam Rogoyski).
|
||||
statics: Changed some things that were not necessarily static
|
||||
(Adam Rogoyski).
|
||||
nrealloc(): New function, similar to nmalloc(). Changed calls from
|
||||
statics: Changed some things that were not necessarily static.
|
||||
(Adam Rogoyski)
|
||||
nrealloc():
|
||||
New function, similar to nmalloc(). Changed calls from
|
||||
realloc() to nrealloc. (Adam Rogoyski)
|
||||
empty_line(), no_spaces(), justify_format(), do_justify():
|
||||
New functions for justify function. (Adam Rogoyski)
|
||||
- winio.c:
|
||||
blank_edit(): Added wrefresh call to edit so that screen updates (like
|
||||
on ^L) actually work.
|
||||
xplustabs(), xpt(), strlenpt(): Fixed off-by-one buglets. (Adam Rogoyski)
|
||||
blank_edit():
|
||||
Added wrefresh call to edit so that screen updates (like on ^L)
|
||||
actually work.
|
||||
xplustabs(), xpt(), strlenpt():
|
||||
Fixed off-by-one buglets. (Adam Rogoyski)
|
||||
|
||||
nano-0.8.7 - 2000.03.01
|
||||
- main.c:
|
||||
do_wrap(): Better fix for segfaults, and fix for lines being wrapped
|
||||
to a single character on one line when no good place to
|
||||
break the line exists, and for wrapping lines longer than
|
||||
COLS.
|
||||
do_wrap():
|
||||
Better fix for segfaults, and fix for lines being wrapped
|
||||
to a single character on one line when no good place to break
|
||||
the line exists, and for wrapping lines longer than COLS.
|
||||
- nano.1.html:
|
||||
Html version of man page, now included in dist. For
|
||||
the benefit of nano packages in Linux distributions.
|
||||
@@ -8024,7 +8027,8 @@ nano-0.8.6 - 2000.02.24
|
||||
|
||||
nano-0.8.5 - 2000.02.18
|
||||
- nano.c:
|
||||
main(): Finally fixed tilde being input on page up/down keys in
|
||||
main():
|
||||
Finally fixed tilde being input on page up/down keys in
|
||||
certain terminal types. Fix was input 26->91->5[34] check
|
||||
for 126, if so make the kbinput PAGE UP/DOWN, else unget
|
||||
the keystroke and continue. Added #include <ioctl.h> for
|
||||
@@ -8038,7 +8042,7 @@ nano-0.8.5 - 2000.02.18
|
||||
edit_refresh() is now unmanageably complex, and must be
|
||||
revamped.
|
||||
check_statblank():
|
||||
Added check for constupdate, makes things less choppy
|
||||
Added check for constupdate, makes things less choppy.
|
||||
(Adam Rogoyski)
|
||||
|
||||
nano-0.8.4 - 2000.02.11
|
||||
@@ -8049,7 +8053,8 @@ nano-0.8.4 - 2000.02.11
|
||||
Removed redundant NANO_CONTROL_H from backspace shortcut,
|
||||
added char 127 which should have been there.
|
||||
- nano.c:
|
||||
main(): Fix for loops looping until MAIN_LEN, added -1 to stop
|
||||
main():
|
||||
Fix for loops looping until MAIN_LEN, added -1 to stop
|
||||
segfaults. (Adam Rogoyski)
|
||||
- Makefile.am: Added all source filenames. (Adam Rogoyski)
|
||||
- nano.1: Fixed mail addressed and added mailing list address.
|
||||
@@ -8057,13 +8062,15 @@ nano-0.8.4 - 2000.02.11
|
||||
|
||||
nano-0.8.3 - 2000.02.08
|
||||
- New Pico mode (-p, --pico), toggles (more) compatibility with the
|
||||
Pico messages displayed in the shortcut list. Note that there are still
|
||||
small differences in this mode.
|
||||
- nano.h: New shortcut struct format, for the benefit of i18n and
|
||||
Pico messages displayed in the shortcut list. Note that there are
|
||||
still small differences in this mode.
|
||||
- nano.h:
|
||||
New shortcut struct format, for the benefit of i18n and
|
||||
our help menu. Removed shortcut message macros, they are
|
||||
now all in shortcut_init in global.c.
|
||||
- nano.c:
|
||||
do_wrap(): Removed resetting of current_x when we are in fact
|
||||
do_wrap():
|
||||
Removed resetting of current_x when we are in fact
|
||||
wrapping to the next line, fixes a bug in -i mode.
|
||||
do_enter():
|
||||
Rewrote the autoindent mode code to be a lot less pretty,
|
||||
@@ -8116,7 +8123,8 @@ nano-0.8.1 - 2000.01.28
|
||||
global variable fill, affects check_wrap(), do_wrap(), main(), usage(),
|
||||
global.c and proto.h.
|
||||
- nano.c:
|
||||
write_file(): Added (incredibly) necessary check for EPERM when
|
||||
write_file():
|
||||
Added (incredibly) necessary check for EPERM when
|
||||
link() fails. This allows us to actually save
|
||||
files via rename() on filesystems that don't
|
||||
support hard links (AIEEEEEE).
|
||||
@@ -8136,7 +8144,7 @@ nano-0.8.0 - 2000.01.25
|
||||
- View flag (-v, --view) implemented. Global variable view_mode, affects
|
||||
main loop of nano.c and new_file(). (Chris)
|
||||
- nano.c:
|
||||
split checks for TERMIOS_H and TERMIO_H up so we
|
||||
Split checks for TERMIOS_H and TERMIO_H up so we
|
||||
can (theoretically) include them both, which is good.
|
||||
handle_sigwinch():
|
||||
Added check for ncurses.h. (Andy Kahn)
|
||||
@@ -8238,7 +8246,7 @@ nano-0.7.7 - 2000.01.19
|
||||
- Added check for keystroke key sequence 407 or NANO_CONTROL_Z
|
||||
in main while loop because suspend mode was broken. This should
|
||||
fix it, at least for now.
|
||||
- Added long option support (By popular harassment ;-) - Added
|
||||
- Added long option support (by popular harassment ;-) : added
|
||||
#include for getopt.h, changed getopt() to getopt_long().
|
||||
Options added so far: --version (-V), --nowrap (-w), --suspend
|
||||
(-z), --help (-h), --nohelp (-x).
|
||||
@@ -8250,16 +8258,15 @@ nano 0.7.6 - 2000.01.15
|
||||
main(): Bound CONTROL_H to backspace (oops).
|
||||
Added more Alt-[-key combinations, for page up & down.
|
||||
read_bytes(): New function. (Adam Rogoyski)
|
||||
read_file(): Optimizations - malloc()s *buf a little at a time rather
|
||||
than one huge buffer, and replaced the strcat at the end
|
||||
with an index variable. Added call to read_bytes().
|
||||
read_file(): Optimizations -- malloc()s *buf a little at a time
|
||||
rather than one huge buffer, and replaced the strcat() at
|
||||
the end with an index variable. Added call to read_bytes().
|
||||
do_next_word(): New function, binding is Ctrl-Space (0). (Chris)
|
||||
|
||||
- winio.c:
|
||||
bottombars(): Fixed non-expanding shortcut keys at bottom of screen.
|
||||
(formula is extra space needed = COLS / 6 - 13).
|
||||
actual_x() & strlenpt():
|
||||
Added bug#9 fix - when tabs % 8 == 0, we should only
|
||||
Added fix for bug #9 -- when tabs % 8 == 0, we should only
|
||||
increment tabs by 1.
|
||||
titlebar(): Fixed overrun in titlebar on very long filenames.
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ GNU nano 2.5.2 - 2016.02.12
|
||||
|
||||
2016-02-09 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/files.c (stat_with_alloc, open_buffer, write_file): Check the
|
||||
result of a stat() to avoid referencing unitialized data. Original
|
||||
result of a stat() to avoid referencing uninitialized data. Original
|
||||
patch was by Kamil Dudka.
|
||||
* doc/man/{nano.1,rnano.1,nanorc.5}: Adjust version for release.
|
||||
|
||||
@@ -661,7 +661,7 @@ GNU nano 2.5.0 - 2015.12.05
|
||||
This addresses Debian bug #805288.
|
||||
|
||||
2015-12-01 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/files.c (do_insertfile): Mark the buffer as mofified only when
|
||||
* src/files.c (do_insertfile): Mark the buffer as modified only when
|
||||
actually something was inserted. This fixes Savannah bug #45409.
|
||||
* src/files.c (do_insertfile): Rename two variables for clarity.
|
||||
* src/text.c (redo_cut): Delete two redundant assignments.
|
||||
@@ -1305,7 +1305,7 @@ GNU nano 2.4.2 - 2015.07.05
|
||||
* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
|
||||
a failure to launch the linter from receiving zero parsable lines;
|
||||
add a new function to glue together the invocation-error string.
|
||||
* src/global.c (shortcut_init): In the Help Viewer and File Browswer,
|
||||
* src/global.c (shortcut_init): In the Help Viewer and File Browser,
|
||||
bind the unbound Home and End keys to goto_top and goto_bottom, to
|
||||
mimic the behaviour of these keys in file viewers and web browsers.
|
||||
Also show ^Y and ^V in the WhereisFile menu instead of M-\ and M-/,
|
||||
@@ -2005,7 +2005,7 @@ GNU nano 2.3.4 - 2014.06.02
|
||||
|
||||
2014-06-02 Chris Allegretta <chrisa@asty.org>
|
||||
* doc/syntax/default.nanorc: Can't do trailing spaces in the
|
||||
default syntax or it will hilight the spaces as you type them
|
||||
default syntax or it will highlight the spaces as you type them
|
||||
into a new file, which for non-programming is infuriating.
|
||||
|
||||
2014-05-29 Mark Majeres <mark@engine12.com>
|
||||
@@ -3448,14 +3448,14 @@ GNU nano 2.1.8 - 2009.02.07
|
||||
2009-01-25 Chris Allegretta <chrisa@asty.org>
|
||||
* files.c (open_file), nanorc.c (parse_include): Don't get_full_path on included
|
||||
rc files, due to it potentially impacting the ability to read files in nano's
|
||||
cwd(). Fixes Savnanah bug #25297 reported by Mike Frysinger.
|
||||
cwd(). Fixes Savannah bug #25297 reported by Mike Frysinger.
|
||||
|
||||
2009-01-24 Chris Allegretta <chrisa@asty.org>
|
||||
* First pass at some caching of caching color info. Right now it's only for
|
||||
* First pass at some caching of color info. Right now it's only for
|
||||
multi-line regexes but this may not be enough to increase performance.
|
||||
* Add interruptability to search functions. New functions enable_nodelay and
|
||||
disable_nodelay and changes to the routines to handle checking for pending
|
||||
searches. Fixes Savnnah bug #24946: Need interrrupt for search.
|
||||
searches. Fixes Savannah bug #24946: Need interrupt for search.
|
||||
|
||||
2009-01-19 Chris Allegretta <chrisa@asty.org>
|
||||
* Change function definitions to shorts instead of (void *)s. New mapping function
|
||||
@@ -3494,7 +3494,7 @@ GNU nano 2.1.6 - 2008.10.03
|
||||
* ocaml.nanorc: Sample OCaml syntax highlighting file.
|
||||
|
||||
2008-09-30 Dave Geering <dgeering@toshiba-tap.com>
|
||||
* objc.nanorc: Sample Objective-C syntax hightlighting file.
|
||||
* objc.nanorc: Sample Objective-C syntax highlighting file.
|
||||
|
||||
2008-09-30 Chris Allegretta <chrisa@asty.org>
|
||||
* configure.ac: Change extra, multibuffer, color and rcfile configure options
|
||||
@@ -3648,7 +3648,7 @@ GNU nano 2.1.1 - 2008.04.01
|
||||
* gentoo.nanorc: Gentoo syntax highlighting config.
|
||||
|
||||
2008-03-17 Benno Schulenberg <bensberg@justemail.net>
|
||||
* global.c: Fix incorrect first line jump messsage, fix
|
||||
* global.c: Fix incorrect first line jump message, fix
|
||||
more comments to assist translators.
|
||||
* winio.c: Fix shortcut labels not being translated.
|
||||
|
||||
|
||||
139
IMPROVEMENTS
139
IMPROVEMENTS
@@ -1,7 +1,54 @@
|
||||
Improvements in GNU nano
|
||||
========================
|
||||
|
||||
Since 9.0:
|
||||
- With M-< and M-> the viewport can be scrolled sideways.
|
||||
- When the cursor nears the edge, all lines are scrolled sideways.
|
||||
- M-Left, M-Right, M-Up, and M-Down have become rebindable.
|
||||
- Immediately stopping a recording retains the existing macro.
|
||||
- Clicking in the scrollbar crudely navigates in the buffer.
|
||||
|
||||
Since 8.0:
|
||||
- To accommodate newcomers, ^F now starts a forward search.
|
||||
- Option --modernbindings makes ^Q quit, ^X cut, ^C copy, ^V paste,
|
||||
^Z undo, ^Y redo, ^O open a file, and ^G find again, among others.
|
||||
- M-Home/M-End put the cursor on the first/last row in the viewport.
|
||||
- With `nano filename:number` the given file will be opened with the
|
||||
cursor on the given line number (when 'set colonparsing' is used).
|
||||
- Option --listsyntaxes lists the names of available syntaxes.
|
||||
- Anchors are saved and restored (when --positionlog is active).
|
||||
- Key combos ^O^Q and ^X^Q cause an exit status of 2.
|
||||
|
||||
Since 7.0:
|
||||
- String binds may contain bindable function names between braces.
|
||||
- Word completion looks for candidates in all open buffers.
|
||||
- Unicode codes can be entered without leading zeroes.
|
||||
|
||||
Since 6.0:
|
||||
- Option --zero hides the interface and uses the whole terminal for editing.
|
||||
- Colors can be given also in #rgb hexadecimal, to select the nearest color
|
||||
from the 6x6x6 color-cube palette available on 256-color terminals.
|
||||
- Fourteen new color names are available, from rosy to crimson.
|
||||
|
||||
Since 5.0:
|
||||
- A search briefly spotlights the found text, in black on yellow by default.
|
||||
- Option --minibar reduces the interface to a bottom bar with basic info.
|
||||
- The cursor skips over combining characters, <Del> deletes them together
|
||||
with the character they combine with, but <Bsp> deletes them separately.
|
||||
- For using libmagic the option --magic or -! or 'set magic' is required.
|
||||
- With --stateflags the state of some things is shown in the title bar.
|
||||
- M-Bsp deletes a word leftward.
|
||||
- With --indicator a "scrollbar" is shown, indicating position+portion.
|
||||
- M-Ins places an anchor, M-PgUp/M-PgDn jump to the nearest anchor.
|
||||
- Toggling help lines (M-X) and Refresh (^L) work nearly everywhere.
|
||||
- Colors can be modified with the attributes "bold," and/or "italic,".
|
||||
- Nine new color names: from pink and purple to orange and latte.
|
||||
|
||||
Since 4.0:
|
||||
- Pasting from outside into nano suppresses auto-indentation.
|
||||
- Such an external paste can be undone with a single M-U.
|
||||
- Shift+Meta+letter key combos can be bound with 'bind Sh-M-letter ...'.
|
||||
- A custom nanorc file may be specified with -f / --rcfile.
|
||||
- What the <Tab> key produces can be specified per syntax with 'tabgives'.
|
||||
- The ability to perform a search at startup with +/string or +?string.
|
||||
- Comment characters are copied when automatic hard-wrapping occurs.
|
||||
@@ -24,7 +71,7 @@ Since 2.9.0:
|
||||
- Option 'set afterends' for making Ctrl+Right stop at word ends.
|
||||
- A crash handler that saves changed buffers in case of a crash.
|
||||
- Addition of the color name "normal", meaning the default color.
|
||||
- A key can be bound to a string -- any mix of text and commands.
|
||||
- A key can be bound to a string -- any mix of text and control codes.
|
||||
- Error messages are shown by default in bright white on red.
|
||||
- <Tab> and <Shift+Tab> can be used to indent/unindent a marked region.
|
||||
- Can snip trailing whitespace while typing, with 'set trimblanks'.
|
||||
@@ -88,25 +135,19 @@ Since 2.3.0:
|
||||
- The option 'positionlog' for saving/restoring the cursor position.
|
||||
- The ability to read and write vim-style lock files.
|
||||
|
||||
Visible changes since 2.0
|
||||
-------------------------
|
||||
* Editor Features
|
||||
- The ability to rebind (reassign) keys using the nanorc.
|
||||
Since 2.0.0:
|
||||
- The ability to rebind keys, via a nanorc file.
|
||||
- The ability to read standard input like a pager ("nano -").
|
||||
- Color syntax highlighting can be set by the first line of a file.
|
||||
- The ability to silence nanorc error messages (-q).
|
||||
- Undo/redo operations (-u).
|
||||
- Undo/redo operations (M-U/M-E, enabled with -u).
|
||||
- Soft wrapping of text (-$).
|
||||
|
||||
* File Handling
|
||||
- Better handling of backup files: if nano can't write a backup file,
|
||||
it won't try to write the original file afterward.
|
||||
- Emergency savefiles retain ownerships and permissions when possible.
|
||||
- Performance improvements in color syntax highlighting.
|
||||
|
||||
Visible changes since 1.2
|
||||
-------------------------
|
||||
* Editor Features
|
||||
Since 1.2.0:
|
||||
- Support for UTF-8.
|
||||
- Moving to a specified line and column of a file, instead of just a
|
||||
line (+LINE,COLUMN).
|
||||
@@ -115,7 +156,7 @@ Visible changes since 1.2
|
||||
- Insertion of spaces instead of a tab when Tab is pressed (-E).
|
||||
- The long option for -K is now --rebindkeypad.
|
||||
- Regular expression searching can now be toggled when nano is built
|
||||
with --enable-tiny, so -R now means something else (see below).
|
||||
with --enable-tiny, so -R now means something else (see next item).
|
||||
- Restricted mode that provides more security than -o (-R).
|
||||
- Blanking of the statusbar after 1 keystroke instead of 25 (-U).
|
||||
- Word searches can optionally skip over punctuation (-W).
|
||||
@@ -123,70 +164,58 @@ Visible changes since 1.2
|
||||
- Many more options are supported in the nanorc.
|
||||
- Improvements to color syntax highlighting support: case insensitive
|
||||
matching, the ability to include color syntaxes in separate files,
|
||||
the ability to specify background colors without foreground colors,
|
||||
etc.
|
||||
the ability to specify background colors without foreground colors...
|
||||
- Insertion of single-byte characters via Esc Esc <000-255>.
|
||||
- Insertion of all characters via "Verbatim Input" mode.
|
||||
- Insertion of any character via Meta-V, "Verbatim Input".
|
||||
- Workaround for the "NumLock glitch".
|
||||
- Meta-W now repeats the last search. Wrapping is now toggled via
|
||||
Meta-L.
|
||||
- Meta-W now repeats the last search. Wrapping is toggled via Meta-L.
|
||||
- Replacing and spell checking only selected text.
|
||||
- Indenting lines with one keystroke.
|
||||
- Copying text into the cutbuffer without cutting it.
|
||||
- Scrolling the text up and down single lines without moving the
|
||||
cursor.
|
||||
- Scrolling the text up and down single lines without moving the cursor.
|
||||
- PageUp and PageDown work more smoothly when using -S.
|
||||
- Scrolling the help text up and down single lines.
|
||||
- Cutting all text from the current position to the end of the file
|
||||
with one keystroke.
|
||||
- Justifying the entire file with one keystroke.
|
||||
with one keystroke (Meta-T).
|
||||
- Justifying the entire file with one keystroke (Meta-J).
|
||||
- Justifying without removing spaces from the ends of lines.
|
||||
- Unjustifying after justifying and immediately resizing.
|
||||
- Going to the first or last line of the current paragraph.
|
||||
- Going to the first or last line of the file without having to go to
|
||||
the "Search" prompt.
|
||||
- Searching for filenames in the file browser.
|
||||
- Displaying spaces and tabs differently to make it easier to tell
|
||||
them apart.
|
||||
- Many more functions available at the statusbar prompt: moving to the
|
||||
next or previous word, searching for matching brackets, "Verbatim
|
||||
Input" mode, etc.
|
||||
- The glibc 2.2.3 crashes involving extended regular expressions are
|
||||
no longer worked around, as they can break anything using extended
|
||||
regular expressions, and glibc 2.2.3 is old. You should upgrade to
|
||||
at least glibc 2.2.4.
|
||||
|
||||
* File Handling
|
||||
- Spaces and tabs are shown differently to make it easier to tell them apart.
|
||||
- Many more functions are available at the prompt: moving to the next or
|
||||
previous word, searching for matching brackets, "Verbatim Input"...
|
||||
- "To Line" (^W^T) and "Read from Command" (^R^X) return to their parent
|
||||
menu when their keystroke is entered again (^W^T^T and ^R^X^X).
|
||||
- Automatic adding of newlines to the ends of files without them can
|
||||
now be disabled (-L).
|
||||
- Converting from and to DOS/Mac file format is now toggled only at
|
||||
the "Write File" prompt, via Meta-D and Meta-M, and the default file
|
||||
format to save in is now set depending on what format the file was
|
||||
originally in. -D now makes nano use bold text instead of reverse
|
||||
video text, and Meta-D at the edit window now does a
|
||||
word/line/character count. -O now makes the unused second line of
|
||||
the screen part of the edit window, and Meta-O at the edit window
|
||||
now toggles this behavior.
|
||||
- Converting from and to DOS/Mac file format is now toggled only at the
|
||||
"Write File" prompt, via Meta-D and Meta-M, and the default file format
|
||||
to save in is now set depending on what format the file was originally
|
||||
in. -D now makes nano use bold text instead of reverse video text,
|
||||
and Meta-D at the edit window now does a word/line/character count.
|
||||
-O now makes the unused second line of the screen part of the edit
|
||||
window, and Meta-O now toggles this behavior while editing.
|
||||
- Converting files that contain a mix of DOS and Mac format lines.
|
||||
- Automatic switching on of -N with binary files has been removed, as
|
||||
it causes problems with UTF-8 support.
|
||||
|
||||
Visible changes since 1.0
|
||||
-------------------------
|
||||
* Editor Features
|
||||
- Complete Pico compatibility (--pico has been removed, and -p means
|
||||
something else, see below).
|
||||
- nanorc support (see nanorc.sample included in sources).
|
||||
Since 1.0
|
||||
- Complete Pico compatibility (option --pico has been removed,
|
||||
and -p now means something else, see below).
|
||||
- Support for nanorc files.
|
||||
- Smooth scrolling (-S).
|
||||
- Support for searching for matching braces, brackets, etc.
|
||||
- Jumping to the matching brace, bracket, etc.
|
||||
- Help for all editor features.
|
||||
- Color syntax highlighting support.
|
||||
- Quote string support, useful for mail agents, etc. (-Q).
|
||||
- Insertion of output of external commands.
|
||||
- Optional enabling of XON and XOFF control characters (-p).
|
||||
- Tons of bugfixes/enhancements for already existing features.
|
||||
|
||||
* File Handling
|
||||
- Option -o (--operatingdir) implements a chroot of sorts.
|
||||
- Mouse support (-m) also allows clicking on shortcuts.
|
||||
- Option -r allows a negative argument.
|
||||
- Overwriting and appending or prepending to files.
|
||||
- Writing marked text to separate files.
|
||||
- Multiple file buffers (-F).
|
||||
@@ -195,4 +224,12 @@ Visible changes since 1.0
|
||||
- Creation of backup files (-B).
|
||||
- Search/replace history (-H).
|
||||
|
||||
See the nano manual for detailed information on each feature.
|
||||
Available in 1.0:
|
||||
- Spell checking (^T).
|
||||
- Justification (^J) and unjustification (^U).
|
||||
- Internationalization (more translations are welcome).
|
||||
- Help texts (^G).
|
||||
- Resizing in X.
|
||||
- On PageUp/Down, the cursor is put on the first screen line (like Pico).
|
||||
- Tab completion at the prompt (for filenames and ~user).
|
||||
- Cut-to-end-of-line option (-k).
|
||||
|
||||
@@ -6,7 +6,12 @@ if USE_COLOR
|
||||
SUBDIRS += syntax
|
||||
endif
|
||||
|
||||
EXTRA_DIST = ChangeLog.1999-2006 ChangeLog.2007-2015 \
|
||||
IMPROVEMENTS README.GIT nano.spec
|
||||
EXTRA_DIST = IMPROVEMENTS
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
showinfo:
|
||||
@ echo
|
||||
@ echo " The global nanorc file is: @sysconfdir@/nanorc"
|
||||
@ echo " Syntaxes get installed in: @PKGDATADIR@/"
|
||||
@ echo
|
||||
|
||||
749
NEWS
749
NEWS
@@ -1,3 +1,356 @@
|
||||
2026.07.31 - GNU nano 9.2 "Alquézar"
|
||||
• Nano refuses to start when standard output is not a terminal.
|
||||
• Options --newbuffer and 'set newbuffer' were added as better
|
||||
synonyms of --multibuffer and 'set multibuffer'.
|
||||
• Legacy keystroke pairs ^W^T and ^/^T are recognized again.
|
||||
|
||||
2026.06.23 - GNU nano 9.1 "met een hongerig paard aan ons been"
|
||||
• When searching, the viewport is placed snug left where possible.
|
||||
• The ability to read and write files in old Mac format was removed
|
||||
(that is: files that use a lone carriage return as line ending).
|
||||
• The ^T toggle between WhereIs and GotoLine has been dropped.
|
||||
• When --backup is active, in some situations no backup was made,
|
||||
or it had a wrong timestamp. Both issues are fixed now.
|
||||
• When nano crashes or is killed, any .save file is not chmodded
|
||||
to the permissions of the base file, nor chowned to its owner.
|
||||
• M-Ins and M-Del have become rebindable.
|
||||
|
||||
2026.04.08 - GNU nano 9.0 "Le bonheur est dans le pré"
|
||||
• When the cursor almost goes offscreen to the right, all lines are
|
||||
now scrolled sideways together, by just the amount needed to keep
|
||||
the cursor in view. Use --solosidescroll or 'set solosidescroll'
|
||||
to get back the old, jerky, single-line horizontal scrolling.
|
||||
• The viewport can be scrolled sideways (in steps of one tabsize)
|
||||
with M-< and M->. See `man nanorc` if M-< and M-> should switch
|
||||
between buffers (as they did earlier).
|
||||
• M-Left, M-Right, M-Up, and M-Down have become rebindable.
|
||||
• Stopping the recording of a macro immediately after starting it
|
||||
cancels the recording and leaves an existing macro in place.
|
||||
• Feature toggles no longer break a chain of ^K cuts or M-6 copies,
|
||||
except the M-K cut-from-cursor toggle.
|
||||
• With --mouse and --indicator, one can click in the scrollbar area
|
||||
to roughly navigate within the buffer.
|
||||
|
||||
|
||||
2026.02.04 - GNU nano 8.7.1 "Tende Samnug"
|
||||
• A build failure when compiling against glibc-2.43 is fixed.
|
||||
|
||||
2025.11.12 - GNU nano 8.7 "Blue Highways"
|
||||
• At the Execute prompt, preceding the command with two pipe symbols
|
||||
allows implementing a copy-to-clipboard feature in your nanorc (on
|
||||
terminals that support OSC 52). See the doc/sample.nanorc file.
|
||||
|
||||
2025.08.21 - GNU nano 8.6 "reason alone was a defective compass"
|
||||
• The GotoLine menu accepts the prefixes ++ and -- for jumping
|
||||
a number of lines forward or backward.
|
||||
• Anchors are not forgotten when a line number is given on the
|
||||
command line.
|
||||
|
||||
2025.06.12 - GNU nano 8.5 "Sigourney"
|
||||
• Anchors are now saved when a file is closed, and restored when
|
||||
the file is reopened -- if and when --positionlog is active.
|
||||
• Nano exits with an error status upon keystrokes ^O^Q and ^X^Q.
|
||||
• Keystroke ^L just centers the cursor, while M-% cycles it.
|
||||
• Option --whitespace is accepted, but left undocumented.
|
||||
• Syntax coloring now works correctly in more locales.
|
||||
|
||||
2025.04.02 - GNU nano 8.4 "Five Miles Out"
|
||||
• Bracketed pastes over a slow connection are more reliable.
|
||||
• Tabs in an external paste at a prompt are not dropped.
|
||||
• Feedback occurs when the cursor sits on a Byte Order Mark.
|
||||
• The Execute prompt is more forgiving of a typo.
|
||||
|
||||
2024.12.21 - GNU nano 8.3 "like mice in the dream of a tabby cat"
|
||||
• A build failure with gcc-15 is fixed.
|
||||
• Several translations were updated.
|
||||
|
||||
2024.09.05 - GNU nano 8.2 "Charlotte will climb walls!"
|
||||
• At a Yes-No prompt, beside Y and the localized initial for "Yes",
|
||||
also ^Y is accepted. Similarly, ^N for "No", and ^A for "All".
|
||||
• A text-highlighting bug with Alt+Home/Alt+End is fixed.
|
||||
|
||||
2024.07.12 - GNU nano 8.1 "de dag van de bitterkoekjespudding"
|
||||
• The idiom `nano filename:linenumber` is understood only when the
|
||||
option --colonparsing (or 'set colonparsing') is used.
|
||||
• Modern bindings are *not* activated when nano's invocation name
|
||||
starts with "e", as it jars with Debian's alternatives system.
|
||||
• New bindable function 'cycle' first centers the current row,
|
||||
then moves it to the top of the viewport, then to the bottom.
|
||||
It is bound by default to ^L.
|
||||
• Option --listsyntaxes/-z lists the names of available syntaxes.
|
||||
|
||||
2024.05.01 - GNU nano 8.0 "Grus grus"
|
||||
• By default ^F is bound to starting a forward search, and ^B to
|
||||
starting a backward search, while M-F and M-B repeat the search
|
||||
in the corresponding direction. (See the documentation if you
|
||||
want the old bindings back.)
|
||||
• Command-line option --modernbindings (-/) makes ^Q quit, ^X cut,
|
||||
^C copy, ^V paste, ^Z undo, ^Y redo, ^O open a file, ^W write a
|
||||
file, ^R replace, ^G find again, ^D find again backwards, ^A set
|
||||
the mark, ^T jump to a line, ^P show the position, and ^E execute.
|
||||
• Above modern bindings are activated also when the name of nano's
|
||||
executable (or a symlink to it) starts with the letter "e".
|
||||
• To open a file at a certain line number, one can now use also
|
||||
`nano filename:number`, besides `nano +number filename`.
|
||||
• <Alt+Home> and <Alt+End> put the cursor on the first and last
|
||||
row in the viewport, while retaining the horizontal position.
|
||||
• When the three digits in an #RGB color code are all the same,
|
||||
the code is mapped to the xterm grey scale, giving access to
|
||||
fourteen levels of grey instead of just four.
|
||||
• For easier access, M-" is bound to placing/removing an anchor,
|
||||
and M-' to jumping to the next anchor.
|
||||
• Whenever an error occurs, the keystroke buffer is cleared, thus
|
||||
stopping the execution of a macro or a string bind.
|
||||
• The mousewheel scrolls the viewport instead of moving the cursor.
|
||||
|
||||
|
||||
2023.01.18 - GNU nano 7.2 "Boer doe mij 't hekke lös!"
|
||||
• <Shift+Insert> is prevented from pasting in view mode.
|
||||
|
||||
2022.12.14 - GNU nano 7.1 "And the devices shall be made of wood"
|
||||
• When --autoindent and --breaklonglines are combined, pressing
|
||||
<Enter> at a specific position no longer eats characters.
|
||||
|
||||
2022.11.15 - GNU nano 7.0 "Una existencia simple bajo el sol"
|
||||
• String binds may contain bindable function names between braces.
|
||||
For example, to move the current line down to after the next one:
|
||||
bind ^D "{cut}{down}{paste}{up}" main. Of course, braced function
|
||||
names may be mixed with literal text. If an existing string bind
|
||||
contains a literal {, replace it with {{}.
|
||||
• Unicode codes can be entered (via M-V) without leading zeroes,
|
||||
by finishing short codes with <Space> or <Enter>.
|
||||
• Word completion (^]) looks for candidates in all open buffers.
|
||||
• No regular expression matches the final empty line any more.
|
||||
|
||||
|
||||
2022.08.02 - GNU nano 6.4 "Regentag Dunkelbunt Hundertwasser"
|
||||
• The file browser does not crash when moving up to the root folder.
|
||||
• Softwrapping very long lines is done more efficiently.
|
||||
• Invoking the formatter does not blink the screen.
|
||||
|
||||
2022.04.28 - GNU nano 6.3 "Wat zullen we drinken? Wat een dorst!"
|
||||
• For multiline regexes, text is now colored as soon as a start match
|
||||
is found, also when there is no end match at all.
|
||||
• The colorizing of any line is stopped after two thousand bytes,
|
||||
to avoid frustrating delays.
|
||||
• When environment variable NO_COLOR is set, the two default colors
|
||||
(yellow for the spotlight, red for error messages) are suppressed
|
||||
when no interface colors are specified in a nanorc file.
|
||||
• Full justification and piping the whole buffer through a command
|
||||
now keep the cursor at the same line number.
|
||||
• Utility 'xsel' can be used to copy a marked region to the system's
|
||||
clipboard. See doc/sample.nanorc for an example.
|
||||
|
||||
2022.02.18 - GNU nano 6.2 "Kamperfoelie"
|
||||
• The file browser clears the prompt bar also when using --minibar.
|
||||
• Linting now works also with a newer 'pyflakes'.
|
||||
|
||||
2022.02.09 - GNU nano 6.1 "Rețelele de socializare sunt ca un frigider"
|
||||
• The behavior of ^K at a prompt has been enhanced: when there is some
|
||||
text after the cursor, just this text is erased. In the most common
|
||||
situation, when the cursor is at the end of the answer, the behavior
|
||||
is as before: the whole answer is erased.
|
||||
• At a prompt, M-6 copies the current answer into the cutbuffer.
|
||||
• Large external pastes into nano are handled more quickly.
|
||||
|
||||
2021.12.15 - GNU nano 6.0 "Humor heeft ook zijn leuke kanten"
|
||||
• Option --zero hides the title bar, status bar and help lines, and
|
||||
uses all rows of the terminal as editing area. The title bar and
|
||||
status bar can be toggled with M-Z.
|
||||
• Colors can now be specified also as three-digit hexadecimal numbers,
|
||||
in the format #rgb. This picks from the 216 index colors (that most
|
||||
terminals know) the color that is nearest to the given values.
|
||||
• For users who dislike numbers, there are fourteen new color names:
|
||||
rosy, beet, plum, sea, sky, slate, teal, sage, brown, ocher, sand,
|
||||
tawny, brick, and crimson.
|
||||
• Suspension is enabled by default, invokable with ^T^Z. The options
|
||||
-z, --suspendable, and 'set suspendable' are obsolete and ignored.
|
||||
(In case you want to be able to suspend nano with a single keystroke,
|
||||
you can put 'bind ^Z suspend main' in your nanorc.)
|
||||
• When automatic hard-wrapping is in effect, pasting just a few words
|
||||
(without a line break) will now hard-wrap the line when needed.
|
||||
• Toggling Append or Prepend clears the current filename.
|
||||
• The word count as shown by M-D is now affected by option --wordbounds;
|
||||
with it, nano counts words as 'wc' does; without it (the new default),
|
||||
words are counted in a more human way: seeing punctuation as space.
|
||||
• The YAML syntax file is now actually included in the tarball.
|
||||
|
||||
|
||||
2021.10.06 - GNU nano 5.9 "El manicomio ha decidido: mañana sol!"
|
||||
• The extension of a filename is added to the name of a corresponding
|
||||
temporary file, so that spell checking a C file, for example, will
|
||||
check only the comments and strings (when using 'aspell').
|
||||
• The process number is added to the name of an emergency save file,
|
||||
so that when multiple nanos die they will not fight over a filename.
|
||||
• Undoing a cutting operation will restore an anchor that was located
|
||||
in the cut area to its original line.
|
||||
• When using --locking, saving a new buffer will create a lock file.
|
||||
• Syntax highlighting for YAML files has been added.
|
||||
|
||||
2021.06.15 - GNU nano 5.8 "Why is it necessary to be special?"
|
||||
• After a search, the spotlighting is dropped after 1.5 seconds (0.8
|
||||
seconds with --quick) to avoid the idea that the text is selected.
|
||||
• A + and a space before a filename on the command line will put the
|
||||
cursor at the end of the corresponding buffer.
|
||||
• Linter messages no longer include filename and line/column numbers.
|
||||
• Color name "grey" or "gray" can be used instead of "lightblack".
|
||||
• The color of the minibar can be chosen with 'set minicolor'.
|
||||
|
||||
2021.04.29 - GNU nano 5.7 "Toți ceilalți arau câmpurile"
|
||||
• The output of --constantshow (without --minibar) is more stable.
|
||||
• When opening multiple buffers and there is an error message, this
|
||||
message is shown again upon first switch to the relevant buffer.
|
||||
• The position and size of the indicator now follow actual lines,
|
||||
instead of visual lines when in softwrap mode, meaning that the
|
||||
size of the indicator can change when scrolling in softwrap mode.
|
||||
|
||||
2021.03.03 - GNU nano 5.6.1 "Geelgors"
|
||||
• Search matches are properly colorized in softwrap mode too.
|
||||
• Option 'highlightcolor' has been renamed to 'spotlightcolor'.
|
||||
|
||||
2021.02.24 - GNU nano 5.6 "Wielewaal"
|
||||
• A search match gets highlighted (in black on yellow by default),
|
||||
in addition to placing the cursor at the start of the match.
|
||||
The color combination can be changed with 'set highlightcolor'.
|
||||
By default the cursor is hidden until the next keystroke, but
|
||||
it can be forced on with --showcursor / 'set showcursor'.
|
||||
• Option --markmatch / 'set markmatch' has been removed.
|
||||
• Cursor position and character code are displayed in the minibar
|
||||
only when option --constantshow / 'set constantshow' is used,
|
||||
and their display can be toggled with M-C.
|
||||
• The state flags are displayed in the minibar only when option
|
||||
--stateflags / 'set stateflags' is used.
|
||||
|
||||
2021.01.14 - GNU nano 5.5 "Rebecca"
|
||||
• Option 'set minibar' makes nano suppress the title bar and instead
|
||||
show a bar with basic editing information at the bottom: file name
|
||||
(plus an asterisk when the buffer is modified), the cursor position
|
||||
(line,column), the character under the cursor (U+xxxx), the flags
|
||||
that --stateflags normally shows, plus the percentage of the buffer
|
||||
that is above the cursor.
|
||||
• With 'set promptcolor' the color combination of the prompt bar can
|
||||
be changed, to allow contrasting it with the mini bar (which always
|
||||
has the same color as the title bar).
|
||||
• Option 'set markmatch' highlights the result of a successful search
|
||||
by putting the mark at the end of the match, making the match more
|
||||
visible. It also suppresses the cursor until the next keystroke.
|
||||
(If you dislike the hiding of the cursor, use 'set showcursor'.)
|
||||
• The bindable toggle 'nowrap' has been renamed to 'breaklonglines',
|
||||
to match the corresponding option, like for all other toggles.
|
||||
• Support for Slang has been removed.
|
||||
|
||||
2020.12.02 - GNU nano 5.4 "Terre des hommes"
|
||||
• Moving the cursor now skips over combining characters (and other
|
||||
zero-width characters). Deleting a character deletes also any
|
||||
succeeding zero-width characters, but backspacing deletes just
|
||||
one character at a time.
|
||||
• Workarounds for older ncurses and older libvtes were removed.
|
||||
|
||||
2020.10.07 - GNU nano 5.3 "Revolution!"
|
||||
• Option 'set stateflags' makes nano show the state of auto-indenting,
|
||||
the mark, hard-wrapping, macro recording, and soft-wrapping in the
|
||||
title bar. The flags take the place of "Modified", and a modified
|
||||
buffer is instead indicated by an asterisk (*) after its name.
|
||||
• Nano no longer by default tries using libmagic to determine the type
|
||||
of a file (when neither filename nor first line gave a clue), because
|
||||
in most cases it is a waste of time. It requires using the option
|
||||
--magic or -! or 'set magic' to make nano try libmagic.
|
||||
• The color of the indicator can be changed with 'set scrollercolor'.
|
||||
|
||||
2020.08.24 - GNU nano 5.2 "Ranrapalca"
|
||||
• Making certain replacements after a large paste does not crash.
|
||||
• Hitting a toggle at the Search prompt does not clear the answer.
|
||||
• Using --positionlog does not complain at the first start.
|
||||
• A macro containing a Search command will not sometimes fail.
|
||||
|
||||
2020.08.12 - GNU nano 5.1 "Cantabria"
|
||||
• M-Bsp (Alt+Backspace) deletes a word backwards, like in Bash.
|
||||
• M-[ has become bindable. (Be careful, though: as it is the
|
||||
starting combination of many escape sequences, avoid gluing
|
||||
it together with other keystrokes, like in a macro.)
|
||||
• With --indicator and --softwrap, the first keystroke in an
|
||||
empty buffer does not crash.
|
||||
• Invoking the formatter while text is marked does not crash.
|
||||
• In UTF-8 locales, an anchor is shown as a diamond.
|
||||
|
||||
2020.07.29 - GNU nano 5.0 "Among the fields of barley"
|
||||
• With --indicator (or -q or 'set indicator') nano will show a kind
|
||||
of scrollbar on the righthand side of the screen to indicate where
|
||||
in the buffer the viewport is located and how much it covers.
|
||||
• With <Alt+Insert> any line can be "tagged" with an anchor, and
|
||||
<Alt+PageUp> and <Alt+PageDown> will jump to the nearest anchor.
|
||||
When using line numbers, an anchor is shown as "+" in the margin.
|
||||
• The Execute Command prompt is now directly accessible from the
|
||||
main menu (with ^T, replacing the Spell Checker). The Linter,
|
||||
Formatter, Spell Checker, Full Justification, Suspension, and
|
||||
Cut-Till-End functions are available in this menu too.
|
||||
• On terminals that support at least 256 colors, nine new color
|
||||
names are available: pink, purple, mauve, lagoon, mint, lime,
|
||||
peach, orange, and latte. These do not have lighter versions.
|
||||
• For the color names red, green, blue, yellow, cyan, magenta,
|
||||
white, and black, the prefix 'light' gives a brighter color.
|
||||
Prefix 'bright' is deprecated, as it means both bold AND light.
|
||||
• All color names can be preceded with "bold," and/or "italic,"
|
||||
(in that order) to get a bold and/or italic typeface.
|
||||
• With --bookstyle (or -O or 'set bookstyle') nano considers any
|
||||
line that begins with whitespace as the start of a paragraph.
|
||||
• Refreshing the screen with ^L now works in every menu.
|
||||
• In the main menu, ^L also centers the line with the cursor.
|
||||
• Toggling the help lines with M-X now works in all menus except
|
||||
in the help viewer and the linter.
|
||||
• At a filename prompt, the first <Tab> lists the possibilities,
|
||||
and these are listed near the bottom instead of near the top.
|
||||
• Bindable function 'curpos' has been renamed to 'location'.
|
||||
• Long option --tempfile has been renamed to --saveonexit.
|
||||
• Short option -S is now a synonym of --softwrap.
|
||||
• The New Buffer toggle (M-F) has become non-persistent. Options
|
||||
--multibuffer and 'set multibuffer' still make it default to on.
|
||||
• Backup files will retain their group ownership (when possible).
|
||||
• Data is synced to disk before "... lines written" is shown.
|
||||
• The raw escape sequences for F13 to F16 are no longer recognized.
|
||||
• Distro-specific syntaxes, and syntaxes of less common languages,
|
||||
have been moved down to subdirectory syntax/extra/. The affected
|
||||
distros and others may wish to move wanted syntaxes one level up.
|
||||
• Syntaxes for Markdown, Haskell, and Ada were added.
|
||||
|
||||
|
||||
2020.05.23 - GNU nano 4.9.3 "Almendras"
|
||||
• One more bug introduced in version 4.9 is fixed: a crash when
|
||||
the terminal screen is resized while at a lock-file prompt.
|
||||
|
||||
2020.04.07 - GNU nano 4.9.2 "Mali Lošinj"
|
||||
• Another bug introduced in version 4.9 is fixed: a likely crash
|
||||
after undoing an <Enter> at the end of leading whitespace.
|
||||
|
||||
2020.03.31 - GNU nano 4.9.1 "Sapperdeflap"
|
||||
• Two bugs introduced in version 4.9 are fixed: the cursor
|
||||
getting misplaced when undoing line cuts, and filtering
|
||||
of the whole buffer to a new buffer not working.
|
||||
|
||||
2020.03.24 - GNU nano 4.9 "die fetten Jahre sind vorbei"
|
||||
• When justifying a selection, the new paragraph and the
|
||||
succeeding one get the appropriate first-line indent.
|
||||
• Trying to justify an empty selection does not crash.
|
||||
• Redoing the insertion of an empty file does not crash.
|
||||
• On the BSDs and macOS, ^H has become rebindable again
|
||||
(in most terminal emulators, not on the console).
|
||||
• DOS line endings in nanorc files are accepted.
|
||||
• Option --suspend / 'set suspend' has been renamed to
|
||||
the more logical --suspendable / 'set suspendable'.
|
||||
|
||||
2020.02.07 - GNU nano 4.8 "Jaška"
|
||||
• When something is pasted into nano, auto-indentation is suppressed,
|
||||
and the paste can be undone as a whole with a single M-U.
|
||||
• When a lock file is encountered during startup, pressing ^C/Cancel
|
||||
quits nano. (Pressing 'No' just skips the file and continues.)
|
||||
• Shift+Meta+letter key combos can be bound with 'bind Sh-M-letter'.
|
||||
Making any such binding dismisses the default behavior of ignoring
|
||||
Shift for all Meta+letter keystrokes.
|
||||
• The configuration option --with-slang (to be avoided when possible)
|
||||
can now be used only together with --enable-tiny.
|
||||
• A custom nanorc file can be specified on the command line, with
|
||||
-f filename or --rcfile=filename.
|
||||
|
||||
2019.12.23 - GNU nano 4.7 "Havikskruid"
|
||||
• A <Tab> will indent a marked region only when mark and cursor are
|
||||
on different lines.
|
||||
@@ -12,7 +365,7 @@
|
||||
It allows running a syntax-specific command on the contents of
|
||||
the buffer.
|
||||
• ^T will try to run 'hunspell' before 'spell', because it checks
|
||||
spellling for the locale's language and understands UTF-8.
|
||||
spelling for the locale's language and understands UTF-8.
|
||||
• Multiple errors or warnings on startup will no longer slow nano
|
||||
down but will be indicated on the status bar with trailing dots.
|
||||
|
||||
@@ -31,6 +384,7 @@
|
||||
|
||||
2019.06.18 - GNU nano 4.3 "Musa Kart"
|
||||
• The ability to read from and write to a FIFO has been regained.
|
||||
• Opening a file no longer triggers an inotify CLOSE_WRITE event.
|
||||
• Startup time is reduced by fully parsing a syntax only when needed.
|
||||
• Asking for help (^G) when using --operatingdir does not crash.
|
||||
• The reading of a huge or slow file can be stopped with ^C.
|
||||
@@ -435,7 +789,7 @@
|
||||
|
||||
2016.02.12 - GNU nano 2.5.2 is carrying too many dogs. This release
|
||||
includes several fixes for various memory leaks, position-
|
||||
history size growth, and a long standing issue with using
|
||||
history size growth, and a long-standing issue with using
|
||||
nano under sudo creating root-owned files. There are also
|
||||
the usual bevy of documentation and other miscellaneous
|
||||
fixes and touchups. Upgrade today while supplies last,
|
||||
@@ -553,22 +907,22 @@
|
||||
the undo implementation and the default syntax config are
|
||||
also included. As always, Share and Enjoy!
|
||||
|
||||
2014.05.28 - GNU nano 2.3.3 is in its right place. This release contains
|
||||
many many improvements to the core system, including
|
||||
substantial improvements to the undo/redo code, UTF-8
|
||||
handling, the configure script, and display of shortcuts
|
||||
on very wide terminals. New features include the
|
||||
ability to write to named pipes (--noread), as well as
|
||||
linter support (see the nanorc man page for details). Also
|
||||
included are much improved syntax highlighting code, and
|
||||
configurations for JSON, texinfo, Go, and a default syntax
|
||||
for catch-all highlighting. Finally, nano now has the
|
||||
ability to set the color of the title bar, status bar, and
|
||||
shortcut keys (e.g. "^X") and their descriptions. Again
|
||||
see the nanorc page for details. There's much more, too
|
||||
much to include here, but please keep those reports and
|
||||
general feedback coming! Thank you for helping us help
|
||||
you help us all.
|
||||
2014.05.28 - GNU nano 2.3.3 is in its right place. This release
|
||||
contains many many improvements to the core system,
|
||||
including substantial improvements to the undo/redo code,
|
||||
UTF-8 handling, the configure script, and display of
|
||||
shortcuts on very wide terminals. New features include
|
||||
the ability to write to named pipes (--noread), as well
|
||||
as linter support (see the nanorc man page for details).
|
||||
Also included are much improved syntax highlighting code,
|
||||
and configurations for JSON, texinfo, Go, and a default
|
||||
syntax for catch-all highlighting. Finally, nano now has
|
||||
the ability to set the color of the title bar, status bar,
|
||||
and shortcut keys (e.g. "^X") and their descriptions.
|
||||
Again see the nanorc page for details. There's much more,
|
||||
too much to include here, but please keep those reports
|
||||
and general feedback coming! Thank you for helping us
|
||||
help you help us all.
|
||||
|
||||
2013.03.22 - GNU nano 2.3.2 "Annoy your coworkers for fun and profit" is
|
||||
released. This release introduces vim-style file locking
|
||||
@@ -639,26 +993,23 @@
|
||||
fixes for that version are still forthcoming.
|
||||
|
||||
2010.02.11 - GNU nano 2.2.3 "fumbling toward stability" is released.
|
||||
This release contains a fix for only one bug, but a
|
||||
rather irritating one: when paging up/down with smooth
|
||||
scrolling, the cursor position was not being preserved
|
||||
due to a bug in 2.2.2. With such a targeted fix
|
||||
like this what could POSSIBLY go WRONG? Hahaha.
|
||||
Enjoy and if you find new bugs, as always please
|
||||
use Savannah's bug tracker.
|
||||
This release contains a fix for only one bug, but a rather
|
||||
irritating one: when paging up/down with smooth scrolling,
|
||||
the cursor position was not being preserved due to a bug
|
||||
in 2.2.2. With such a targeted fix like this what could
|
||||
POSSIBLY go WRONG? Hahaha. Enjoy, and if you find new
|
||||
bugs, as always please use Savannah's bug tracker:
|
||||
https://savannah.gnu.org/bugs/?func=additem&group=nano
|
||||
|
||||
2010.01.17 - GNU nano 2.2.2 is released for you, you, you. This
|
||||
release includes fixes for: crashes when writing
|
||||
backup files in certain conditions, improper
|
||||
screen centering when moving up/down in various
|
||||
combination of smooth scrolling and soft wrapping modes,
|
||||
a search crash on the armel arch, and issues with
|
||||
lots of keybinding customizations causing crashing
|
||||
particularly on FreeBSD. Also included are better
|
||||
help menu entries for forward/back in the file browser,
|
||||
some man page tweaks and one assert fix. As always,
|
||||
share and enjoy!
|
||||
2010.01.17 - GNU nano 2.2.2 is released for you, you, you. This release
|
||||
includes fixes for: crashes when writing backup files in
|
||||
certain conditions, improper screen centering when moving
|
||||
up/down in various combinations of smooth scrolling and soft
|
||||
wrapping modes, a search crash on the armel arch, and issues
|
||||
with lots of keybinding customizations causing crashing
|
||||
particularly on FreeBSD. Also included are better help menu
|
||||
entries for forward/back in the file browser, some man page
|
||||
tweaks and one assert fix. As always, share and enjoy!
|
||||
|
||||
2009.12.12 - GNU nano 2.2.1 "DLR strikes back" is open for business.
|
||||
This release fixes many bugs, including: missing
|
||||
@@ -677,28 +1028,27 @@
|
||||
|
||||
2009.11.30 - GNU nano 2.2.0 "Doc Brown" is released! The culmination
|
||||
of almost two years of development and hot on the heels
|
||||
of nano's 10th birthday is available for all your
|
||||
editing needs! Bugs fixed since the last release
|
||||
include several fixes for tiny mode (involving both
|
||||
the help keys and replace menu text), more 'final'
|
||||
fixes for soft wrapping, and several typo and documentation
|
||||
updates including nanorc tweaks and a new syntax
|
||||
highlighting file for makefiles. Also included is a long
|
||||
standing fix for random crashing when using nanorc on
|
||||
FreeBSD, and nano will no longer clear the screen on
|
||||
suspend to maintain compatibility with other *nix editors.
|
||||
For those who haven't been playing along at home, please
|
||||
see the official web page for the summary of new
|
||||
features since 2.0. Special thanks to all who have
|
||||
submitted bug reports recently in support of our new
|
||||
stable release, and apologies for all those bugs we
|
||||
didn't yet find :-) Peace to all.
|
||||
of nano's 10th birthday is available for all your editing
|
||||
needs! Bugs fixed since the last release include several
|
||||
fixes for tiny mode (involving both the help keys and
|
||||
replace menu text), more 'final' fixes for soft wrapping,
|
||||
and several typo and documentation updates including nanorc
|
||||
tweaks and a new syntax highlighting file for makefiles.
|
||||
Also included is a long-standing fix for random crashing
|
||||
when using nanorc on FreeBSD, and nano will no longer clear
|
||||
the screen on suspend to maintain compatibility with other
|
||||
*nix editors. For those who haven't been playing along at
|
||||
home, please see the official web page for the summary of
|
||||
new features since 2.0. Special thanks to all who have
|
||||
submitted bug reports recently in support of our new stable
|
||||
release, and apologies for all those bugs we didn't yet
|
||||
find :-) Peace to all.
|
||||
|
||||
|
||||
2009.11.21 - GNU nano 2.1.99pre2 is available for a special pre-Black
|
||||
Friday discount. Included are some (hopefully final)
|
||||
fixes for issues with last page display caused by the
|
||||
soft wrapping code, and a fix for a long standing issue
|
||||
soft wrapping code, and a fix for a long-standing issue
|
||||
with hitting the Home key when going through the search
|
||||
history. On the features front, nano will now attempt to
|
||||
retain the proper ownership and permissions when trying
|
||||
@@ -708,13 +1058,13 @@
|
||||
the command line will now override any related .nanorc
|
||||
entries. Speak now or forever hold your bugs!
|
||||
|
||||
2009.11.15 - GNU nano 2.1.99pre1 "take a bow" is out there, man, it's
|
||||
out there all right. This release contains mainly
|
||||
2009.11.15 - GNU nano 2.1.99pre1 "take a bow" is out there, man,
|
||||
it's out there all right. This release contains mainly
|
||||
bugfixes, underscoring that we are preparing for the
|
||||
next stable series release. Included are many fixes
|
||||
for the new soft wrapping code, compiler warning tweaks,
|
||||
and the modification time warning no longer triggers
|
||||
when saving a file as a new name. Also include are
|
||||
when saving a file with a new name. Also included are
|
||||
some fixes for various nanorc options, and there are
|
||||
surely more bugs to find before we call the code base
|
||||
stable, so please keep those reports coming!
|
||||
@@ -826,31 +1176,31 @@
|
||||
and not saving the search history when compiled with
|
||||
configure options.
|
||||
|
||||
2008.04.24 - GNU nano 2.1.2 "New York City" is released. This release
|
||||
contains fixes for binding bad keys, some
|
||||
configure-specific compilation failures, and more issues
|
||||
with the new input back end and in particular the status
|
||||
bar. Also fixed are some long standing issues with
|
||||
compiling on AIX, and a segfault when making the terminal
|
||||
window too small. Rest in Peace Tim and George!
|
||||
2008.06.24 - GNU nano 2.1.2 "New York City" is released. This
|
||||
release contains fixes for binding bad keys, some
|
||||
configure-specific compilation failures, and more
|
||||
issues with the new input back end and in particular
|
||||
the status bar. Also fixed are some long-standing
|
||||
issues with compiling on AIX, and a segfault when
|
||||
making the terminal window too small. Rest in Peace
|
||||
Tim and George!
|
||||
|
||||
2008.04.01 - GNU nano 2.1.1 won't get fooled again. This release contains
|
||||
fixes for the new user-rebindable keys (in particular
|
||||
bracket match which was mis-bound), and various
|
||||
problems with translations and configure-related
|
||||
compilation problems are now fixed as well.
|
||||
It also contains new syntax highlighting
|
||||
definitions for TCL, PHP, Gentoo and Debian-related
|
||||
files, and some documentation updates as well.
|
||||
Please continue to send reports with the key
|
||||
binding code to the Savannah page
|
||||
(https://savannah.gnu.org/bugs/?group=nano).
|
||||
2008.04.01 - GNU nano 2.1.1 won't get fooled again. This release
|
||||
contains fixes for the new user-rebindable keys (in
|
||||
particular bracket match which was mis-bound), and
|
||||
various problems with translations and configure-
|
||||
related compilation problems are now fixed as well.
|
||||
It also contains new syntax highlighting definitions
|
||||
for Tcl, PHP, Gentoo and Debian-related files, and
|
||||
some documentation updates as well. Please continue to
|
||||
send reports with the key binding code to the Savannah
|
||||
page (https://savannah.gnu.org/bugs/?group=nano).
|
||||
|
||||
2008.03.18 - GNU nano 2.1.0 "under old mismanagement" is released.
|
||||
This first release in the 2.1 development series
|
||||
introduces rebindable keys for most actions inside
|
||||
the editor. Please see the nanorc(5) page for
|
||||
more information on configuring key bindings. Please
|
||||
the editor. Please see the nanorc(5) page for more
|
||||
information on configuring key bindings. Please
|
||||
also report all keybinding bugs (crashes, missing
|
||||
menu functions) using the Savannah bug tracker URL,
|
||||
https://savannah.gnu.org/bugs/?group=nano and
|
||||
@@ -1011,7 +1361,7 @@
|
||||
|
||||
2005.12.23 - GNU nano 1.3.10 rises to the surface. This release
|
||||
contains several new features as well as fixes for
|
||||
several longstanding bugs. The former include the
|
||||
several long-standing bugs. The former include the
|
||||
ability to scroll up or down single lines without
|
||||
scrolling the cursor, reworked bracket searching code
|
||||
that doesn't require regular expression support,
|
||||
@@ -1048,9 +1398,9 @@
|
||||
Have fun with it.
|
||||
|
||||
2005.06.30 - GNU nano 1.3.8 floats at its own level. This release
|
||||
contains several new features. Among other things, you
|
||||
can now move to a specified column number as well as
|
||||
line number within a file, file backups saved in a
|
||||
contains several new features. Among other things,
|
||||
you can now move to a specified column number as well
|
||||
as line number within a file, file backups saved in a
|
||||
backup directory will have unique names, the search and
|
||||
replace history routines should work more consistently,
|
||||
you can get a word count by pressing Meta-D at the edit
|
||||
@@ -1061,8 +1411,8 @@
|
||||
screen updates, UTF-8 display, and flow control; a fix
|
||||
for a segfault when displaying some lines ending with
|
||||
tabs; better handling of constant cursor position
|
||||
display; improved color parsing in the rcfile; and
|
||||
support for the "Regexp" toggle in tiny mode
|
||||
display; improved color parsing in the rcfile;
|
||||
and support for the "Regexp" toggle in tiny mode
|
||||
(-R/--regexp is gone, and --restricted's short option
|
||||
has been changed to -R), among other things. Enjoy.
|
||||
|
||||
@@ -1233,38 +1583,37 @@
|
||||
and enjoy GNU nano 1.2.0.
|
||||
|
||||
|
||||
2003.02.13 - GNU nano 1.1.99pre3 "The last testing version, no
|
||||
really!" is released. This release includes fixes for
|
||||
wrapping (again), resizing, color syntax highlighting,
|
||||
rcfile parsing, the mouse code, more memory leaks, and
|
||||
some reversion of the code to get the user's home
|
||||
directory (nano will now again rely on $HOME). There
|
||||
are also translation updates, a new manual page for the
|
||||
nanorc file, and an UPGRADE file detailing the changes
|
||||
since version 1.0. Please submit reports for any bugs
|
||||
you might find to the development team
|
||||
(nano-devel@gnu.org), and enjoy nano almost-1.2.0 ;-)
|
||||
2003.02.13 - GNU nano 1.1.99pre3 "The last testing version, no really!"
|
||||
is released. This release includes fixes for wrapping
|
||||
(again), resizing, color syntax highlighting, rcfile
|
||||
parsing, the mouse code, more memory leaks, and some
|
||||
reversion of the code to get the user's home directory
|
||||
(nano will now again rely on $HOME). There are also
|
||||
translation updates, a new manual page for the nanorc
|
||||
file, and an UPGRADE file detailing the changes since
|
||||
version 1.0. Please submit reports for any bugs you
|
||||
might find to the development team (nano-devel@gnu.org),
|
||||
and enjoy nano almost-1.2.0 ;-)
|
||||
|
||||
2003.02.03 - GNU nano 1.1.99pre2 "bugs in my pockets, bugs in my
|
||||
shoes" is released. There are, not surprisingly, only
|
||||
bugfixes in this release as we move toward the stable
|
||||
1.2.0 release. Fixes are included for translatable
|
||||
string format, subexpression replacement, constant
|
||||
cursor position, invalid search regexes, justify, screen
|
||||
state on SIGHUP and SIGTERM, cutting to end cuts with
|
||||
long lines, many file browser and operating directory
|
||||
bugs, memory and file descriptor leaks, marker code,
|
||||
spell checker, the mouse code with long lines, multiple
|
||||
buffers and non-file open errors, replacement string
|
||||
length, and a silly but serious history message crash.
|
||||
There is also a drastic improvement in CPU utilization
|
||||
for the color regex code.
|
||||
Depending on the number of bugs found in this
|
||||
release, there may be a 1.1.99pre3 or RC1, or just a
|
||||
1.2.0 release. Most of the major bugs seem to have been
|
||||
worked out, so if you are waiting for a good time to
|
||||
test nano before the official 1.2.0 release, this would
|
||||
be the one to use. Happy bug hunting!
|
||||
2003.02.03 - GNU nano 1.1.99pre2 "bugs in my pockets, bugs in my shoes"
|
||||
is released. There are, not surprisingly, only bugfixes
|
||||
in this release as we move toward the stable 1.2.0
|
||||
release. Fixes are included for translatable string
|
||||
format, subexpression replacement, constant cursor
|
||||
position, invalid search regexes, justify, screen state on
|
||||
SIGHUP and SIGTERM, cutting to end cuts with long lines,
|
||||
many file browser and operating directory bugs, memory and
|
||||
file descriptor leaks, marker code, spell checker, the
|
||||
mouse code with long lines, multiple buffers and non-file
|
||||
open errors, replacement string length, and a silly but
|
||||
serious history message crash. There is also a drastic
|
||||
improvement in CPU utilization for the color regex code.
|
||||
Depending on the number of bugs found in this release,
|
||||
there may be a 1.1.99pre3 or RC1, or just a 1.2.0 release.
|
||||
Most of the major bugs seem to have been worked out, so if
|
||||
you are waiting for a good time to test nano before the
|
||||
official 1.2.0 release, this would be the one to use.
|
||||
Happy bug hunting!
|
||||
|
||||
2003.01.17 - GNU nano 1.1.99pre1 "enough already" has been released.
|
||||
This release is, barring bug fixes and documentation
|
||||
@@ -1325,19 +1674,19 @@
|
||||
word and next word, nanorc parser and line wrapping
|
||||
code. Have fun!
|
||||
|
||||
2002.07.25 - At long last! GNU nano 1.1.10 "What didn't we break?" is
|
||||
released. This version of GNU nano features version
|
||||
2002.07.25 - At long last! GNU nano 1.1.10 "What didn't we break?"
|
||||
is released. This version of GNU nano features version
|
||||
0.11.2 of gettext, building with automake 1.6, some new
|
||||
code for displaying control characters, browser
|
||||
improvements, a new backup file option (-B, --backup), a
|
||||
new option to ignore rc files (-I, --ignorercfiles),
|
||||
improvements, a new backup file option (-B, --backup),
|
||||
a new option to ignore rc files (-I, --ignorercfiles),
|
||||
compatibility with -pedantic, handling null characters
|
||||
before EOF, a slightly sportier nanorc.sample and more.
|
||||
Fixes are included for justification,
|
||||
the reading and writing file routines, resizing and fill
|
||||
length, millions of memory leaks, the usage screen was
|
||||
updated, and the --quotestr and --regexp really work
|
||||
now ;-) Enjoy :)
|
||||
Fixes are included for justification, the reading
|
||||
and writing file routines, resizing and fill length,
|
||||
millions of memory leaks, the usage screen was updated,
|
||||
and the --quotestr and --regexp really work now ;-)
|
||||
Enjoy :)
|
||||
|
||||
2002.05.12 - GNU nano 1.1.9 is released, happy Mother's Day! This
|
||||
release includes many new features, including a prepend
|
||||
@@ -1345,7 +1694,7 @@
|
||||
allow multiple syntax highlighting types, and a new -Y,
|
||||
--syntax flag to set a specific one if there's no
|
||||
filename regex to match it against (i.e. w/mutt). The
|
||||
^space and M-space keys will now show up in the help
|
||||
^Space and M-Space keys will now show up in the help
|
||||
menu, which itself has been tweaked a bit, and many more
|
||||
configure options should now cooperate (like the odd
|
||||
pairing of --enable-tiny and --enable-multibuffer). The
|
||||
@@ -1538,9 +1887,9 @@
|
||||
some compatibility issues with older ncurses libraries
|
||||
have also been fixed. All in all, a lot to see.
|
||||
|
||||
2001.01.31 - Nano 0.9.99pre2 is released. Not surprisingly, all that is
|
||||
new is bugfixes, bugfixes, bugfixes. There were a few
|
||||
cleanups in unneeded global variables and duplicate
|
||||
2001.01.31 - Nano 0.9.99pre2 is released. Not surprisingly, all that
|
||||
is new is bugfixes, bugfixes, bugfixes. There were a
|
||||
few cleanups in unneeded global variables and duplicate
|
||||
functions, but most is just fixing. Specifically, there
|
||||
is now a preliminary (read: needs testing) fix for
|
||||
resizing the editor in any mode other than normal edit
|
||||
@@ -1584,9 +1933,9 @@
|
||||
main reason for this release is the less-than-optimal
|
||||
fix for the security issue in nano with following
|
||||
symbolic links. Hopefully this will fix the problem
|
||||
permanently. The --nofollow option also works again for
|
||||
those who are real security nuts. There are also some
|
||||
display and search fixes, and the --disable-spell
|
||||
permanently. The --nofollow option also works again
|
||||
for those who are real security nuts. There are also
|
||||
some display and search fixes, and the --disable-spell
|
||||
function was renamed to --disable-speller to be in line
|
||||
with nano and Pico's "speller" term.
|
||||
|
||||
@@ -1607,27 +1956,26 @@
|
||||
|
||||
2000.11.23 - Happy Thanksgiving! Nano 0.9.21 is our "last version was
|
||||
a big turkey" release. It fixes several bugs introduced
|
||||
by the previous version, as well as a few long- standing
|
||||
by the previous version, as well as a few long-standing
|
||||
display bugs. All 0.9.20 users are strongly encouraged
|
||||
to upgrade to this release.
|
||||
|
||||
2000.11.18 - Nano 0.9.20 is finally out the door. Probably the biggest
|
||||
change is the brand new way nano displays previous
|
||||
search and replace strings (they are now editable!)
|
||||
This is a break from Pico's (inconsistent) interface, so
|
||||
if you don't like the new way, "Pico" mode (-p on the
|
||||
command line or Meta-P within nano) still works the
|
||||
"old" way.
|
||||
change is the brand new way nano displays previous search
|
||||
and replace strings (they are now editable!) This is a
|
||||
break from Pico's (inconsistent) interface, so if you
|
||||
don't like the new way, "Pico" mode (-p on the command
|
||||
line or Meta-P within nano) still works the "old" way.
|
||||
Other new features include being able to deal with
|
||||
search strings of any length, a new internal spell
|
||||
feature (courtesy of Mr. Rocco Corsi) and tab completion
|
||||
when reading in or writing out files! There's also the
|
||||
usual billion or so bug fixes. Feedback on this release
|
||||
is welcome because so much has changed, especially with
|
||||
the previous string display in search and replace.
|
||||
Email -> nano@nano-editor.org <-. If you like
|
||||
something, don't like something, or just want to order a
|
||||
pizza, let us know!
|
||||
search strings of any length, a new internal spell feature
|
||||
(courtesy of Mr. Rocco Corsi) and tab completion when
|
||||
reading in or writing out files! There's also the usual
|
||||
billion or so bug fixes. Feedback on this release is
|
||||
welcome because so much has changed, especially with the
|
||||
previous string display in search and replace. Email
|
||||
-> nano@nano-editor.org <-. If you like something,
|
||||
don't like something, or just want to order a pizza,
|
||||
let us know!
|
||||
|
||||
2000.10.02 - Nano 0.9.19 is the "Chris is getting married in less than
|
||||
a week and needs a distraction" release. There are only
|
||||
@@ -1710,12 +2058,11 @@
|
||||
(id).
|
||||
|
||||
2000.06.06 - Nano 0.9.10 is primarily a bugfix for the loss of SIGINT
|
||||
when using "run and terminate" flags (for example,
|
||||
--help). There are also some minor documentation
|
||||
updates. This version of nano is the most stable in
|
||||
quite some time, and is likely to be the most stable for
|
||||
awhile. Users are encouraged to upgrade to this
|
||||
version.
|
||||
when using "run and terminate" flags (for example, --help).
|
||||
There are also some minor documentation updates. This
|
||||
version of nano is the most stable in quite some time,
|
||||
and is likely to be the most stable for awhile. Users
|
||||
are encouraged to upgrade to this version.
|
||||
|
||||
2000.05.31 - Nano 0.9.9 introduces much better working i18n support,
|
||||
more portability, and a ton of bugfixes. While nano is
|
||||
@@ -1730,10 +2077,10 @@
|
||||
are also the obligatory display fixes and speedups.
|
||||
Have fun with it.
|
||||
|
||||
2000.05.14 - Nano 0.9.7 (the Mother's Day release) continues in the long
|
||||
line of display fixes, and also fixes the broken symlink
|
||||
behavior (i.e. symlinks weren't being followed by
|
||||
default). Hopefully all major bugs can be worked out
|
||||
2000.05.14 - Nano 0.9.7 (the Mother's Day release) continues in the
|
||||
long line of display fixes, and also fixes the broken
|
||||
symlink behavior (i.e. symlinks weren't being followed
|
||||
by default). Hopefully all major bugs can be worked out
|
||||
soon and we can have a 1.0 release before the end of the
|
||||
year, but who knows.
|
||||
|
||||
@@ -1744,15 +2091,14 @@
|
||||
most stable versions of nano to date, but this one may
|
||||
not be too bad =-)
|
||||
|
||||
2000.05.01 - Nano 0.9.5 attempts to speed up the display of text
|
||||
to be at least somewhat reasonable. Much code profiling
|
||||
has been done to reduce the ridiculous number of
|
||||
redundant display updates. This will probably expose a
|
||||
lot of bugs that can then be fixed, so this release is
|
||||
probably not for the faint of heart. For anyone
|
||||
curious, I would call nano 0.9.2 the most stable version
|
||||
recently, so use that if you're not particularly
|
||||
concerned with being on the bleeding edge.
|
||||
2000.05.01 - Nano 0.9.5 attempts to speed up the display of text to be
|
||||
at least somewhat reasonable. Much code profiling has been
|
||||
done to reduce the ridiculous number of redundant display
|
||||
updates. This will probably expose a lot of bugs that can
|
||||
then be fixed, so this release is probably not for the faint
|
||||
of heart. For anyone curious, I would call nano 0.9.2 the
|
||||
most stable version recently, so use that if you're not
|
||||
particularly concerned with being on the bleeding edge.
|
||||
|
||||
2000.04.25 - Nano 0.9.4 fixes some problems in 0.9.3 with the last
|
||||
line code and related segfaults. It now also has much
|
||||
@@ -1830,19 +2176,19 @@
|
||||
it is yours to take care of and keep up to date.
|
||||
|
||||
2000.03.01 - Well, to continue my trend of going back on my previous
|
||||
release's comments, nano 0.8.7 is released. The
|
||||
crashing behavior was still occurring, and this most
|
||||
recent fix also fixes some other wrapping problems, so
|
||||
here you go. There may be another release soon, there
|
||||
may not be, is that vague enough? =)
|
||||
release's comments, nano 0.8.7 is released. The crashing
|
||||
behavior was still occurring, and this most recent fix
|
||||
also fixes some other wrapping problems, so here you go.
|
||||
There may be another release soon, there may not be, is
|
||||
that vague enough? =)
|
||||
|
||||
2000.02.25 - More minor bugfixes in 0.8.6, the bizarre behavior at the
|
||||
end of a page has ceased, thankfully. I'm also moving
|
||||
next weekend, so don't be shocked if you don't see a new
|
||||
version of nano next week =-)
|
||||
|
||||
2000.02.11 - Okay, here we go again. Aside from a few minor fixes and
|
||||
some under-the-hood changes, you won't notice much
|
||||
2000.02.11 - Okay, here we go again. Aside from a few minor fixes
|
||||
and some under-the-hood changes, you won't notice much
|
||||
different in this version of nano. I haven't gotten
|
||||
much feedback on the help feature, is it simply amazing
|
||||
or does no one care? Write and let me know! =)
|
||||
@@ -1857,23 +2203,22 @@
|
||||
address nano@asty.org for bugs, etc.
|
||||
|
||||
2000.02.02 - Okay, I hate to go back on what I said in the last release,
|
||||
but I may be changing jobs very soon. I will release
|
||||
version 0.8.2 as is (no i18n, no help menu (yet)). I
|
||||
expect things to settle down by the end of next week,
|
||||
and then I can try to start on the i18n support and help
|
||||
menu; look for these new features in version 0.8.5 to
|
||||
0.9.0.
|
||||
but I may be changing jobs very soon. I will release version
|
||||
0.8.2 as is (no i18n, no help menu (yet)). I expect things
|
||||
to settle down by the end of next week, and then I can try to
|
||||
start on the i18n support and help menu; look for these new
|
||||
features in version 0.8.5 to 0.9.0.
|
||||
|
||||
2000.01.28 - Nano 0.8.1 marks our first official step toward
|
||||
internationalization (i18n) and the help system (^G). I
|
||||
will be merging in Jordi's patches for initial i18n in
|
||||
the next version, and will implement the help system
|
||||
internationalization (i18n) and the help system (^G).
|
||||
I will be merging in Jordi's patches for initial i18n
|
||||
in the next version, and will implement the help system
|
||||
with i18n built into it shortly after that. Please
|
||||
don't hesitate to send bug reports, as long as you're
|
||||
sure the fault lies with nano =-).
|
||||
|
||||
2000.01.25 - Nano 0.8.0 is officially the 'let's try and be at least a
|
||||
little portable, mmmmkay?' release. There are many
|
||||
2000.01.25 - Nano 0.8.0 is officially the "let's try and be at least
|
||||
a little portable, mmmmkay?" release. There are many
|
||||
portability checks and fixes; many thanks to Andy Kahn
|
||||
for his patches. I removed the broken do_spell behavior
|
||||
with the 'spell' program; for now, we only try to call
|
||||
@@ -1883,31 +2228,29 @@
|
||||
2000.01.24 - Nano 0.7.9 features many new features. Among them are a
|
||||
new autoindent feature (-i, --autoindent), tempfile flag
|
||||
like Pico's -t flag (-t, --tempfile), and preliminary
|
||||
spelling program support. The spelling function tries
|
||||
to run 'spell' and then 'ispell' in that order, but you
|
||||
can specify another spelling program with -s or
|
||||
--speller.
|
||||
spelling program support. The spelling function tries to
|
||||
run 'spell' and then 'ispell' in that order, but you can
|
||||
specify another spelling program with -s or --speller.
|
||||
|
||||
2000.01.17 - Nano 0.7.7 is officially the 'way too much stuff changed this
|
||||
release' release. It's the busy time at work for me, so
|
||||
please don't get offended if your patch doesn't get
|
||||
included in the next immediate version of nano. I'm
|
||||
sure all the changes in this release will cause a few
|
||||
bugs, so 0.7.8 will primarily be about fixing those
|
||||
bugs.
|
||||
2000.01.17 - Nano 0.7.7 is officially the "way too much stuff changed
|
||||
this release" release. It's the busy time at work for me,
|
||||
so please don't get offended if your patch doesn't get
|
||||
included in the next immediate version of nano. I'm sure
|
||||
all the changes in this release will cause a few bugs, so
|
||||
0.7.8 will primarily be about fixing those bugs.
|
||||
|
||||
Things added this release include resizability (kinda),
|
||||
new -x and -c flags (see nano -h for help), long command
|
||||
line flag support, and the usual array of bugfixes.
|
||||
|
||||
2000.01.15 - Nano 0.7.6 is officially the 'lightning' release. It now
|
||||
loads large files much faster than previous versions,
|
||||
and is even much faster than Pico or vi in some rather
|
||||
rudimentary tests. Many thanks to Adam Rogoyski for the
|
||||
read_byte patch!
|
||||
2000.01.15 - Nano 0.7.6 is officially the "lightning" release.
|
||||
It now loads large files much faster than previous
|
||||
versions, and is even much faster than Pico or vi
|
||||
in some rather rudimentary tests. Many thanks to
|
||||
Adam Rogoyski for the read_byte patch!
|
||||
|
||||
2000.01.09 - As of this version (0.7.4), TIP has officially been renamed
|
||||
to nano. The new homepage is at
|
||||
http://faculty.plattsburgh.edu/astyanax/nano. Please
|
||||
update your bookmarks, tell your friends, and all that
|
||||
jazz.
|
||||
2000.01.09 - As of this version (0.7.4), TIP has officially
|
||||
been renamed to nano. The new homepage is at
|
||||
http://faculty.plattsburgh.edu/astyanax/nano.
|
||||
Please update your bookmarks, tell your friends,
|
||||
and all that jazz.
|
||||
|
||||
103
README
103
README
@@ -1,10 +1,42 @@
|
||||
|
||||
GNU nano -- a simple editor, inspired by Pico
|
||||
|
||||
Overview
|
||||
Purpose
|
||||
|
||||
The nano project was started because of a few "problems" with the
|
||||
wonderfully easy-to-use and friendly Pico text editor.
|
||||
Nano is a small and simple text editor for use on the terminal.
|
||||
It copied the interface and key bindings of the Pico editor but
|
||||
added several missing features: undo/redo, syntax highlighting,
|
||||
line numbers, softwrapping, multiple buffers, selecting text by
|
||||
holding Shift, search-and-replace with regular expressions, and
|
||||
several other conveniences.
|
||||
|
||||
Appearance
|
||||
|
||||
In rough ASCII graphics, this is what nano's screen looks like:
|
||||
|
||||
____________________________________________________________________
|
||||
| GNU nano 9.2 filename Modified |
|
||||
--------------------------------------------------------------------
|
||||
| This is the text window, displaying the contents of a 'buffer', |
|
||||
| the contents of the file you are editing. |
|
||||
| |
|
||||
| The top row of the screen is the 'title bar'; it shows nano's |
|
||||
| version, the name of the file, and whether you modified it. |
|
||||
| The two bottom rows display the most important shortcuts; in |
|
||||
| those lines ^ means Ctrl. The third row from the bottom shows |
|
||||
| some feedback message, or gets replaced with a prompt bar when |
|
||||
| you tell nano to do something that requires extra input. |
|
||||
| |
|
||||
--------------------------------------------------------------------
|
||||
| [ Some status message ] |
|
||||
|^G Help ^O Write Out ^F Where Is ^K Cut ^T Execute |
|
||||
|^X Exit ^R Read File ^\ Replace ^U Paste ^J Justify |
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Origin
|
||||
|
||||
The nano project was started in 1999 because of a few "problems"
|
||||
with the wonderfully easy-to-use and friendly Pico text editor.
|
||||
|
||||
First and foremost was its license: the Pine suite does not use
|
||||
the GPL, and (before using the Apache License) it had unclear
|
||||
@@ -20,12 +52,25 @@ Overview
|
||||
Nowadays, nano wants to be a generally useful editor with sensible
|
||||
defaults (linewise scrolling, no automatic line breaking).
|
||||
|
||||
The nano editor is an official GNU package. For more information on
|
||||
GNU and the Free Software Foundation, please see https://www.gnu.org/.
|
||||
The nano editor is an official GNU package. For more information
|
||||
on GNU and the Free Software Foundation, see https://www.gnu.org/.
|
||||
|
||||
License
|
||||
|
||||
Nano's code and documentation are covered by the GPL version 3 or
|
||||
(at your option) any later version, except for two functions that
|
||||
were copied from busybox which are under a BSD license. Nano's
|
||||
documentation is additionally covered by the GNU Free Documentation
|
||||
License version 1.2 or (at your option) any later version. See the
|
||||
files COPYING and COPYING.DOC for the full text of these licenses.
|
||||
|
||||
When in any file of this package a copyright notice mentions a
|
||||
year range (such as 1999-2011), it is a shorthand for a list of
|
||||
all the years in that interval.
|
||||
|
||||
How to compile and install nano
|
||||
|
||||
Download the latest nano source tarball, then:
|
||||
Download the latest nano source tarball, and then:
|
||||
|
||||
tar -xvf nano-x.y.tar.gz
|
||||
cd nano-x.y
|
||||
@@ -33,12 +78,15 @@ How to compile and install nano
|
||||
make
|
||||
make install
|
||||
|
||||
It's that simple. Use --prefix with configure to override the
|
||||
default installation directory of /usr/local.
|
||||
You will need the header files of ncurses installed for ./configure
|
||||
to succeed -- get them from libncurses-dev (Debian) or ncurses-devel
|
||||
(Fedora) or a similarly named package. Use --prefix with ./configure
|
||||
to override the default installation directory of /usr/local. And
|
||||
use --sysconfdir=/etc when you want your self-compiled nano to read
|
||||
the /etc/nanorc file.
|
||||
|
||||
If you haven't configured with the --disable-nanorc option, after
|
||||
installation you may want to copy the doc/sample.nanorc file to
|
||||
your home directory, rename it to ".nanorc", and then edit it
|
||||
After installation you may want to copy the doc/sample.nanorc file
|
||||
to your home directory, rename it to ".nanorc", and then edit it
|
||||
according to your taste.
|
||||
|
||||
Web Page
|
||||
@@ -49,31 +97,28 @@ Mailing Lists
|
||||
|
||||
There are three nano-related mailing-lists.
|
||||
|
||||
+ info-nano@gnu.org is a very low traffic list used to announce
|
||||
* <info-nano@gnu.org> is a very low traffic list used to announce
|
||||
new nano versions or other important info about the project.
|
||||
+ help-nano@gnu.org is for those seeking to get help without
|
||||
|
||||
* <help-nano@gnu.org> is for those seeking to get help without
|
||||
wanting to hear about the technical details of its development.
|
||||
+ nano-devel@gnu.org is the list used by the people that make nano
|
||||
|
||||
* <nano-devel@gnu.org> is the list used by the people that make nano
|
||||
and a general development discussion list, with moderate traffic.
|
||||
|
||||
To subscribe, send email to <name>-request@gnu.org with a subject
|
||||
of "subscribe", where <name> is the list you want to subscribe to.
|
||||
|
||||
The archives of the development and help mailing lists are here:
|
||||
|
||||
https://lists.gnu.org/archive/html/nano-devel/
|
||||
https://lists.gnu.org/archive/html/help-nano/
|
||||
|
||||
Bug Reports
|
||||
|
||||
To report a bug, please file a description of the problem on nano's
|
||||
bug tracker (https://savannah.gnu.org/bugs/?group=nano -- hover on
|
||||
"Bugs", then click "Submit new"). The issue may have already been
|
||||
reported, so please look first.
|
||||
If you find a bug, please file a detailed description of the problem
|
||||
on nano's issue tracker: https://savannah.gnu.org/bugs/?group=nano
|
||||
(you will need an account to be able to do so), or send an email
|
||||
to the nano-devel list (no need to subscribe, but mention it if
|
||||
you want to be CC'ed on an answer).
|
||||
|
||||
Current Status
|
||||
|
||||
Since version 2.5.0, GNU nano has abandoned the distinction between
|
||||
a stable and a development branch: it is now on a "rolling" release
|
||||
-- fixing bugs and adding new features go hand in hand.
|
||||
|
||||
Copyright Years
|
||||
|
||||
When in any file of this package a copyright notice mentions a
|
||||
year range (such as 1999-2011), it is a shorthand for a list of
|
||||
all the years in that interval.
|
||||
|
||||
@@ -8,35 +8,34 @@ building this needs a bit more care than the official tarballs.
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
To successfully compile GNU nano from git, you'll need the following
|
||||
packages:
|
||||
To successfully compile GNU nano from git, you'll need the following:
|
||||
|
||||
- autoconf (version >= 2.69)
|
||||
- automake (version >= 1.14)
|
||||
- autopoint (version >= 0.18.3)
|
||||
- gcc (version >= 5.0)
|
||||
- gettext (version >= 0.18.3)
|
||||
- git (version >= 2.7.4)
|
||||
- groff (version >= 1.12)
|
||||
- make (any version)
|
||||
- pkg-config (version >= 0.22)
|
||||
- texinfo (version >= 4.0)
|
||||
autoconf (version >= 2.69)
|
||||
automake (version >= 1.14)
|
||||
autopoint (version >= 0.20)
|
||||
gcc (version >= 5.0)
|
||||
gettext (version >= 0.20)
|
||||
git (version >= 2.7.4)
|
||||
groff (version >= 1.12)
|
||||
make (any version)
|
||||
pkg-config (version >= 0.22)
|
||||
texinfo (version >= 4.0)
|
||||
|
||||
If you want UTF-8 support, you will also need libncursesw5-dev installed
|
||||
(version >= 5.7), or libslang2-dev (version >= 2.0) if you use --with-slang.
|
||||
You will also need to have the header files for ncurses installed,
|
||||
from libncurses-dev on Debian, ncurses-devel on Fedora, or similar.
|
||||
|
||||
These should all be available in your distro's package manager or software
|
||||
center, or otherwise on any GNU mirror.
|
||||
These should all be available in your distro's package manager or
|
||||
software center, or otherwise on any GNU mirror.
|
||||
|
||||
|
||||
Download the source
|
||||
-------------------
|
||||
Clone the source
|
||||
----------------
|
||||
|
||||
To obtain the current nano development branch (called 'master'), use the
|
||||
following command. It will create in your current working directory a
|
||||
subdirectory called 'nano' containing a copy of all of the files:
|
||||
|
||||
$ git clone git://git.savannah.gnu.org/nano.git nano
|
||||
$ git clone git://git.git.savannah.gnu.org/nano.git
|
||||
|
||||
|
||||
Generate the configure script
|
||||
@@ -58,6 +57,9 @@ directory:
|
||||
|
||||
$ ./configure [--add-options-here]
|
||||
|
||||
Use --sysconfdir=/etc when you want your self-compiled nano to read
|
||||
/etc/nanorc instead of /usr/local/etc/nanorc.
|
||||
|
||||
|
||||
Build and install
|
||||
-----------------
|
||||
@@ -114,3 +116,11 @@ to include 'set tabsize 4', or you could use -T4 on the command line.
|
||||
To make git display things as intended, you can do:
|
||||
|
||||
$ git config --local core.pager "less -x1,5"
|
||||
|
||||
To see all types that are used in nano's source code colorized as types,
|
||||
you can add these lines to your ~/.nanorc:
|
||||
|
||||
extendsyntax c color green "\<struct (dirent|option|passwd)\>"
|
||||
extendsyntax c color green "\<struct (sigaction|stat|termios)\>"
|
||||
extendsyntax c color green "\<struct (timespec|vt_stat|winsize)\>"
|
||||
extendsyntax c color green "\<([[:lower:]_]+(struct|type)|va_list)\>"
|
||||
9
THANKS
9
THANKS
@@ -5,9 +5,11 @@ If we missed you here, let us know!
|
||||
Translations:
|
||||
============
|
||||
Pedro Albuquerque <palbuquerque73@gmail.com> Portuguese
|
||||
Zayed Al-Saidi <zayed.alsaidi@gmail.com> Arabic
|
||||
Josef Andersson <josef.andersson@fripost.org> Swedish
|
||||
Laurentiu Buzdugan <buzdugan@voyager.net> Romanian
|
||||
Mario Blättermann <mario.blaettermann@gmail.com> German
|
||||
Besnik Bleta <besnik@programeshqip.org> Albanian
|
||||
Laurențiu Buzdugan <buzdugan@voyager.net> Romanian
|
||||
Ricardo Cárdenes Medina <ricardo@conisys.com> Spanish
|
||||
Antonio Ceballos <aceballos@gmail.com> Spanish
|
||||
Wei-Lun CHAO <chaoweilun@pcmail.com.tw> Chinese (traditional)
|
||||
@@ -18,6 +20,8 @@ Mihai Cristescu <mihai.cristescu@archlinux.info> Romanian
|
||||
Yavor Doganov <yavor@doganov.org> Bulgarian
|
||||
Karl Eichwalder <keichwa@gmx.net> German
|
||||
A. Murat EREN <meren@comu.edu.tr> Turkish
|
||||
Sveinn í Felli <sv1@fellsnet.is> Icelandic
|
||||
Marek Felšöci <marek@felsoci.sk> Slovak
|
||||
Doruk Fisek <dfisek@fisek.com.tr> Turkish
|
||||
Rafael Fontenelle <rffontenelle@gmail.com> Brazilian Portuguese
|
||||
Pavel Fric <pavelfric@seznam.cz> Czech
|
||||
@@ -44,6 +48,7 @@ Jordi Mallach <jordi@gnu.org> Catalan
|
||||
João Victor Duarte Martins <jvdm@sdf.lonestar.org> Brazilian Portuguese
|
||||
Pavel Maryanov <acid@jack.kiev.ua> Russian
|
||||
Daniele Medri <madrid@linux.it> Italian
|
||||
Baurzhan Muftakhidinov <baurthefirst@gmail.com> Kazakh
|
||||
Gergely Nagy <algernon@debian.org> Hungarian
|
||||
Claudio Neves <cneves@nextis.com> Brazilian Portuguese
|
||||
Kalle Olavi Niemitalo <kon@iki.fi> Finnish
|
||||
@@ -73,8 +78,10 @@ Johnny A. Solbu <johnny@solbu.net> Norwegian Bokmål
|
||||
Pierre Tane <tanep@bigfoot.com> French
|
||||
Yasuaki Taniguchi <yasuakit@gmail.com> Japanese
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician
|
||||
Andika Triwidada <andika@gmail.com> Indonesian
|
||||
Francisco Javier Tsao Santín <tsao@members.fsf.org> Galician
|
||||
Balázs Úr <urbalazs@gmail.com> Hungarian
|
||||
Luca Vercelli <luca.vercelli.to@gmail.com> Italian
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan
|
||||
Phan Vinh Thinh <teppi82@gmail.com> Vietnamese
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish
|
||||
|
||||
83
TODO
83
TODO
@@ -1,84 +1,5 @@
|
||||
A list of desired features
|
||||
--------------------------
|
||||
|
||||
Somewhat urgent:
|
||||
- Detect when text is being pasted, so that we can handle it faster.
|
||||
See https://savannah.gnu.org/bugs/?40060.
|
||||
- Allow color syntaxes to apply to more than just color, so that we can
|
||||
e.g. specify a different alternate spell checker depending on which
|
||||
file type we have open.
|
||||
For a list of open bugs and requested features see:
|
||||
|
||||
Vague musings:
|
||||
- Add support for right-to-left text (RTL), through FriBidi?
|
||||
- Allow setting marks (saved positions, not to be confused with the
|
||||
mark set via Ctrl-^) at various lines and/or columns in the buffer,
|
||||
and allow movement between them with a single keystroke?
|
||||
- Make matching bracket searches sophisticated enough to skip over
|
||||
brackets inside comments?
|
||||
https://savannah.gnu.org/bugs/?group=nano
|
||||
|
||||
For version 4.0:
|
||||
- Make undo/redo work also for justifying. [DONE]
|
||||
|
||||
For version 2.9:
|
||||
- Allow piping (marked) text to an external command and replacing it with
|
||||
the command's output. That is: implement filtering. [DONE]
|
||||
- Allow to record and replay a macro: a stored series of keystrokes. [DONE]
|
||||
- Make undo/redo work also for indenting. [DONE]
|
||||
|
||||
For version 2.8:
|
||||
- Allow text searches in the help viewer. [DONE]
|
||||
|
||||
For version 2.4:
|
||||
- Handle window resizes better. After we've resized, we should stay
|
||||
wherever we were before we resized, as Pico does. [DONE]
|
||||
- Allow even better file-type detection than we have currently, e.g.
|
||||
through libmagic. [DONE]
|
||||
- Compatibility with vim status files to let other editors know we're
|
||||
in a file. [DONE]
|
||||
|
||||
For version 2.2:
|
||||
- Rebindable keys? [DONE]
|
||||
- Undo/Redo keys (M-U and M-E)? [DONE]
|
||||
- Fix problems with color syntaxes highlighting lines too aggressively. [DONE]
|
||||
- Allow nano to work like a pager (reading from stdin). [DONE]
|
||||
- Select a color syntax based on more than just the filename extension. [DONE]
|
||||
- Allow soft wrapping as well as hard wrapping? [DONE]
|
||||
|
||||
For version 2.0:
|
||||
- UTF-8 support. [DONE]
|
||||
- Support for paragraph searches. [DONE]
|
||||
- Support for justifying the entire file at once. [DONE]
|
||||
- Support for filename searches in the file browser. [DONE]
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V. [DONE]
|
||||
- Spell check selected text only. [DONE]
|
||||
- Make "To Line" (^W^T) and "Read from Command" (^R^X) reenter their
|
||||
parent menu when their keystroke is entered a second time (^W^T^T and
|
||||
(^R^X^X) (requires figuring out when to keep cursor position and when
|
||||
not to). [DONE]
|
||||
- Fix resetstatuspos global which we shouldn't have. [DONE]
|
||||
|
||||
For version 1.2:
|
||||
- Single-line scroll up/down? [DONE]
|
||||
- Color syntax highlighting? (There seems to be a demand for it.) [DONE]
|
||||
- Support for a .nanorc file. [DONE]
|
||||
- Backup making (filename~)? [DONE]
|
||||
- Search/replace string history. [DONE]
|
||||
- Implement Pico's -j and -g flags, as they are pretty easy to do. [DONE]
|
||||
- Make mouse support work with clicking on the shortcuts (-m). [DONE]
|
||||
- Implement -o (--operatingdir, a chroot of sorts). [DONE]
|
||||
- Allow -r to take a negative argument, meaning right margin instead of
|
||||
left (allows resizing that way), formerly -W arg. [DONE]
|
||||
|
||||
For version 1.0:
|
||||
- Implement Spelling. [DONE]
|
||||
- Implement Help. [DONE]
|
||||
- Internationalization [In progress, translators welcome!]
|
||||
- Allow nano to be resized in X. [DONE]
|
||||
- On PageUp/Down, put the cursor on the first line (like Pico), not the
|
||||
center line. [DONE]
|
||||
- Implement justify function. [DONE]
|
||||
- Cut to end of line. [DONE]
|
||||
- Built-in speller command. [DONE]
|
||||
- Better statusbar interaction (scrolling, tab completion). [DONE]
|
||||
- Unjustify command (^U after ^J). [DONE]
|
||||
- Username completion (~user). [DONE]
|
||||
|
||||
23
autogen.sh
23
autogen.sh
@@ -2,9 +2,10 @@
|
||||
# Generate configure & friends for GIT users.
|
||||
|
||||
gnulib_url="git://git.sv.gnu.org/gnulib.git"
|
||||
gnulib_hash="129087dbb4f8721d750d2ec58261c56b2bda2536"
|
||||
gnulib_hash="833eea6be5607a85bc964bf728a7a82ca461b5b1"
|
||||
|
||||
modules="
|
||||
canonicalize-lgpl
|
||||
futimens
|
||||
getdelim
|
||||
getline
|
||||
@@ -13,36 +14,40 @@ modules="
|
||||
isblank
|
||||
iswblank
|
||||
lstat
|
||||
mkstemps
|
||||
nl_langinfo
|
||||
regex
|
||||
sigaction
|
||||
snprintf-posix
|
||||
stdarg
|
||||
stdarg-h
|
||||
strcase
|
||||
strcasestr-simple
|
||||
strnlen
|
||||
sys_wait
|
||||
vsnprintf-posix
|
||||
wchar
|
||||
wchar-h
|
||||
wctype-h
|
||||
wcwidth
|
||||
"
|
||||
|
||||
# Make sure the local gnulib git repo is up-to-date.
|
||||
if [ ! -d "gnulib" ]; then
|
||||
git clone --depth=123 ${gnulib_url}
|
||||
git clone --depth=2222 ${gnulib_url}
|
||||
fi
|
||||
cd gnulib >/dev/null || exit 1
|
||||
curr_hash=$(git log -1 --format=%H)
|
||||
if [ "${gnulib_hash}" != "${curr_hash}" ]; then
|
||||
echo "Pulling..."
|
||||
git pull
|
||||
git checkout -f ${gnulib_hash}
|
||||
git checkout --force ${gnulib_hash}
|
||||
fi
|
||||
cd .. >/dev/null || exit 1
|
||||
|
||||
rm -rf lib
|
||||
./gnulib/gnulib-tool \
|
||||
--import \
|
||||
${modules}
|
||||
echo "Gnulib-tool..."
|
||||
./gnulib/gnulib-tool --import ${modules}
|
||||
echo
|
||||
|
||||
autoreconf -f -i -s
|
||||
echo "Autoreconf..."
|
||||
autoreconf --install --symlink --force
|
||||
echo "Done."
|
||||
|
||||
405
configure.ac
405
configure.ac
@@ -1,6 +1,6 @@
|
||||
# Configuration for GNU nano - a small and user-friendly text editor
|
||||
#
|
||||
# Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2014, 2017 Mike Frysinger
|
||||
#
|
||||
# GNU nano is free software: you can redistribute it and/or modify
|
||||
@@ -16,10 +16,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
AC_INIT([GNU nano], [4.7], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU nano], [9.2], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([src/nano.c])
|
||||
AC_CANONICAL_HOST
|
||||
AM_INIT_AUTOMAKE([1.14])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
dnl Make sure the ONCE macros are available.
|
||||
@@ -36,18 +37,18 @@ gl_cv_glob_lists_symlinks=yes
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_PROG_CC
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
AC_PROG_LN_S
|
||||
AC_ISC_POSIX
|
||||
AC_SEARCH_LIBS([strerror], [cposix])
|
||||
AC_SYS_LARGEFILE
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl Internationalization macros.
|
||||
|
||||
AM_GNU_GETTEXT_VERSION([0.18.3])
|
||||
AM_GNU_GETTEXT_VERSION([0.20])
|
||||
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
AM_CONDITIONAL(USE_NLS, test x$USE_NLS = xyes)
|
||||
|
||||
@@ -59,7 +60,7 @@ AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.])
|
||||
dnl Whether this is a git repository.
|
||||
|
||||
AC_MSG_CHECKING([whether building from git])
|
||||
if test -d .git ; then
|
||||
if test -f "$srcdir/roll-a-release.sh" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
from_git=yes
|
||||
else
|
||||
@@ -73,13 +74,14 @@ dnl Checks for pkg-config and gettext when building from git.
|
||||
if test x$from_git = xyes; then
|
||||
if test ! -f $(aclocal --print-ac-dir)/pkg.m4; then
|
||||
AC_MSG_ERROR([
|
||||
*** The pkg.m4 macros are missing. ***
|
||||
*** The pkg-config package needs to be installed when building from git. ***])
|
||||
*** The pkg.m4 macros are missing.
|
||||
*** The pkg-config package needs to be installed when building from git.
|
||||
*** After fixing this problem, rerun ./autogen.sh.])
|
||||
fi
|
||||
if test "$ac_cv_path_MSGFMT" = ":"; then
|
||||
AC_MSG_ERROR([
|
||||
*** The msgfmt program is missing. ***
|
||||
*** The gettext package needs to be installed when building from git. ***])
|
||||
*** The msgfmt program is missing.
|
||||
*** The gettext package needs to be installed when building from git.])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -105,7 +107,8 @@ AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_color" = xyes; then
|
||||
if test "x$enable_nanorc" != xyes; then
|
||||
AC_MSG_ERROR([--enable-color needs --enable-nanorc to work])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-color needs --enable-nanorc to work])
|
||||
fi
|
||||
else
|
||||
enable_color=no
|
||||
@@ -113,7 +116,8 @@ if test "x$enable_tiny" = xyes; then
|
||||
fi
|
||||
if test "x$enable_nanorc" = xno; then
|
||||
if test "x$enable_color" = xyes; then
|
||||
AC_MSG_ERROR([--enable-color cannot work with --disable-nanorc])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-color cannot work with --disable-nanorc])
|
||||
else
|
||||
# Disabling nanorc silently disables color support.
|
||||
enable_color=no
|
||||
@@ -124,11 +128,26 @@ if test "x$enable_color" != xno; then
|
||||
color_support=yes
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(folding,
|
||||
AS_HELP_STRING([--disable-folding], [Disable line folding support]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_folding" = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-folding cannot work with --enable-tiny])
|
||||
else
|
||||
enable_folding=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_folding" != xno; then
|
||||
AC_DEFINE(ENABLE_FOLDING, 1, [Define this to have line folding support.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(comment,
|
||||
AS_HELP_STRING([--disable-comment], [Disable the comment/uncomment function]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_comment" = xyes; then
|
||||
AC_MSG_ERROR([--enable-comment cannot work with --enable-tiny])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-comment cannot work with --enable-tiny])
|
||||
else
|
||||
enable_comment=no
|
||||
fi
|
||||
@@ -148,12 +167,37 @@ if test "x$enable_extra" != xno; then
|
||||
AC_DEFINE(ENABLE_EXTRA, 1, [Define this to have an Easter egg.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(formatter,
|
||||
AS_HELP_STRING([--disable-formatter], [Disable the formatting tool]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_formatter" = xyes; then
|
||||
if test "x$enable_color" != xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-formatter needs both --enable-color and --enable-nanorc to work])
|
||||
fi
|
||||
else
|
||||
enable_formatter=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_color" = xno; then
|
||||
if test "x$enable_formatter" = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-formatter cannot work with --disable-color nor --disable-nanorc])
|
||||
else
|
||||
enable_formatter=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_formatter" != xno; then
|
||||
AC_DEFINE(ENABLE_FORMATTER, 1, [Define this to have access to a formatter.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
AS_HELP_STRING([--disable-help], [Disable the built-in help texts]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_help" = xyes; then
|
||||
if test "x$enable_multibuffer" != xyes; then
|
||||
AC_MSG_ERROR([--enable-help needs --enable-multibuffer to work])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-help needs --enable-multibuffer to work])
|
||||
fi
|
||||
else
|
||||
enable_help=no
|
||||
@@ -161,7 +205,8 @@ if test "x$enable_tiny" = xyes; then
|
||||
fi
|
||||
if test "x$enable_multibuffer" = xno; then
|
||||
if test "x$enable_help" = xyes; then
|
||||
AC_MSG_ERROR([--enable-help cannot work with --disable-multibuffer])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-help cannot work with --disable-multibuffer])
|
||||
else
|
||||
# Disabling multibuffer silently disables the help texts.
|
||||
enable_help=no
|
||||
@@ -195,6 +240,42 @@ fi
|
||||
|
||||
AC_ARG_ENABLE(libmagic,
|
||||
AS_HELP_STRING([--disable-libmagic], [Disable detection of file types via libmagic]))
|
||||
if test "x$enable_libmagic" = xyes; then
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_color" != xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-libmagic needs both --enable-color and --enable-nanorc to work])
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_color" = xno; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-libmagic cannot work with --disable-color nor --disable-nanorc])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(linter,
|
||||
AS_HELP_STRING([--disable-linter], [Disable the linting tool]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_linter" = xyes; then
|
||||
if test "x$enable_color" != xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-linter needs both --enable-color and --enable-nanorc to work])
|
||||
fi
|
||||
else
|
||||
enable_linter=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_color" = xno; then
|
||||
if test "x$enable_linter" = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-linter cannot work with --disable-color nor --disable-nanorc])
|
||||
else
|
||||
enable_linter=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_linter" != xno; then
|
||||
AC_DEFINE(ENABLE_LINTER, 1, [Define this to have access to a linter.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(linenumbers,
|
||||
AS_HELP_STRING([--disable-linenumbers], [Disable line numbering]))
|
||||
@@ -253,14 +334,14 @@ if test "x$enable_operatingdir" != xno; then
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
AS_HELP_STRING([--disable-speller], [Disable the spell-checker functions]))
|
||||
AS_HELP_STRING([--disable-speller], [Disable the spell-checking tool]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_speller" != xyes; then
|
||||
enable_speller=no
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_speller" != xno; then
|
||||
AC_DEFINE(ENABLE_SPELLER, 1, [Define this to have the spell-checker functions.])
|
||||
AC_DEFINE(ENABLE_SPELLER, 1, [Define this to have access to a spell checker.])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
@@ -278,7 +359,8 @@ AC_ARG_ENABLE(wordcomp,
|
||||
AS_HELP_STRING([--disable-wordcomp], [Disable the word-completion function]))
|
||||
if test "x$enable_tiny" = xyes; then
|
||||
if test "x$enable_wordcomp" = xyes; then
|
||||
AC_MSG_ERROR([--enable-wordcomp cannot work with --enable-tiny])
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-wordcomp cannot work with --enable-tiny])
|
||||
else
|
||||
enable_wordcomp=no
|
||||
fi
|
||||
@@ -328,210 +410,19 @@ AS_HELP_STRING([--enable-altrcname], [Specify an alternate rcfile name (default:
|
||||
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify an alternate rcfile name (default: .nanorc).]) rcfilename=$enableval
|
||||
fi])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to use slang])
|
||||
CURSES_LIB_NAME=""
|
||||
AC_ARG_WITH(slang,
|
||||
AS_HELP_STRING([--with-slang[=DIR]], [Use the slang library instead of curses]),
|
||||
[ case "$with_slang" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
if test x$with_slang != xyes; then
|
||||
# Add additional search path.
|
||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(1);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
else
|
||||
CURSES_LIB="-lslang"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the term library.
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||
test -n "$tcap" && break
|
||||
done
|
||||
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap])
|
||||
LIBS="$LIBS $tcap"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(1);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the math library.
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(1);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap -lm"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||
AC_MSG_ERROR([
|
||||
*** The header file slcurses.h was not found. This header file
|
||||
*** is required if you wish to use Slang support. Please either
|
||||
*** install a version of Slang that includes the slcurses.h file
|
||||
*** or do not call the configure script with --with-slang.]))
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
# Reset libs if the above slang tests failed.
|
||||
if test "x$enable_utf8" != xno; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
else
|
||||
CURSES_LIB="-lslang"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the term library.
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||
test -n "$tcap" && break
|
||||
done
|
||||
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
|
||||
LIBS="$LIBS $tcap"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)
|
||||
|
||||
# We might need the math library.
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap -lm"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||
AC_MSG_ERROR([
|
||||
*** The header file slcurses.h was not found. This header file
|
||||
*** is required if you wish to use Slang support. Please either
|
||||
*** install a version of Slang that includes the slcurses.h file
|
||||
*** or do not call the configure script with --with-slang.]))
|
||||
fi
|
||||
|
||||
if test "${_libs+set}" = "set"; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test x$with_slang != xyes; then
|
||||
LDFLAGS=${_ldflags}
|
||||
fi
|
||||
;;
|
||||
esac], [AC_MSG_RESULT(no)])
|
||||
|
||||
|
||||
dnl Checks for functions.
|
||||
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_FUNCS(iswalnum iswpunct mblen mbstowcs mbtowc wctomb)
|
||||
AC_CHECK_FUNCS(iswalpha iswalnum iswpunct mbstowcs wctomb)
|
||||
fi
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
AC_CHECK_FUNCS_ONCE(chmod chown fchmod fchown flockfile funlockfile
|
||||
fork fsync geteuid pipe wait waitpid)
|
||||
|
||||
dnl Checks for available flags.
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [], [])
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
@@ -561,9 +452,9 @@ if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
CURSES_LIB=`$NCURSESW_CONFIG --libs`
|
||||
LIBS="$CURSES_LIB $LIBS"
|
||||
CPPFLAGS="`$NCURSESW_CONFIG --cflags` $CPPFLAGS"
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
AC_CHECK_LIB(ncursesw, wget_wch, [CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
else
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
AC_CHECK_LIB(ncursesw, wget_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
LIBS="$OLDLIBS"
|
||||
fi
|
||||
@@ -577,7 +468,7 @@ if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_HEADERS(curses.h)
|
||||
|
||||
if test "x$enable_utf8" != xno; then
|
||||
AC_CHECK_LIB(curses, get_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes])
|
||||
AC_CHECK_LIB(curses, wget_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
@@ -588,10 +479,10 @@ fi
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_MSG_ERROR([
|
||||
*** No curses lib was found. Please install the curses header files
|
||||
*** from libncursesw5-dev (Debian), ncurses-devel (Fedora), or similar.
|
||||
*** from libncurses-dev (Debian), ncurses-devel (Fedora), or similar.
|
||||
*** (Or install ncurses from https://ftp.gnu.org/gnu/ncurses/.)])
|
||||
else
|
||||
AC_MSG_RESULT([Using $CURSES_LIB_NAME as the curses library])
|
||||
AC_MSG_RESULT([ The curses library to be used is: $CURSES_LIB_NAME])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], [use_default_colors],
|
||||
@@ -604,36 +495,31 @@ AC_CHECK_LIB([$CURSES_LIB_NAME], [key_defined],
|
||||
[AC_DEFINE(HAVE_KEY_DEFINED, 1, [Define this if your curses library has the key_defined() function.])],
|
||||
[], [$CURSES_LIB])
|
||||
|
||||
dnl Parse any configure options.
|
||||
|
||||
LIBS="$LIBS $CURSES_LIB"
|
||||
|
||||
AC_SUBST(CURSES_LIB)
|
||||
|
||||
if test "x$enable_utf8" != xno && \
|
||||
test x$CURSES_LIB_WIDE = xyes && \
|
||||
test x$ac_cv_func_iswalpha = xyes && \
|
||||
test x$ac_cv_func_iswalnum = xyes && \
|
||||
test x$ac_cv_func_iswpunct = xyes && \
|
||||
test x$ac_cv_func_mblen = xyes && \
|
||||
test x$ac_cv_func_mbstowcs = xyes && \
|
||||
test x$ac_cv_func_mbtowc = xyes && \
|
||||
test x$ac_cv_func_wctomb = xyes; then
|
||||
AC_DEFINE(ENABLE_UTF8, 1, [Define this if your system has sufficient UTF-8 support.])
|
||||
else
|
||||
if test "x$enable_utf8" = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** UTF-8 support was requested, but insufficient UTF-8 support was
|
||||
*** detected in your curses and/or C libraries. Please verify that
|
||||
*** your Slang was built with UTF-8 support or your curses was built
|
||||
*** with wide-character support, and that your C library was built
|
||||
*** UTF-8 support was requested, but insufficient support was
|
||||
*** detected in your curses and/or C libraries. Please verify
|
||||
*** that both your curses library and your C library were built
|
||||
*** with wide-character support.])
|
||||
elif test "x$enable_utf8" != xno; then
|
||||
AC_MSG_WARN([
|
||||
*** Insufficient UTF-8 support was detected in your curses and/or C
|
||||
*** libraries. If you want UTF-8 support, please verify that your
|
||||
*** Slang was built with UTF-8 support or your curses was built with
|
||||
*** wide-character support, and that your C library was built with
|
||||
*** wide-character support.])
|
||||
*** Insufficient UTF-8 support was detected in your curses
|
||||
*** and/or C libraries. If you want UTF-8 support, please
|
||||
*** verify that both your curses library and your C library
|
||||
*** were built with wide-character support.])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -660,16 +546,16 @@ AC_DEFINE_UNQUOTED(NANO_REG_EXTENDED, $nano_reg_extended,
|
||||
[Flag(s) to use to get the full range of extended regular expressions])
|
||||
|
||||
if test x$color_support = xyes; then
|
||||
# if test x$CURSES_LIB_NAME = xcurses; then
|
||||
AC_MSG_CHECKING([whether _XOPEN_SOURCE_EXTENDED is needed])
|
||||
AC_TRY_RUN([
|
||||
AC_MSG_CHECKING([whether _XOPEN_SOURCE_EXTENDED is needed])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <curses.h>
|
||||
int main(void)
|
||||
{
|
||||
int testcolor = COLOR_WHITE;
|
||||
return 0;
|
||||
}], AC_MSG_RESULT(no),
|
||||
AC_TRY_RUN([
|
||||
}]])],
|
||||
AC_MSG_RESULT(no),
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#ifndef _XOPEN_SOURCE_EXTENDED
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#endif
|
||||
@@ -678,35 +564,23 @@ int main(void)
|
||||
{
|
||||
int testcolor = COLOR_WHITE;
|
||||
return 0;
|
||||
}],
|
||||
AC_DEFINE(NEED_XOPEN_SOURCE_EXTENDED, 1, [Define this if you need the _XOPEN_SOURCE_EXTENDED macro for color support.])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(not sure)
|
||||
AC_MSG_WARN([*** Couldn't successfully compile basic color test with or without _XOPEN_SOURCE_EXTENDED])
|
||||
AC_MSG_WARN([*** This build may not compile. Consider configuring with --disable-color or installing ncurses])),
|
||||
AC_MSG_WARN([*** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling]))
|
||||
# fi
|
||||
}]])],
|
||||
AC_DEFINE(NEED_XOPEN_SOURCE_EXTENDED, 1, [Define this if you need the _XOPEN_SOURCE_EXTENDED macro for color support.])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(not sure)
|
||||
AC_MSG_WARN([
|
||||
*** Couldn't successfully compile basic color test with or without
|
||||
*** _XOPEN_SOURCE_EXTENDED. This build may not compile. Consider
|
||||
*** configuring with --disable-color or installing ncurses.])),
|
||||
AC_MSG_WARN([
|
||||
*** Can't check need for _XOPEN_SOURCE_EXTENDED when cross-compiling.]))
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether LINES and COLS can be redefined])
|
||||
AC_TRY_RUN([
|
||||
#include <curses.h>
|
||||
int main(void)
|
||||
{
|
||||
LINES = 80;
|
||||
COLS = 25;
|
||||
return 0;
|
||||
}],
|
||||
AC_DEFINE(REDEFINING_MACROS_OK, 1, [Define this if you know your curses library allows LINES and COLS to be redefined to deal with a resizing bug.])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_WARN([*** Can't check for macro redefinability when cross-compiling]))
|
||||
|
||||
AS_IF([test "x$enable_libmagic" != "xno"], [
|
||||
AC_CHECK_HEADERS([magic.h])
|
||||
AC_CHECK_LIB(magic, magic_open)
|
||||
AC_CHECK_HEADERS([zlib.h])
|
||||
AC_CHECK_LIB(z, inflate)
|
||||
AC_CHECK_HEADERS([magic.h])
|
||||
AC_CHECK_LIB(magic, magic_open)
|
||||
AC_CHECK_HEADERS([zlib.h])
|
||||
AC_CHECK_LIB(z, inflate)
|
||||
])
|
||||
|
||||
# Check for groff html support.
|
||||
@@ -715,8 +589,8 @@ groff -t -mandoc -Thtml </dev/null >/dev/null
|
||||
if test $? -ne 0 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([
|
||||
*** Will not generate HTML version of man pages. ***
|
||||
*** Consider installing a newer version of groff with HTML support. ***])
|
||||
*** Will not generate HTML version of man pages. Consider
|
||||
*** installing a newer version of groff with HTML support.])
|
||||
groff_html_support=no
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
@@ -733,7 +607,8 @@ m4/Makefile
|
||||
po/Makefile.in
|
||||
src/Makefile
|
||||
syntax/Makefile
|
||||
nano.spec
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
make showinfo
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Cheatsheet for nano</title>
|
||||
<title>Cheatsheet for GNU nano</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="description" content="A concise overview of the command shortcuts of the GNU nano editor, grouped by category.">
|
||||
<meta name="description" content="A concise overview of the command shortcuts for nano, the editor, grouped by category.">
|
||||
<meta name="keywords" content="cheatsheet, nano, editor, shortcuts, keystrokes, functions, operations, commands">
|
||||
<meta name="author" content="Benno Schulenberg">
|
||||
</head>
|
||||
@@ -12,8 +12,8 @@
|
||||
<body>
|
||||
|
||||
<br>
|
||||
<h1 align="center">Overview of nano's shortcuts </h1>
|
||||
<h3 align="center">The editor's keystrokes and their functions </h3>
|
||||
<h1 align="center">Overview of nano's shortcuts </h1>
|
||||
<h3 align="center">The editor's keystrokes and their functions </h3>
|
||||
<br>
|
||||
|
||||
<table align="center"><tbody>
|
||||
@@ -33,7 +33,6 @@
|
||||
<tr><td>Ctrl+K </td><td>Cut current line into cutbuffer</td></tr>
|
||||
<tr><td>Alt+6</td><td>Copy current line into cutbuffer</td></tr>
|
||||
<tr><td>Ctrl+U</td><td>Paste contents of cutbuffer</td></tr>
|
||||
<tr><td>Alt+T</td><td>Cut until end of buffer</td></tr>
|
||||
<tr><td>Ctrl+]</td><td>Complete current word</td></tr>
|
||||
<tr><td>Alt+3</td><td>Comment/uncomment line/region</td></tr>
|
||||
<tr><td>Alt+U</td><td>Undo last action</td></tr>
|
||||
@@ -43,10 +42,10 @@
|
||||
|
||||
<b>Search and replace</b>
|
||||
<table><tbody>
|
||||
<tr><td>Ctrl+Q </td><td>Start backward search</td></tr>
|
||||
<tr><td>Ctrl+W</td><td>Start forward search</td></tr>
|
||||
<tr><td>Alt+Q</td><td>Find next occurrence backward</td></tr>
|
||||
<tr><td>Alt+W</td><td>Find next occurrence forward</td></tr>
|
||||
<tr><td>Ctrl+B </td><td>Start backward search</td></tr>
|
||||
<tr><td>Ctrl+F</td><td>Start forward search</td></tr>
|
||||
<tr><td>Alt+B</td><td>Find next occurrence backward</td></tr>
|
||||
<tr><td>Alt+F</td><td>Find next occurrence forward</td></tr>
|
||||
<tr><td>Alt+R</td><td>Start a replacing session</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
@@ -55,20 +54,25 @@
|
||||
<table><tbody>
|
||||
<tr><td>Ctrl+H</td><td>Delete character before cursor </td></tr>
|
||||
<tr><td>Ctrl+D</td><td>Delete character under cursor</td></tr>
|
||||
<tr><td>Ctrl+Shift+Del </td><td>Delete word to the left</td></tr>
|
||||
<tr><td>Ctrl+Del</td><td>Delete word to the right</td></tr>
|
||||
<tr><td>Alt+Bsp</td><td>Delete word to the left</td></tr>
|
||||
<tr><td>Ctrl+Del </td><td>Delete word to the right</td></tr>
|
||||
<tr><td>Alt+Del</td><td>Delete current line</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
|
||||
<b>Operations</b>
|
||||
<table><tbody>
|
||||
<tr><td>Ctrl+T </td><td>Run a spell check</td></tr>
|
||||
<tr><td>Ctrl+T </td><td>Execute some command</td></tr>
|
||||
<tr><td>Ctrl+T Ctrl+S</td><td>Run a spell check</td></tr>
|
||||
<tr><td>Ctrl+T Ctrl+Y</td><td>Run a syntax check</td></tr>
|
||||
<tr><td>Ctrl+T Ctrl+O </td><td>Run a formatter</td></tr>
|
||||
<tr><td>Tab</td><td>Indent marked region</td></tr>
|
||||
<tr><td>Shift+Tab </td><td>Unindent marked region</td></tr>
|
||||
<tr><td>Ctrl+J</td><td>Justify paragraph or region</td></tr>
|
||||
<tr><td>Alt+J</td><td>Justify entire buffer</td></tr>
|
||||
<tr><td>Alt+B</td><td>Run a syntax check</td></tr>
|
||||
<tr><td>Alt+F</td><td>Run a formatter/fixer/arranger</td></tr>
|
||||
<tr><td>Alt+:</td><td>Start/stop recording of macro</td></tr>
|
||||
<tr><td>Alt+T</td><td>Cut until end of buffer</td></tr>
|
||||
<tr><td>Alt+V</td><td>Enter next keystroke verbatim</td></tr>
|
||||
<tr><td>Alt+:</td><td>Start/stop recording of macro </td></tr>
|
||||
<tr><td>Alt+;</td><td>Replay macro</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
@@ -77,16 +81,18 @@
|
||||
|
||||
<b>Moving around</b>
|
||||
<table><tbody>
|
||||
<tr><td>Ctrl+B </td><td>One character backward</td></tr>
|
||||
<tr><td>Ctrl+F</td><td>One character forward</td></tr>
|
||||
<tr><td>Ctrl+⯇</td><td>One word backward</td></tr>
|
||||
<tr><td>Ctrl+⯈</td><td>One word forward</td></tr>
|
||||
<tr><td><b>←</b></td><td>One character backward</td></tr>
|
||||
<tr><td><b>→</b></td><td>One character forward</td></tr>
|
||||
<tr><td>Ctrl+<b>←</b></td><td>One word backward</td></tr>
|
||||
<tr><td>Ctrl+<b>→</b></td><td>One word forward</td></tr>
|
||||
<tr><td>Ctrl+A</td><td>To start of line</td></tr>
|
||||
<tr><td>Ctrl+E</td><td>To end of line</td></tr>
|
||||
<tr><td>Ctrl+P</td><td>One line up</td></tr>
|
||||
<tr><td>Ctrl+N</td><td>One line down</td></tr>
|
||||
<tr><td>Ctrl+⯅</td><td>To previous block</td></tr>
|
||||
<tr><td>Ctrl+⯆</td><td>To next block</td></tr>
|
||||
<tr><td>Ctrl+<b>↑</b></td><td>To previous block</td></tr>
|
||||
<tr><td>Ctrl+<b>↓</b></td><td>To next block</td></tr>
|
||||
<tr><td>Alt+Home </td><td>To first row in viewport</td></tr>
|
||||
<tr><td>Alt+End</td><td>To last row in viewport</td></tr>
|
||||
<tr><td>Ctrl+Y</td><td>One page up</td></tr>
|
||||
<tr><td>Ctrl+V</td><td>One page down</td></tr>
|
||||
<tr><td>Alt+\</td><td>To top of buffer</td></tr>
|
||||
@@ -96,33 +102,35 @@
|
||||
|
||||
<b>Special movement</b>
|
||||
<table><tbody>
|
||||
<tr><td>Alt+G </td><td>Go to specified line</td></tr>
|
||||
<tr><td>Alt+G </td><td>Go to a specified line</td></tr>
|
||||
<tr><td>Alt+]</td><td>Go to complementary bracket</td></tr>
|
||||
<tr><td>Alt+⯅</td><td>Scroll viewport up</td></tr>
|
||||
<tr><td>Alt+⯆</td><td>Scroll viewport down</td></tr>
|
||||
<tr><td>Alt+<</td><td>Switch to preceding buffer</td></tr>
|
||||
<tr><td>Alt+></td><td>Switch to succeeding buffer</td></tr>
|
||||
<tr><td>Alt+<</td><td>Scroll viewport to the left</td></tr>
|
||||
<tr><td>Alt+></td><td>Scroll viewport to the right</td></tr>
|
||||
<tr><td>Alt+<b>↑</b></td><td>Scroll viewport up</td></tr>
|
||||
<tr><td>Alt+<b>↓</b></td><td>Scroll viewport down</td></tr>
|
||||
<tr><td>Ctrl+L</td><td>Center the current line</td></tr>
|
||||
<tr><td>Alt+<b>←</b></td><td>Switch to preceding buffer</td></tr>
|
||||
<tr><td>Alt+<b>→</b></td><td>Switch to succeeding buffer</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
|
||||
<b>Information</b>
|
||||
<table><tbody>
|
||||
<tr><td>Ctrl+C </td><td>Report cursor position</td></tr>
|
||||
<tr><td>Alt+D</td><td>Report word/line/char count</td></tr>
|
||||
<tr><td>Alt+D</td><td>Report line/word/character counts</td></tr>
|
||||
<tr><td>Ctrl+G</td><td>Display help text</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
|
||||
<b>Various</b>
|
||||
<table><tbody>
|
||||
<tr><td>Alt+A</td><td>Turn the mark on/off</td></tr>
|
||||
<tr><td>Tab</td><td>Indent marked region</td></tr>
|
||||
<tr><td>Shift+Tab </td><td>Unindent marked region</td></tr>
|
||||
<tr><td>Alt+A </td><td>Set or unset the mark</td></tr>
|
||||
<tr><td>Alt+C</td><td>Turn constant position info on/off</td></tr>
|
||||
<tr><td>Alt+N</td><td>Turn line numbers on/off</td></tr>
|
||||
<tr><td>Alt+P</td><td>Turn visible whitespace on/off</td></tr>
|
||||
<tr><td>Alt+V</td><td>Enter next keystroke verbatim</td></tr>
|
||||
<tr><td>Ctrl+L</td><td>Refresh the screen</td></tr>
|
||||
<tr><td>Ctrl+Z</td><td>Suspend nano</td></tr>
|
||||
<tr><td>Alt+S</td><td>Turn softwrapping on/off</td></tr>
|
||||
<tr><td>Alt+X</td><td>Hide/unhide the help lines</td></tr>
|
||||
<tr><td>Alt+Z</td><td>Hide/unhide the info bars</td></tr>
|
||||
</tbody></table>
|
||||
<br>
|
||||
|
||||
|
||||
262
doc/faq.html
262
doc/faq.html
@@ -5,6 +5,9 @@
|
||||
<title>The GNU nano editor FAQ</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="description" content="The genesis story of the nano editor, plus the solution to some common problems.">
|
||||
<style type="text/css">
|
||||
.indented { margin-left: 2em; font-family: courier; font-size: 110%; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body text="#330000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
|
||||
@@ -24,30 +27,31 @@
|
||||
<a href="#2.1">2.1. FTP and WWW sites that carry nano.</a><br>
|
||||
<a href="#2.2">2.2. RedHat and derivatives (.rpm) packages.</a><br>
|
||||
<a href="#2.3">2.3. Debian (.deb) packages.</a><br>
|
||||
<a href="#2.4">2.4. By GIT (for the brave).</a>
|
||||
<a href="#2.4">2.4. By git (for the brave).</a>
|
||||
</p></blockquote>
|
||||
<h3><a href="#3">3. Installation and Configuration</a></h3>
|
||||
<blockquote><p>
|
||||
<a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
|
||||
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
|
||||
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
|
||||
<a href="#3.5">3.5. nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
|
||||
<a href="#3.8">3.8. Tell me more about this verbatim input stuff!</a><br>
|
||||
<a href="#3.9">3.9. How do I make a .nanorc file that nano will read when I start it?</a><br>
|
||||
<a href="#3.4">3.4. nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.5">3.5. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.6">3.6. Tell me more about this multibuffer stuff!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this verbatim input stuff!</a><br>
|
||||
<a href="#3.8">3.8. How do I make a .nanorc file that nano will read when I start it?</a><br>
|
||||
<a href="#3.9">3.9. Why does my self-compiled nano not read /etc/nanorc?</a><br>
|
||||
</p></blockquote>
|
||||
<h3><a href="#4">4. Running</a></h3>
|
||||
<blockquote><p>
|
||||
<a href="#4.1">4.1. How do I open a file with a name beginning with '+' from the command line?</a><br>
|
||||
<a href="#4.2">4.2. Ack! My Backspace/Delete/Enter/Meta/double bucky key doesn't seem to work! What can I do?</a><br>
|
||||
<a href="#4.3">4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?</a><br>
|
||||
<a href="#4.4">4.4. With what keystroke can I paste text from the clipboard into nano?</a><br>
|
||||
<a href="#4.1">4.1. Alt+Up does nothing on a Linux console. How can I make it scroll?</a><br>
|
||||
<a href="#4.2">4.2. How can I make Ctrl+Shift+Left/Right select words on urxvt?</a><br>
|
||||
<a href="#4.3">4.3. How do I remove an unwanted Byte Order Mark?</a><br>
|
||||
<a href="#4.4">4.4. Where did Ctrl+T in the Search menu go?</a><br>
|
||||
<a href="#4.5">4.5. How do I select text for or paste text from the clipboard when nano's mouse support is turned on?</a><br>
|
||||
<a href="#4.6">4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?</a><br>
|
||||
<a href="#4.7">4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?<a><br>
|
||||
<a href="#4.7">4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?</a><br>
|
||||
<a href="#4.8">4.8. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
|
||||
<a href="#4.9">4.9. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
|
||||
<a href="#4.9">4.9. How do I make nano my default editor (in Pine, mutt, git, ...)?</a><br>
|
||||
</p></blockquote>
|
||||
<h3><a href="#5">5. Internationalization</a></h3>
|
||||
<blockquote><p>
|
||||
@@ -68,14 +72,14 @@
|
||||
<a href="#7.2">7.2. How do I submit a bug report or patch?</a><br>
|
||||
<a href="#7.3">7.3. I want to send the development team a big load of cash (or just a thank you).</a><br>
|
||||
<a href="#7.4">7.4. How do I join the development team?</a><br>
|
||||
<a href="#7.5">7.5. Can I have write access to the GIT tree?</a>
|
||||
<a href="#7.5">7.5. Can I have write access to the git tree?</a>
|
||||
</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="1"></a>1. General</h1>
|
||||
<h3><a name="1.1"></a>1.1. What is GNU nano?</h3>
|
||||
<h1 id="1">1. General</h1>
|
||||
<h3 id="1.1">1.1. What is GNU nano?</h3>
|
||||
<blockquote><p>GNU nano was designed to be a free replacement for the Pico text editor, part of the Pine email suite from <a href="http://www.washington.edu/pine/">The University of Washington</a>. It aimed to "emulate Pico as closely as is reasonable and then include extra functionality".</p></blockquote>
|
||||
<h3><a name="1.2"></a>1.2. What is the history behind nano?</h3>
|
||||
<h3 id="1.2">1.2. What is the history behind nano?</h3>
|
||||
<blockquote><p>Funny you should ask!</p>
|
||||
<p><b>In the beginning...</b></p>
|
||||
<p>For years Pine was THE program used to read email on a Unix system. The Pico text editor is the portion of the program one would use to compose his or her mail messages. Many beginners to Unix flocked to Pico and Pine because of their well organized, easy to use interfaces. With the proliferation of GNU/Linux in the mid to late 90's, many University students became intimately familiar with the strengths (and weaknesses) of Pine and Pico.</p>
|
||||
@@ -85,30 +89,30 @@
|
||||
<p>It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.</p>
|
||||
<p>Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help text display, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is in today.</p>
|
||||
<p>In February 2001, nano was declared an official GNU program by Richard Stallman. nano also reached its first production release on March 22, 2001.</p></blockquote>
|
||||
<h3><a name="1.3"></a>1.3. Why the name change from TIP?</h3>
|
||||
<h3 id="1.3">1.3. Why the name change from TIP?</h3>
|
||||
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
|
||||
<h3><a name="1.4"></a>1.4. What is the current version of nano?</h3>
|
||||
<blockquote><p>The current version of nano <i>should</i> be <b>4.7</b>. Of course, you should always check the <a href="https://nano-editor.org/">nano homepage</a> to see what the latest and greatest version is.</p></blockquote>
|
||||
<h3><a name="1.5"></a>1.5. I want to read the man page without having to download the program!</h3>
|
||||
<h3 id="1.4">1.4. What is the current version of nano?</h3>
|
||||
<blockquote><p>The current version of nano <i>should</i> be <b>9.2</b>. Of course, you should always check the <a href="https://nano-editor.org/">nano homepage</a> to see what the latest and greatest version is.</p></blockquote>
|
||||
<h3 id="1.5">1.5. I want to read the man page without having to download the program!</h3>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="https://nano-editor.org/dist/latest/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="2"></a>2. Where to get GNU nano.</h1>
|
||||
<h3><a name="2.1"></a>2.1. Web sites that carry nano.</h3>
|
||||
<h1 id="2">2. Where to get GNU nano.</h1>
|
||||
<h3 id="2.1">2.1. Web sites that carry nano.</h3>
|
||||
<blockquote><p>The nano source tarballs can be downloaded from the following web sites:</p>
|
||||
<ul>
|
||||
<li><a href="https://nano-editor.org/dist/">https://nano-editor.org/dist/</a></li>
|
||||
<li><a href="https://ftp.gnu.org/gnu/nano/">https://ftp.gnu.org/gnu/nano/</a></li>
|
||||
<li><a href="https://nano-editor.org/dist/latest/">https://nano-editor.org/dist/latest/</a></li>
|
||||
<li><a href="https://ftpmirror.gnu.org/gnu/nano/">https://ftpmirror.gnu.org/gnu/nano/</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h3><a name="2.2"></a>2.2. RPM packages (RedHat, OpenSuse, and derivatives).</h3>
|
||||
<h3 id="2.2">2.2. RPM packages (RedHat, OpenSuse, and derivatives).</h3>
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li><a href="https://kojipkgs.fedoraproject.org//packages/nano/">https://kojipkgs.fedoraproject.org//packages/nano/</a></li>
|
||||
<li><a href="https://software.opensuse.org/package/nano">https://software.opensuse.org/package/nano</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h3><a name="2.3"></a>2.3. Deb packages (Debian and derivatives):</h3>
|
||||
<h3 id="2.3">2.3. Deb packages (Debian and derivatives):</h3>
|
||||
<blockquote><p>Debian users can check out the current nano packages for:</p>
|
||||
<ul>
|
||||
<li><a href="https://packages.debian.org/stable/editors/nano">stable</a></li>
|
||||
@@ -117,137 +121,179 @@
|
||||
</ul>
|
||||
<p>You can also have a look at the <a href="http://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</p>
|
||||
</blockquote>
|
||||
<h3><a name="2.4"></a>2.4. By GIT (for the brave).</h3>
|
||||
<blockquote><p>For the 'bleeding edge' current version of nano, you can use GIT to download the current source code. <b>Note:</b> believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see <a href="http://git.savannah.gnu.org/cgit/nano.git/tree/README.GIT">the nano GIT document</a> for info on anonymous GIT access to the nano source.</p></blockquote>
|
||||
<h3 id="2.4">2.4. By git (for the brave).</h3>
|
||||
<blockquote><p>For the "bleeding edge" current version of nano, you can use <b>git</b> to download the current source code. <i>Note:</i> believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see <a href="http://git.savannah.gnu.org/cgit/nano.git/tree/README.hacking">the hacking document</a> for info on getting and building nano from git.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="3"></a>3. Installation and Configuration</h1>
|
||||
<h3><a name="3.1"></a>3.1. How do I install the RPM or DEB package?</h3>
|
||||
<h1 id="3">3. Installation and Configuration</h1>
|
||||
<h3 id="3.1">3.1. How do I install the RPM or DEB package?</h3>
|
||||
<blockquote><p>It's simple really! As root, type <b>rpm -Uvh nano-x.y-1*.rpm</b> if you have a RedHat-ish system or <b>dpkg -i nano_x.y-1*.deb</b> if you have a Debian-ish system, where <b>x.y</b> is the version number of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.</p></blockquote>
|
||||
<h3><a name="3.2"></a>3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</h3>
|
||||
<h3 id="3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</h3>
|
||||
<blockquote><p>Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:</p>
|
||||
<p><b>tar -xvf nano-x.y.tar.gz</b></p>
|
||||
<p class="indented"><b>tar -xvf nano-x.y.tar.gz</b></p>
|
||||
<p>Then you need to run <b>configure</b> with any options you might want (if any).</p>
|
||||
<p>The average case is this:</p>
|
||||
<p><b>cd nano-x.y/</b><br>
|
||||
<p class="indented"><b>cd nano-x.y/</b><br>
|
||||
<b>./configure</b><br>
|
||||
<b>make</b><br>
|
||||
<b>make install</b> (as root, of course)</p></blockquote>
|
||||
<h3><a name="3.3"></a>3.3. Why does everything go into /usr/local?</h3>
|
||||
<b>make install</b> #(as root, of course)</p></blockquote>
|
||||
<h3 id="3.3">3.3. Why does everything go into /usr/local?</h3>
|
||||
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
|
||||
<p><b>./configure --prefix=/usr</b></p>
|
||||
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
|
||||
<h3><a name="3.5"></a>3.5. nano should automatically run strip on the binary when installing it!</h3>
|
||||
<blockquote><p>Actually, it does, but you have to use <b>make install-strip</b>. The default make install does not, and will not, run strip automatically.</p></blockquote>
|
||||
<h3><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h3>
|
||||
<p class="indented"><b>./configure --prefix=/usr</b></p>
|
||||
<p>This will put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
|
||||
<h3 id="3.4">3.4. nano should automatically run strip on the binary when installing it!</h3>
|
||||
<blockquote><p>It does when you use <b>make install-strip</b>. The default <b>make install</b> does not, and will not, run strip automatically.</p></blockquote>
|
||||
<h3 id="3.5">3.5. How can I make the executable smaller? This is too bloated!</h3>
|
||||
<blockquote><p>Actually, there are several parts of the editor that can be disabled. You can pass arguments to the <b>configure</b> script that disable certain features. Here's a brief list:</p>
|
||||
<pre>
|
||||
<b>--disable-browser</b> Disable the built-in file browser
|
||||
<b>--disable-color</b> Disable color and syntax highlighting
|
||||
<b>--disable-comment</b> Disable the comment/uncomment function
|
||||
<b>--disable-extra</b> Disable the easter egg
|
||||
<b>--disable-help</b> Disable the built-in help texts
|
||||
<b>--disable-histories</b> Disable the saving of search strings and cursor positions
|
||||
<b>--disable-justify</b> Disable the justify/unjustify functions
|
||||
<b>--disable-libmagic</b> Disable the use of libmagic for determining a file's syntax
|
||||
<b>--disable-linenumbers</b> Disable line numbering
|
||||
<b>--disable-mouse</b> Disable mouse support
|
||||
<b>--disable-multibuffer</b> Disable the opening of multiple file buffers
|
||||
<b>--disable-nanorc</b> Disable the use of .nanorc files
|
||||
<b>--disable-operatingdir</b> Disable the setting of an operating directory
|
||||
<b>--disable-speller</b> Disable the spell-checker functions
|
||||
<b>--disable-tabcomp</b> Disable the tab-completion functions
|
||||
<b>--disable-wordcomp</b> Disable the word-completion function
|
||||
<b>--disable-wrapping</b> Disable all hard-wrapping of text</pre>
|
||||
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use with Control-^ to select text). Also, if you know you aren't going to be using other languages, you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on whether you have locale support on your system. And finally, there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
|
||||
<b>--disable-browser</b> Disable the built-in file browser
|
||||
<b>--disable-color</b> Disable color and syntax highlighting
|
||||
<b>--disable-comment</b> Disable the comment/uncomment function
|
||||
<b>--disable-extra</b> Disable the easter egg
|
||||
<b>--disable-formatter</b> Disable the formatting tool
|
||||
<b>--disable-help</b> Disable the built-in help texts
|
||||
<b>--disable-histories</b> Disable the saving of search strings and cursor positions
|
||||
<b>--disable-justify</b> Disable the justify/unjustify functions
|
||||
<b>--disable-libmagic</b> Disable the use of libmagic for determining a file's syntax
|
||||
<b>--disable-linenumbers</b> Disable line numbering
|
||||
<b>--disable-linter</b> Disable the linting tool
|
||||
<b>--disable-mouse</b> Disable mouse support
|
||||
<b>--disable-multibuffer</b> Disable the opening of multiple file buffers
|
||||
<b>--disable-nanorc</b> Disable the use of .nanorc files
|
||||
<b>--disable-operatingdir</b> Disable the setting of an operating directory
|
||||
<b>--disable-speller</b> Disable the spell-checking tool
|
||||
<b>--disable-tabcomp</b> Disable the tab-completion functions
|
||||
<b>--disable-wordcomp</b> Disable the word-completion function
|
||||
<b>--disable-wrapping</b> Disable all hard-wrapping of text</pre>
|
||||
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the undo/redo code and the code for selecting text). Also, if you know you don't need other languages, you can use <b>--disable-nls</b> to disable internationalization and save a few kilobytes. And finally, there's always good old <b>strip</b> to remove all unneeded symbols.</p>
|
||||
</blockquote>
|
||||
<h3><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h3>
|
||||
<blockquote><p>To use multiple file buffers, you must not have configured nano with <b>--disable-multibuffer</b> nor with <b>--enable-tiny</b> (use <b>nano -V</b> to check the compilation options). Then when you want to insert a file into its own buffer instead of into the current file, just hit <b>Meta-F</b> after typing <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>-F</b> or <b>--multibuffer</b> flag when you invoke nano, or add <b>set multibuffer</b> to your .nanorc file.</p>
|
||||
<p>You can move between the buffers you have open with the <b>Meta-<</b> and <b>Meta-></b> keys, or more easily without holding Shift: <b>Meta-,</b> and <b>Meta-.</b> (clear as mud, right? =-). When you have more than one buffer open, the ^X shortcut will say "Close", instead of "Exit".</p></blockquote>
|
||||
<h3><a name="3.8"></a>3.8. Tell me more about this verbatim input stuff!</h3>
|
||||
<h3 id="3.6">3.6. Tell me more about this multibuffer stuff!</h3>
|
||||
<blockquote><p>To use multiple file buffers, you must not have configured nano with <b>--disable-multibuffer</b> nor with <b>--enable-tiny</b> (use <b>nano -V</b> to check the compilation options). Then when you want to insert a file into its own buffer instead of into the current file, just hit <b>Meta-F</b> after typing <b>^R</b>.</p>
|
||||
<p>If you want files to be loaded always into their own buffers, use the <b>-F</b> or <b>--multibuffer</b> flag when you invoke nano, or add <b>set multibuffer</b> to your .nanorc file. (Since nano-9.2 these options are named <b>--newbuffer</b> and <b>set newbuffer</b>.)</p>
|
||||
<p>You can switch between open buffers with <b>Meta-,</b> and <b>Meta-.</b> (Alt+comma and Alt+period).</p>
|
||||
<p>When you have more than one buffer open, the help lines will say "<i>Close</i>" instead of "<i>Exit</i>" for the <b>^X</b> shortcut.</p></blockquote>
|
||||
<h3 id="3.7">3.7. Tell me more about this verbatim input stuff!</h3>
|
||||
<blockquote><p>When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b> (if you're not at a prompt, you'll get the message "Verbatim Input" on the status bar), then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, if Unicode support is enabled (see section <a href="#5.3">5.3</a>), you can press <b>Meta-V</b> and then type a six-digit hexadecimal code (from 000000 to 10FFFF, case-insensitive), and the character with the corresponding value will be inserted. The status bar will change to "Unicode Input: ......" when you do this.</p></blockquote>
|
||||
<h3><a name="3.9"></a>3.9. How do I make a .nanorc file that will be read when I start nano?</h3>
|
||||
<blockquote><p>It's not hard at all! But, your nano must <b>not</b> have been compiled with <b>--disable-nanorc</b>. Then simply copy the <b>sample.nanorc</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax of the file is simple. Flags are turned on and off by using the words <b>set</b> and <b>unset</b> plus the long option name for the feature. For example, "set nowrap" or "set smarthome".</p></blockquote>
|
||||
<h3 id="3.8">3.8. How do I make a .nanorc file that will be read when I start nano?</h3>
|
||||
<blockquote><p>It's not hard at all! Simply copy the <b>sample.nanorc</b> from the doc/ directory in the nano source package (or from /usr/doc/nano on your system) to <b>.nanorc</b> in your home directory, and then edit it. If you didn't get a sample nanorc, the syntax of the file is simple: features are turned on and off by using the words <b>set</b> and <b>unset</b> followed by the long option name of the feature (see <b>man nanorc</b> for the full list of options). For example, "set quickblank" or "set smarthome". Of course, for this to work, your nano must <b>not</b> have been compiled with <b>--disable-nanorc</b>.</p></blockquote>
|
||||
<h3 id="3.9">3.9. Why does my self-compiled nano not read /etc/nanorc?</h3>
|
||||
<blockquote><p>By default (see <a href="#3.3">3.3</a>), nano gets installed into /usr/local. This also means that, at startup, nano reads <b>/usr/local/etc/nanorc</b> instead of <b>/etc/nanorc</b>. You can make a symlink from the former to the latter if you want your self-compiled nano to read the same nanorc as the system-installed nano. Or you can simply configure your nano with <b>--sysconfdir=/etc</b>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="4"></a>4. Running</h1>
|
||||
<h3><a name="4.1"></a>4.1. How do I open a file with a name beginning with '+' from the command line?</h3>
|
||||
<blockquote><p>If a command-line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number, and the latter is always treated as a filename. If a command-line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
|
||||
<p>To open '+filename.txt' starting on line 1: <b>nano +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 10: <b>nano +10 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 1, column 20: <b>nano +,20 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 10, column 20: <b>nano +10,20 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 40 (if nano has been compiled with multibuffer support): <b>nano +1 +filename.txt +40 filename.txt</b></p></blockquote>
|
||||
<h3><a name="4.2"></a>4.2. Ack! My Backspace/Delete/Enter/Meta/double bucky key doesn't seem to work! What can I do?</h3>
|
||||
<blockquote><p>Try setting your $TERM variable to 'vt100'. nano doesn't yet support every term entry under the sun.</p>
|
||||
<p>Bourne shell users (bash and sh): <b>export TERM=vt100</b><br>
|
||||
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
|
||||
<h3><a name="4.3"></a>4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?</h3>
|
||||
<blockquote><p>You can use the <b>-K</b> or <b>--rawsequences</b> option on the command line, or add the line <b>set rawsequences</b> to your .nanorc. However, nano's mouse support will be disabled if you do any of these things.</p></blockquote>
|
||||
<h3><a name="4.4"></a>4.4. With what keystroke can I paste text from the clipboard into nano?</h3>
|
||||
<blockquote><p>In most desktop environments <b>Shift+Insert</b> will paste the contents of the clipboard.</p></blockquote>
|
||||
<h3><a name="4.5"></a>4.5. How do I select text for or paste text from the clipboard when nano's mouse support is turned on?</h3>
|
||||
<h1 id="4">4. Running</h1>
|
||||
<h3 id="4.1">4.1. Alt+Up does nothing on a Linux console. How can I make it scroll?</h3>
|
||||
<blockquote><p>On Debian and its derivatives, the <b>Alt+Up</b> keystroke on a Linux console
|
||||
produces by default a 'KeyboardSignal', which normally does absolutely nothing and is useless
|
||||
for the average user. To get the keystroke to do what it ought to do (scroll the viewport
|
||||
one row up), run this in a Linux console:</p>
|
||||
<p class="indented"><b>dumpkeys --full | sed s/KeyboardSignal/Up/ | sudo loadkeys -</b></p>
|
||||
<p>You will need to run this command whenever you first switch to a Linux console.</p>
|
||||
<p>Or you can (as root) execute the following little script just once:</p>
|
||||
<p class="indented"><b>for file in /etc/console-setup/cached*.kmap.gz; do<br>
|
||||
gunzip $file;<br>
|
||||
sed -i 's/KeyboardSignal/Up/' ${file%.gz};<br>
|
||||
gzip ${file%.gz};<br>
|
||||
done</b></p></blockquote>
|
||||
<h3 id="4.2">4.2. How can I make Ctrl+Shift+Left/Right select words on urxvt?</h3>
|
||||
<blockquote><p>The urxvt terminal emulator produces non-standard escape sequences for the modified cursor keys. These deviant sequences are not listed in the terminfo database, which means that ncurses does not recognize them. The easiest way around this is to tell urxvt to produce xterm-compatible escape sequences for the relevant keystrokes. To achieve this, add the following lines to your ~/.Xresources file:</p>
|
||||
<pre>
|
||||
URxvt.iso14755_52: False
|
||||
|
||||
URxvt.keysym.C-S-Up: \033[1;6A
|
||||
URxvt.keysym.C-S-Down: \033[1;6B
|
||||
URxvt.keysym.C-S-Right: \033[1;6C
|
||||
URxvt.keysym.C-S-Left: \033[1;6D
|
||||
|
||||
URxvt.keysym.M-Up: \033[1;3A
|
||||
URxvt.keysym.M-Down: \033[1;3B
|
||||
URxvt.keysym.M-Right: \033[1;3C
|
||||
URxvt.keysym.M-Left: \033[1;3D
|
||||
|
||||
URxvt.keysym.M-Home: \033[1;3H
|
||||
URxvt.keysym.M-End: \033[1;3F
|
||||
|
||||
URxvt.keysym.M-Insert: \033[2;3~
|
||||
URxvt.keysym.M-Delete: \033[3;3~
|
||||
|
||||
URxvt.keysym.M-Page_Up: \033[5;3~
|
||||
URxvt.keysym.M-Page_Down: \033[6;3~
|
||||
URxvt.keysym.S-Page_Up: \033[5;2~
|
||||
URxvt.keysym.S-Page_Down: \033[6;2~</pre>
|
||||
<p>Then run <b>xrdb ~/.Xresources</b> and restart your urxvt terminal. Now <b>Ctrl+Shift+Left</b> and <b>Ctrl+Shift+Right</b> will select words, <b>Alt+Up</b> and <b>Alt+Down</b> will scroll the text without moving the cursor, and several such things more.</p></blockquote>
|
||||
<h3 id="4.3">4.3. How do I remove an unwanted Byte Order Mark?</h3>
|
||||
<blockquote><p>To check whether a file contains a Byte Order Mark (BOM), open the file and type <b>Ctrl+Home</b>. If there is a BOM, the status bar will tell you so. Now type <b>Delete</b> to remove the BOM, and <b>^S</b> to save the file.</p>
|
||||
<p>If you've accidentally deleted a Byte Order Mark from a file that needs it, and you want to restore it, then type: <b>Ctrl+Home Alt+V feff Enter</b>. Verify that the BOM is back with <b>Ctrl+Home</b>, and save the file with <b>^S</b>. (Note that on Unix, files should not contain a BOM.)</p></blockquote>
|
||||
<h3 id="4.4">4.4. Where did Ctrl+T in the Search menu go?</h3>
|
||||
<blockquote><p>Actually, the <b>Ctrl+T</b> toggle is still there — it's just not listed in the help lines nor in the help text, and the function it executes cannot be rebound to another key. If you do want to use another key, you can emulate the rebinding with something like this in your .nanorc:</p>
|
||||
<pre>
|
||||
bind ^E "{cancel}{gotoline}" search
|
||||
bind ^E "{cancel}{whereis}" gotoline</pre>
|
||||
<p>But since forever there are also direct keystrokes for jumping to a line number: <b>Ctrl+/</b> and <b>Alt+G</b> in the main menu.</p></blockquote>
|
||||
<h3 id="4.5">4.5. How do I select text for or paste text from the clipboard when nano's mouse support is turned on?</h3>
|
||||
<blockquote><p>Try holding down the Shift key and selecting or pasting the text as you normally would.</p></blockquote>
|
||||
<h3><a name="4.6"></a>4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?</h3>
|
||||
<blockquote><p>You have the <i>autoindent</i> feature turned on. Hit <b>Meta-I</b> to turn it off, paste your text, and then hit <b>Meta-I</b> again to turn it back on.</p></blockquote>
|
||||
<h3><a name="4.7"></a>4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?</h3>
|
||||
<blockquote><p>When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are <b>^J</b>s, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: <b>unbind ^J main</b> or <b>bind ^J enter main</b>, depending on whether the paste contains CR + LF or only LF.</p></blockquote>
|
||||
<h3><a name="4.8"></a>4.8. I've compiled nano with color support, but I don't see any color when I run it!</h3>
|
||||
<h3 id="4.6">4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?</h3>
|
||||
<blockquote><p>You have the <i>autoindent</i> feature turned on. Hit <b>Meta-I</b> to turn it off, paste your text, and then hit <b>Meta-I</b> again to turn it back on.</p>
|
||||
<p><i>Update:</i> Since version 4.8, nano suppresses auto-indentation during a paste (when your terminal understands <a href="https://en.wikipedia.org/wiki/Bracketed-paste">bracketed pastes</a>), so you no longer need to toggle it off and on manually.</p></blockquote>
|
||||
<h3 id="4.7">4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?</h3>
|
||||
<blockquote><p>When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are <b>^J</b>s, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: <b>unbind ^J main</b> or <b>bind ^J enter main</b>, depending on whether the paste contains CR + LF or only LF.</p>
|
||||
<p><i>Update:</i> Since version 4.8, nano ignores linefeed characters in a paste (when your terminal understands <a href="https://en.wikipedia.org/wiki/Bracketed-paste">bracketed pastes</a>), so you no longer need the above workaround.</p></blockquote>
|
||||
<h3 id="4.8">4.8. I've compiled nano with color support, but I don't see any color when I run it!</h3>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Several example configurations are in the <b>syntax/</b> subdirectory of the nano source, which are normally installed to <b>/usr/local/share/nano/</b>. To enable all of them, uncomment the line <b># include "/usr/local/share/nano/*.nanorc"</b> in your nanorc. See also section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||
<h3><a name="4.9"></a>4.9. How do I make nano my default editor (in Pine, mutt, etc.)?</h3>
|
||||
<h3 id="4.9">4.9. How do I make nano my default editor (in Pine, mutt, git, ...)?</h3>
|
||||
<blockquote><p>You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your <b>.bashrc</b> if you use bash (or <b>.zshrc</b> if you believe in zsh):</p>
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
|
||||
<p>or, if you use tcsh, put this in your <b>.cshrc</b> file:</p>
|
||||
<p><b>setenv EDITOR /usr/local/bin/nano</b></p>
|
||||
<p class="indented"><b>export EDITOR=/usr/local/bin/nano</b></p>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you log in. So log out and back in again.</p>
|
||||
<p>Then, on top of that, if you use Pine, you must go into setup (type <b>S</b> at the main menu), and then configure (type <b>C</b>). Hit Enter on the lines that say:</p>
|
||||
<p><b>[ ] enable-alternate-editor-cmd</b><br>
|
||||
<p class="indented"><b>[ ] enable-alternate-editor-cmd</b><br>
|
||||
<b>[ ] enable-alternate-editor-implicitly</b></p>
|
||||
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).</p>
|
||||
<p>If you're a mutt user, you should see an effect immediately the next time you log in. No further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your <b>.muttrc</b>:</p>
|
||||
<p><b>my_hdr X-Composer: nano-x.y</b></p>
|
||||
<p>Again, replace x.y with the version of nano you use.</p></blockquote>
|
||||
<p class="indented"><b>my_hdr X-Composer: nano-x.y</b></p>
|
||||
<p>Again, replace x.y with the version of nano you use.</p>
|
||||
<p>To use nano to edit your git commit messages, you can run:</p>
|
||||
<p class="indented"><b>git config --global core.editor "nano --guide=74 --nohelp +1"</b></p>
|
||||
<p>Note the <b>+1</b> at the end — it makes nano start always at the top of the edit window. The guidestripe helps you keep the text within a reasonable width.</blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="5"></a>5. Internationalization</h1>
|
||||
<h3><a name="5.1"></a>5.1. There's no translation for my language!</h3>
|
||||
<h1 id="5">5. Internationalization</h1>
|
||||
<h3 id="5.1">5.1. There's no translation for my language!</h3>
|
||||
<blockquote><p>In June 2001, GNU nano entered the <a href="https://translationproject.org/html/welcome.html">Translation Project</a> and since then, translations should be managed from there.</p>
|
||||
<p>If there isn't a translation for your language, you could ask <a href="https://translationproject.org/team/">your language team</a> to translate nano, or better still, join that team and do it yourself. Joining a team is easy. You just need to ask the team leader to add you, and then send a <a href="https://translationproject.org/disclaim.txt">translation disclaimer to the FSF</a> (this is necessary as nano is an official GNU package, but it does <b>not</b> mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).</p>
|
||||
<p>In any case, translating nano is easy. Just grab the latest <b>nano.pot</b> file listed on <a href="https://translationproject.org/domain/nano.html">nano's page</a> at the TP, and translate each <b>msgid</b> line into your native language on the <b>msgstr</b> line. When you're done, you should send it to the TP's central PO-file repository.</p></blockquote>
|
||||
<h3><a name="5.2"></a>5.2. I don't like the translation for <x> in my language. How can I fix it?</h3>
|
||||
<h3 id="5.2">5.2. I don't like the translation for <x> in my language. How can I fix it?</h3>
|
||||
<blockquote><p>The best way is to send an e-mail with your suggested corrections to the team's mailing list. The address is mentioned in the <code>Language-Team:</code> field in the relevant PO file. The team leader or the assigned translator can then make the changes reach the nano-devel list.</p></blockquote>
|
||||
<h3><a name="5.3"></a>5.3. What is the status of Unicode support?</h3>
|
||||
<h3 id="5.3">5.3. What is the status of Unicode support?</h3>
|
||||
<blockquote><p>Unicode should be fully usable nowadays. When the encoding of your terminal is set to UTF-8, and your locale (mainly the LANG environment variable) is UTF-8 too, then you should be able to read, enter and save Unicode text.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="6"></a>6. Advocacy and Licensing</h1>
|
||||
<h3><a name="6.1"></a>6.1. Why should I use nano instead of Pico?</h3>
|
||||
<h1 id="6">6. Advocacy and Licensing</h1>
|
||||
<h3 id="6.1">6.1. Why should I use nano instead of Pico?</h3>
|
||||
<blockquote><p>If you want features like undo/redo, syntax highlighting, line numbers, soft-wrapping, opening multiple files at once, an interface localized to your language, or search and replace with support for regular expressions, then you want nano.</p></blockquote>
|
||||
<h3><a name="6.2"></a>6.2. Why should I use Pico instead of nano?</h3>
|
||||
<h3 id="6.2">6.2. Why should I use Pico instead of nano?</h3>
|
||||
<blockquote><p>If you use your editor only to write emails or other texts and have no need for the above-mentioned features, then Pico will do fine for you.</p></blockquote>
|
||||
<h3><a name="6.3"></a>6.3. What is so bad about the older Pine license?</h3>
|
||||
<h3 id="6.3">6.3. What is so bad about the older Pine license?</h3>
|
||||
<blockquote><p>The U of W license for older versions of Pine and Pico is not considered truly Free Software according to both the Free Software Foundation and the <a href="https://www.debian.org/social_contract#guidelines">Debian Free Software Guidelines</a>. The main problem regards the limitations on distributing derived works: according to UW, you can distribute their software, and you can modify it, but you can not do both, i.e. distribute modified binaries.</p></blockquote>
|
||||
<h3><a name="6.4"></a>6.4. Okay, well, what mail program should I use then?</h3>
|
||||
<h3 id="6.4">6.4. Okay, well, what mail program should I use then?</h3>
|
||||
<blockquote><p>If you are looking to use a Free Software program similar to Pine, and Emacs is not your thing, you should definitely take a look at <a href="http://www.mutt.org/">mutt</a>. It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that allows you to use the same keystrokes as Pine would to send and receive mail. It's also under the GNU General Public License, version 2.0.</p>
|
||||
<p>Of course, due to the license change you can now use the <a href="http://www.washington.edu/alpine/">Alpine distribution</a> of PINE as it is now considered Free Software, but you would be sacrificing many of nano's features to do so.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
<h1><a name="7"></a>7. Miscellaneous</h1>
|
||||
<h3><a name="7.1"></a>7.1. Where can I ask questions or send suggestions?</h3>
|
||||
<h1 id="7">7. Miscellaneous</h1>
|
||||
<h3 id="7.1">7.1. Where can I ask questions or send suggestions?</h3>
|
||||
<blockquote><p>There are three mailing lists for nano hosted at <a href="https://savannah.gnu.org/">Savannah</a>: info-nano, help-nano and nano-devel. info-nano is a very low traffic list where new versions of nano are announced (surprise!). help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
|
||||
<p>info-nano - <a href="https://lists.gnu.org/mailman/listinfo/info-nano/">https://lists.gnu.org/mailman/listinfo/info-nano/</a><br>
|
||||
help-nano - <a href="https://lists.gnu.org/mailman/listinfo/help-nano/">https://lists.gnu.org/mailman/listinfo/help-nano/</a><br>
|
||||
nano-devel - <a href="https://lists.gnu.org/mailman/listinfo/nano-devel/">https://lists.gnu.org/mailman/listinfo/nano-devel/</a></p></blockquote>
|
||||
<h3><a name="7.2"></a>7.3. How do I submit a bug report or patch?</h3>
|
||||
<h3 id="7.2">7.3. How do I submit a bug report or patch?</h3>
|
||||
<blockquote>
|
||||
<p>The best way to submit bugs is through the <a href="https://savannah.gnu.org/bugs/?group=nano">Savannah bug tracker</a>, as you can check whether the bug you are reporting has already been submitted, and it makes it easier for the maintainers to keep track of them.
|
||||
<p>You can submit patches for nano via <a href="https://savannah.gnu.org/patch/?group=nano">Savannah's patch manager</a>.</p></blockquote>
|
||||
<h3><a name="7.3"></a>7.3. I want to send the development team a big load of cash (or just a thank you).</h3>
|
||||
<h3 id="7.3">7.3. I want to send the development team a big load of cash (or just a thank you).</h3>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="https://savannah.gnu.org/bugs/?group=nano">bug</a> in the program or implement a <a href="https://nano-editor.org/dist/latest/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<h3><a name="7.4"></a>7.4. How do I join the development team?</h3>
|
||||
<h3 id="7.4">7.4. How do I join the development team?</h3>
|
||||
<blockquote><p>The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two, and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given write access after a while. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.</p></blockquote>
|
||||
<h3><a name="7.5"></a>7.5. Can I have write access to the git tree?</h3>
|
||||
<h3 id="7.5">7.5. Can I have write access to the git tree?</h3>
|
||||
<blockquote><p>Re-read section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
|
||||
<hr width="100%">
|
||||
|
||||
|
||||
423
doc/nano.1
423
doc/nano.1
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc.
|
||||
.\" Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This document is dual-licensed. You may distribute and/or modify it
|
||||
.\" under the terms of either of the following licenses:
|
||||
@@ -16,35 +16,28 @@
|
||||
.\" Documentation License along with this program. If not, see
|
||||
.\" <https://www.gnu.org/licenses/>.
|
||||
.\"
|
||||
.TH NANO 1 "version 4.7" "December 2019"
|
||||
.TH NANO 1 "July 2026" "GNU nano 9.2"
|
||||
|
||||
.SH NAME
|
||||
nano \- Nano's ANOther editor, inspired by Pico
|
||||
nano \- Nano's ANOther text editor, inspired by Pico
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B nano
|
||||
.RI [ options "] [[\fB+" line [\fB, column "]] " file ]...
|
||||
.sp
|
||||
.BR nano " [" \fIoptions "] [[" + [ crCR ]( / | ? ) \fIstring "] " \fIfile ]...
|
||||
|
||||
.SH NOTICE
|
||||
Starting with version 4.0, \fBnano\fR no longer hard-wraps an overlong
|
||||
line by default. It further uses smooth scrolling by default, and by
|
||||
default includes the line below the title bar into the editing area.
|
||||
.sp
|
||||
If you want the old, Pico behavior back, you can use \fB\-\-breaklonglines\fR,
|
||||
\fB\-\-jumpyscrolling\fR, and \fB\-\-emptyline\fR (or \fB\-bje\fR for short).
|
||||
.BR nano " [" \fIoptions "] [[" + [ crCR ]{ / | ? } \fIstring "] " \fIfile ]...
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBnano\fP is a small and friendly editor. It copies the look and feel
|
||||
of Pico, but is free software, and implements several features that Pico
|
||||
\fBnano\fR is a small and friendly text editor. It copies the look and feel
|
||||
of Pico, but is free software, and implements a few features that Pico
|
||||
lacks, such as: opening multiple files, scrolling per line, undo/redo,
|
||||
syntax coloring, line numbering, and soft-wrapping overlong lines.
|
||||
.sp
|
||||
When giving a filename on the command line, the cursor can be put on a
|
||||
specific line by adding the line number with a plus sign (\fB+\fR) before
|
||||
the filename, and even in a specific column by adding it with a comma.
|
||||
(Negative numbers count from the end of the file or line.)
|
||||
Negative numbers count from the end of the file or line.
|
||||
.sp
|
||||
The cursor can be put on the first or last occurrence of a specific string
|
||||
by specifying that string after \fB+/\fR or \fB+?\fR before the filename.
|
||||
The string can be made case sensitive and/or caused to be interpreted as a
|
||||
@@ -52,7 +45,7 @@ regular expression by inserting \fBc\fR and/or \fBr\fR after the \fB+\fR sign.
|
||||
These search modes can be explicitly disabled by using the uppercase variant
|
||||
of those letters: \fBC\fR and/or \fBR\fR. When the string contains spaces,
|
||||
it needs to be enclosed in quotes. To give an example: to open a file at
|
||||
the first occurrence of the word "Foo", one would do:
|
||||
the first occurrence of the word "Foo", you would do:
|
||||
.sp
|
||||
.RS 4
|
||||
.BI "nano +c/Foo " file
|
||||
@@ -61,58 +54,107 @@ the first occurrence of the word "Foo", one would do:
|
||||
As a special case: if instead of a filename a dash (\fB\-\fR) is given,
|
||||
\fBnano\fR will read data from standard input.
|
||||
|
||||
.SH NOTICES
|
||||
Since version 9.0, all lines are scrolled horizontally together
|
||||
(when the cursor approaches the edge), by just the amount needed,
|
||||
instead of scrolling only the current line by a large step.
|
||||
If you prefer the old behavior, you can use \fB\-\-\%solo\fR on the
|
||||
command line or \fBset \%solosidescroll\fR in your \fInanorc\fR.
|
||||
.sp
|
||||
Also since version 9.0, keystrokes \fBM\-<\fR and \fBM\->\fR have
|
||||
been reassigned to the \fB\%scrollleft\fR and \fB\%scrollright\fR functions.
|
||||
If you want those keystrokes to do what they did before version 9.0,
|
||||
add these two lines at the end of your \fInanorc\fR file:
|
||||
.sp
|
||||
.RS 4
|
||||
.B bind M\-< prevbuf main
|
||||
.br
|
||||
.B bind M\-> nextbuf main
|
||||
.RE
|
||||
.sp
|
||||
Since version 8.0, to be newcomer friendly, \fB^F\fR starts a forward search,
|
||||
\fB^B\fR starts a backward search, \fBM\-F\fR searches the next occurrence
|
||||
forward, and \fBM\-B\fR searches the next occurrence backward. If you want
|
||||
those keystrokes to do what they did before version 8.0, add the following
|
||||
four lines at the end of your \fInanorc\fR file:
|
||||
.sp
|
||||
.RS 4
|
||||
.B bind ^F forward main
|
||||
.br
|
||||
.B bind ^B back main
|
||||
.br
|
||||
.B bind M\-F formatter main
|
||||
.br
|
||||
.B bind M\-B linter main
|
||||
.RE
|
||||
.sp
|
||||
|
||||
.SH EDITING
|
||||
Entering text and moving around in a file is straightforward: typing the
|
||||
Entering text and moving around in a file are straightforward: typing the
|
||||
letters and using the normal cursor movement keys. Commands are entered
|
||||
by using the Control (^) and the Alt or Meta (M\-) keys.
|
||||
Typing \fB^K\fR deletes the current line and puts it in the cutbuffer.
|
||||
Consecutive \fB^K\fRs will put all deleted lines together in the cutbuffer.
|
||||
Any cursor movement or executing any other command will cause the next
|
||||
\fB^K\fR to overwrite the cutbuffer. A \fB^U\fR will paste the current
|
||||
Consecutive \fB^K\fRs put all deleted lines together in the cutbuffer.
|
||||
Any cursor movement or executing any other command causes the next
|
||||
\fB^K\fR to overwrite the cutbuffer. A \fB^U\fR pastes the current
|
||||
contents of the cutbuffer at the current cursor position.
|
||||
.sp
|
||||
When a more precise piece of text needs to be cut or copied, one can mark
|
||||
its start with \fB^6\fR, move the cursor to its end (the marked text will be
|
||||
highlighted), and then use \fB^K\fR to cut it, or \fBM\-6\fR to copy it to the
|
||||
cutbuffer. One can also save the marked text to a file with \fB^O\fR, or
|
||||
spell check it with \fB^T\fR.
|
||||
When a more precise piece of text needs to be cut or copied, you can mark
|
||||
its start with \fB^6\fR, move the cursor to its end (the marked text is
|
||||
highlighted), and then use \fB^K\fR to cut it, or \fBM\-6\fR to copy it to
|
||||
the cutbuffer. You can also save the marked text to a file with \fB^O\fR,
|
||||
or spell check it with \fB^T^T\fR.
|
||||
.sp
|
||||
On some terminals, text can be selected also by holding down Shift while
|
||||
using the arrow keys. Holding down the Ctrl or Alt key too will increase
|
||||
using the arrow keys. Holding down the Ctrl or Alt key too increases
|
||||
the stride.
|
||||
Any cursor movement without Shift being held will cancel such a selection.
|
||||
Any cursor movement without Shift being held cancels such a selection.
|
||||
.sp
|
||||
Any valid Unicode code point can be inserted into the buffer by typing
|
||||
\fBM\-V\fR followed by the hexadecimal digits of the code point (concluded
|
||||
with \fB<Space>\fR or \fB<Enter>\fR when it are fewer than six digits).
|
||||
A literal control code (except \fB^J\fR) can be inserted by typing
|
||||
\fBM\-V\fR followed by the pertinent keystroke.
|
||||
.sp
|
||||
The two lines at the bottom of the screen show some important commands;
|
||||
the built-in help (\fB^G\fR) lists all the available ones.
|
||||
The default key bindings can be changed via a \fInanorc\fR file -- see
|
||||
The default key bindings can be changed via a \fInanorc\fR file \[em] see
|
||||
.BR nanorc (5).
|
||||
.sp
|
||||
With \fB^S^X\fR you can save the buffer and exit from \fBnano\fR.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BR \-A ", " \-\-smarthome
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
very beginning of non-whitespace characters on a line, the cursor will
|
||||
jump to that beginning (either forwards or backwards). If the cursor is
|
||||
already at that position, it will jump to the true beginning of the
|
||||
line.
|
||||
very beginning of non-whitespace characters on a line, the cursor jumps
|
||||
to that beginning (either forwards or backwards). If the cursor is
|
||||
already at that position, it jumps to the true beginning of the line.
|
||||
.TP
|
||||
.BR \-B ", " \-\-backup
|
||||
When saving a file, back up the previous version of it, using the current
|
||||
filename suffixed with a tilde (\fB~\fP).
|
||||
filename suffixed with a tilde (\fB\[ti]\fR).
|
||||
.TP
|
||||
.BR \-C\ \fIdirectory ", " \-\-backupdir= \fIdirectory
|
||||
Make and keep not just one backup file, but make and keep a uniquely
|
||||
numbered one every time a file is saved -- when backups are enabled (\fB\-B\fR).
|
||||
The uniquely numbered files are stored in the specified \fIdirectory\fR.
|
||||
.BI \-C " directory\fR, " \-\-backupdir= directory
|
||||
Make and keep not just one backup file, but make and keep a uniquely numbered
|
||||
one every time a file is saved \[em] when backups are enabled (\fB\-B\fR).
|
||||
The uniquely numbered files are stored in the specified \fI\%directory\fR.
|
||||
.TP
|
||||
.BR \-D ", " \-\-boldtext
|
||||
Use bold text instead of reverse video text.
|
||||
For the interface, use bold instead of reverse video.
|
||||
This can be overridden for specific elements by setting the options
|
||||
\fB\%titlecolor\fR, \fB\%statuscolor\fR, \fB\%promptcolor\fR,
|
||||
\fB\%minicolor\fR, \fB\%keycolor\fR, \fB\%numbercolor\fR, and/or
|
||||
\fB\%selectedcolor\fR in your \fInanorc\fR file. See \fBnanorc\fR(5).
|
||||
.TP
|
||||
.BR \-E ", " \-\-tabstospaces
|
||||
Convert typed tabs to spaces.
|
||||
Convert each typed tab to spaces \[em] to the number of spaces
|
||||
that a tab at that position would take up.
|
||||
(Note: pasted tabs are not converted.)
|
||||
.TP
|
||||
.BR \-F ", " \-\-multibuffer
|
||||
.BR \-F ", " \-\-newbuffer
|
||||
Read a file into a new buffer by default.
|
||||
(The old form of this option, \fB\-\-\%multibuffer\fR, is deprecated.)
|
||||
.TP
|
||||
.BR \-G ", " \-\-locking
|
||||
Use vim-style file locking when editing files.
|
||||
@@ -124,16 +166,18 @@ executed commands, so they can be easily reused in later sessions.
|
||||
.BR \-I ", " \-\-ignorercfiles
|
||||
Don't look at the system's \fInanorc\fR nor at the user's \fInanorc\fR.
|
||||
.TP
|
||||
.BR \-J\ \fInumber ", " \-\-guidestripe= \fInumber
|
||||
.BI \-J " number\fR, " \-\-guidestripe= number
|
||||
Draw a vertical stripe at the given column, to help judge the width of the
|
||||
text. (The color of the stripe can be changed with \fBset stripecolor\fR
|
||||
text. (The color of the stripe can be changed with \fBset \%stripecolor\fR
|
||||
in your \fInanorc\fR file.)
|
||||
.TP
|
||||
.BR \-K ", " \-\-rawsequences
|
||||
Interpret escape sequences directly (instead of asking \fBncurses\fR to
|
||||
translate them). If you need this option to get your keyboard to work
|
||||
properly, please report a bug. Using this option disables \fBnano\fR's
|
||||
mouse support.
|
||||
Interpret escape sequences directly, instead of asking \fI\%ncurses\fR
|
||||
to translate them. (If you need this option to get some keys to work
|
||||
properly, it means that the \fI\%terminfo\fR terminal description that
|
||||
is used does not fully match the actual behavior of your terminal.
|
||||
This can happen when you ssh into a BSD machine, for example.)
|
||||
Using this option disables \fBnano\fR's mouse support.
|
||||
.TP
|
||||
.BR \-L ", " \-\-nonewlines
|
||||
Don't automatically add a newline when a text does not end with one.
|
||||
@@ -144,46 +188,60 @@ Snip trailing whitespace from the wrapped line when automatic
|
||||
hard-wrapping occurs or when text is justified.
|
||||
.TP
|
||||
.BR \-N ", " \-\-noconvert
|
||||
Disable automatic conversion of files from DOS/Mac format.
|
||||
Disable automatic conversion of files from DOS format.
|
||||
.TP
|
||||
.BR \-O ", " \-\-morespace
|
||||
Obsolete and ignored option, since the line below the title bar is included
|
||||
into the editing space by default. If you prefer to keep this line blank,
|
||||
use \fB\-e\fR or \fB\-\-emptyline\fR.
|
||||
.BR \-O ", " \-\-bookstyle
|
||||
When justifying, treat any line that starts with whitespace as the
|
||||
beginning of a paragraph (unless auto-indenting is on).
|
||||
.TP
|
||||
.BR \-P ", " \-\-positionlog
|
||||
For the 200 most recent files, log the last position of the cursor,
|
||||
and place it at that position again upon reopening such a file.
|
||||
Also save and restore the positions of any anchors.
|
||||
.TP
|
||||
.BR "\-Q ""\fIregex\fB""" ", " "\-\-quotestr=""" \fIregex """
|
||||
.BI "\-Q """ regex\fB"\fR, " \-\-quotestr=""" regex """"
|
||||
Set the regular expression for matching the quoting part of a line.
|
||||
The default value is \fB"^([\ \\t]*([!#%:;>|}]|//))+"\fP.
|
||||
(Note that \fB\\t\fP stands for an actual Tab.)
|
||||
The default value is "\fB^([\ \\t]*([!#%:;>|}]|//))+\fR".
|
||||
(Note that \fB\\t\fR stands for an actual Tab.)
|
||||
This makes it possible to rejustify blocks of quoted text when composing
|
||||
email, and to rewrap blocks of line comments when writing source code.
|
||||
.TP
|
||||
.BR \-R ", " \-\-restricted
|
||||
Restricted mode: don't read or write to any file not specified on the
|
||||
command line. This means: don't read or write history files;
|
||||
don't allow suspending; don't allow spell checking;
|
||||
don't allow a file to be appended to, prepended to, or saved under a
|
||||
different name if it already has one; and don't make backup files.
|
||||
Restricted mode can also be activated by invoking \fBnano\fP
|
||||
with any name beginning with 'r' (e.g. "rnano").
|
||||
Read and write only the \fIfile\fR (or files) specified on the command line.
|
||||
This means: don't read or write the history files; don't allow suspending;
|
||||
don't allow spell checking; don't allow executing any command in the shell;
|
||||
don't allow the current buffer to be saved under a different name; don't
|
||||
allow appending or prepending to any file; and don't make backup files.
|
||||
.sp
|
||||
As an exception, before the specified file or files, the \fInanorc\fR files
|
||||
are read, to allow customization. If customization should not be allowed,
|
||||
use option \fB\-I\fR (\fB\-\-\%ignorercfiles\fR) as well.
|
||||
.sp
|
||||
When no \fIfile\fR is specified on the command line, restricted mode
|
||||
allows you to save the contents that you type into the new buffer
|
||||
under any name, except that existing files may not be overwritten.
|
||||
If the places where this new file may be created should be limited,
|
||||
then use option \fB\-o\fR (\fB\-\-\%operatingdir\fR) as well.
|
||||
.sp
|
||||
Restricted mode can also be activated by invoking \fBnano\fR
|
||||
with a name beginning with 'r' (for example: \fBrnano\fR).
|
||||
.TP
|
||||
.BR \-S ", " \-\-smooth
|
||||
Obsolete and ignored option, since smooth scrolling has become the default.
|
||||
If you prefer the chunk-by-chunk scrolling behavior,
|
||||
use \fB\-j\fR or \fB\-\-jumpyscrolling\fR.
|
||||
.BR \-S ", " \-\-softwrap
|
||||
Display over multiple screen rows lines that exceed the screen's width.
|
||||
(You can make this soft-wrapping occur at whitespace instead of rudely at
|
||||
the screen's edge, by using also \fB\-\-\%atblanks\fR.)
|
||||
.TP
|
||||
.BR \-T\ \fInumber ", " \-\-tabsize= \fInumber
|
||||
Set the size (width) of a tab to \fInumber\fP columns. The value of
|
||||
\fInumber\fP must be greater than 0. The default value is 8.
|
||||
.BI \-T " number\fR, " \-\-tabsize= number
|
||||
Set the size (width) of a tab to \fI\%number\fR columns. The value of
|
||||
\fI\%number\fR must be greater than 0. The default value is \fB8\fR.
|
||||
.TP
|
||||
.BR \-U ", " \-\-quickblank
|
||||
Do quick status-bar blanking: status-bar messages will disappear after 1
|
||||
keystroke instead of 25. Note that option \fB\-c\fR (\fB\-\-constantshow\fR)
|
||||
overrides this.
|
||||
Make status-bar messages disappear after 1 keystroke instead of after 20.
|
||||
Note that option \fB\-c\fR (\fB\-\-\%constantshow\fR) overrides this.
|
||||
When option \fB\-\-\%minibar\fR or \fB\-\-\%zero\fR is in effect,
|
||||
\fB\-\-\%quickblank\fR makes a message disappear after
|
||||
0.8 seconds instead of after the default 1.5 seconds.
|
||||
.
|
||||
.TP
|
||||
.BR \-V ", " \-\-version
|
||||
Show the current version number and exit.
|
||||
@@ -192,14 +250,14 @@ Show the current version number and exit.
|
||||
Detect word boundaries differently by treating punctuation
|
||||
characters as part of a word.
|
||||
.TP
|
||||
.BR "\-X ""\fIcharacters\fB""" ", " "\-\-wordchars=""" \fIcharacters """
|
||||
.BI "\-X """ characters\fB"\fR, " \-\-wordchars=""" characters """"
|
||||
Specify which other characters (besides the normal alphanumeric ones)
|
||||
should be considered as part of a word. This overrides option
|
||||
\fB\-W\fR (\fB\-\-wordbounds\fR).
|
||||
should be considered as part of a word. When using this option, you
|
||||
probably want to omit \fB\-W\fR (\fB\-\-\%wordbounds\fR).
|
||||
.TP
|
||||
.BR \-Y\ \fIname ", " \-\-syntax= \fIname
|
||||
.BI \-Y " name\fR, " \-\-syntax= name
|
||||
Specify the name of the syntax highlighting to use from among the ones
|
||||
defined in the \fInanorc\fP files.
|
||||
defined in the \fInanorc\fR files.
|
||||
.TP
|
||||
.BR \-Z ", " \-\-zap
|
||||
Let an unmodified Backspace or Delete erase the marked region
|
||||
@@ -210,13 +268,16 @@ When doing soft line wrapping, wrap lines at whitespace
|
||||
instead of always at the edge of the screen.
|
||||
.TP
|
||||
.BR \-b ", " \-\-breaklonglines
|
||||
Automatically hard-wrap the current line when it becomes overlong.
|
||||
(This option is the opposite of \fB\-w\fR (\fB\-\-nowrap\fR) --
|
||||
Automatically hard-wrap the current line when it becomes overlong,
|
||||
that is: when it becomes wider than the value given with \fB\-r\fR
|
||||
(\fB\-\-fill\fR). The default value for \fB\-r\fR is the terminal's
|
||||
width minus eight.
|
||||
(This option is the opposite of \fB\-w\fR (\fB\-\-\%nowrap\fR) \[em]
|
||||
the last one given takes effect.)
|
||||
.TP
|
||||
.BR \-c ", " \-\-constantshow
|
||||
Constantly show the cursor position on the status bar.
|
||||
Note that this overrides option \fB\-U\fR (\fB\-\-quickblank\fR).
|
||||
Constantly report the cursor position on the status bar.
|
||||
Note that this overrides option \fB\-U\fR (\fB\-\-\%quickblank\fR).
|
||||
.TP
|
||||
.BR \-d ", " \-\-rebinddelete
|
||||
Interpret the Delete and Backspace keys differently so that both Backspace
|
||||
@@ -226,6 +287,10 @@ system either Backspace acts like Delete or Delete acts like Backspace.
|
||||
.BR \-e ", " \-\-emptyline
|
||||
Do not use the line below the title bar, leaving it entirely blank.
|
||||
.TP
|
||||
.BI \-f " file\fR, " \-\-rcfile= file
|
||||
Read only this \fIfile\fR for setting \fBnano\fR's options, instead of reading
|
||||
both the system-wide and the user's \fInanorc\fR files.
|
||||
.TP
|
||||
.BR \-g ", " \-\-showcursor
|
||||
Make the cursor visible in the file browser (putting it on the
|
||||
highlighted item) and in the help viewer. Useful for braille users
|
||||
@@ -248,75 +313,141 @@ position to the end of the line, instead of cutting the entire line.
|
||||
.TP
|
||||
.BR \-l ", " \-\-linenumbers
|
||||
Display line numbers to the left of the text area.
|
||||
(Any line with an anchor additionally gets a mark in the margin.)
|
||||
.TP
|
||||
.BR \-m ", " \-\-mouse
|
||||
Enable mouse support, if available for your system. When enabled, mouse
|
||||
clicks can be used to place the cursor, set the mark (with a double
|
||||
click), and execute shortcuts. The mouse will work in the X Window
|
||||
click), and execute shortcuts. The mouse works in the X Window
|
||||
System, and on the console when gpm is running. Text can still be
|
||||
selected through dragging by holding down the Shift key.
|
||||
.TP
|
||||
.BR \-n ", " \-\-noread
|
||||
Treat any name given on the command line as a new file. This allows
|
||||
\fBnano\fR to write to named pipes: it will start with a blank buffer,
|
||||
and will write to the pipe when the user saves the "file". This way
|
||||
\fBnano\fR to write to named pipes: it starts with a blank buffer,
|
||||
and writes to the pipe when the user saves the \[lq]file\[rq]. This way
|
||||
\fBnano\fR can be used as an editor in combination with for instance
|
||||
\fBgpg\fR without having to write sensitive data to disk first.
|
||||
.TP
|
||||
.BR \-o\ \fIdirectory ", " \-\-operatingdir= \fIdirectory
|
||||
Set the operating directory. This makes \fBnano\fP set up something
|
||||
similar to a chroot.
|
||||
.BI \-o " directory\fR, " \-\-operatingdir= directory
|
||||
Change to the given \fI\%directory\fR, and allow reading and writing
|
||||
files only in this directory and its subdirectories.
|
||||
.TP
|
||||
.BR \-p ", " \-\-preserve
|
||||
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
|
||||
by the terminal.
|
||||
Preserve the XOFF and XON sequences (\fB^S\fR and \fB^Q\fR) so that
|
||||
they are caught by the terminal (stopping and resuming the output).
|
||||
Note that option \fB\-/\fR (\fB\-\-\%modernbindings\fR) overrides this.
|
||||
.TP
|
||||
.BR \-r\ \fInumber ", " \-\-fill= \fInumber
|
||||
.BR \-q ", " \-\-indicator
|
||||
Display a \[lq]scrollbar\[rq] on the righthand side of the edit window.
|
||||
It shows the position of the viewport in the buffer
|
||||
and how much of the buffer is covered by the viewport.
|
||||
.TP
|
||||
.BI \-r " number\fR, " \-\-fill= number
|
||||
Set the target width for justifying and automatic hard-wrapping at this
|
||||
\fInumber\fR of columns. If the value is 0 or less, wrapping will occur
|
||||
at the width of the screen minus \fInumber\fR columns, allowing the wrap
|
||||
\fI\%number\fR of columns. If the value is 0 or less, wrapping occurs
|
||||
at the width of the screen minus \fI\%number\fR columns, allowing the wrap
|
||||
point to vary along with the width of the screen if the screen is resized.
|
||||
The default value is \-8.
|
||||
The default value is \fB\-8\fR.
|
||||
.TP
|
||||
.B "\-s ""\fIprogram\fR [\fIarg\fR...]\fB""\fR, \fB\-\-speller=""\fIprogram\fR [\fIarg\fR...]\fB"""
|
||||
.B "\-s ""\fIprogram\fR [\fIargument \fR...]\fB""\fR, \fB\-\-speller=""\fIprogram\fR [\fIargument \fR...]\fB"""
|
||||
Use this command to perform spell checking and correcting, instead of
|
||||
using the built-in corrector that calls \fBhunspell\fR or GNU \fBspell\fR.
|
||||
using the built-in corrector that calls \fB\%hunspell\fR(1) or \fBspell\fR(1).
|
||||
.TP
|
||||
.BR \-t ", " \-\-tempfile
|
||||
.BR \-t ", " \-\-saveonexit
|
||||
Save a changed buffer without prompting (when exiting with \fB^X\fR).
|
||||
.TP
|
||||
.BR \-u ", " \-\-unix
|
||||
Save a file by default in Unix format. This overrides nano's
|
||||
Save a file by default in Unix format. This overrides \fBnano\fR's
|
||||
default behavior of saving a file in the format that it had.
|
||||
(This option has no effect when you also use \fB\-\-noconvert\fR.)
|
||||
(This option has no effect when you also use \fB\-\-\%noconvert\fR.)
|
||||
.TP
|
||||
.BR \-v ", " \-\-view
|
||||
Just view the file and disallow editing: read-only mode.
|
||||
This mode allows the user to open also other files for viewing,
|
||||
unless \fB\-\-restricted\fR is given too.
|
||||
unless \fB\-\-\%restricted\fR is given too.
|
||||
.TP
|
||||
.BR \-w ", " \-\-nowrap
|
||||
Do not automatically hard-wrap the current line when it becomes overlong.
|
||||
This is the default. (This option is the opposite of \fB\-b\fR
|
||||
(\fB\-\-breaklonglines\fR) -- the last one given takes effect.)
|
||||
|
||||
(\fB\-\-\%breaklonglines\fR) \[em] the last one given takes effect.)
|
||||
.TP
|
||||
.BR \-x ", " \-\-nohelp
|
||||
Don't show the two help lines at the bottom of the screen.
|
||||
.TP
|
||||
.BR \-y ", " \-\-afterends
|
||||
Make Ctrl+Right stop at word ends instead of beginnings.
|
||||
Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.
|
||||
.TP
|
||||
.BR \-z ", " \-\-suspend
|
||||
Enable the suspend ability.
|
||||
.BR \-z ", " \-\-listsyntaxes
|
||||
List the names of the available syntaxes and exit.
|
||||
.TP
|
||||
.BR \-$ ", " \-\-softwrap
|
||||
Enable 'soft wrapping'. This will make \fBnano\fP attempt to display the
|
||||
entire contents of any line, even if it is longer than the screen width, by
|
||||
continuing it over multiple screen lines. Since
|
||||
\&'$' normally refers to a variable in the Unix shell, you should specify
|
||||
this option last when using other options (e.g.\& 'nano \-wS$') or pass it
|
||||
separately (e.g.\& 'nano \-wS \-$').
|
||||
.BR \-! ", " \-\-magic
|
||||
When neither the file's name nor its first line give a clue,
|
||||
try using \fI\%libmagic\fR to determine the applicable syntax.
|
||||
.TP
|
||||
.BR \-@ ", " \-\-colonparsing
|
||||
When a filename given on the command line ends in a colon plus digits
|
||||
and this filename does not exist, then snip the colon plus digits and
|
||||
understand the digits as a line number. If the trimmed filename does
|
||||
not exist either, then repeat the process and understand the obtained
|
||||
two numbers as line and column number. But if the doubly trimmed
|
||||
filename does not exist either, then forget the trimming and accept
|
||||
the original filename as is. To disable this colon parsing for some
|
||||
file, use \fB+1\fR or similar before the relevant filename.
|
||||
.TP
|
||||
.BR \-% ", " \-\-stateflags
|
||||
Use the top-right corner of the screen for showing some state flags:
|
||||
\fBI\fR when auto-indenting, \fBM\fR when the mark is on, \fBL\fR when
|
||||
hard-wrapping (breaking long lines), \fBR\fR when recording a macro,
|
||||
and \fBS\fR when soft-wrapping.
|
||||
When the buffer is modified, a star (\fB*\fR) is shown after the
|
||||
filename in the center of the title bar.
|
||||
.TP
|
||||
.BR \-_ ", " \-\-minibar
|
||||
Suppress the title bar and instead show information about
|
||||
the current buffer at the bottom of the screen, in the space
|
||||
for the status bar. In this \[lq]mini bar\[rq] the filename is shown
|
||||
on the left, followed by an asterisk if the buffer has been modified.
|
||||
On the right are displayed the current line and column number, the
|
||||
code of the character under the cursor (in Unicode format: U+xxxx),
|
||||
the same flags as are shown by \fB\-\-\%stateflags\fR, and a percentage
|
||||
that expresses how far the cursor is into the file (linewise).
|
||||
When a file is loaded or saved, and also when switching between buffers,
|
||||
the number of lines in the buffer is displayed after the filename.
|
||||
This number is cleared upon the next keystroke, or replaced with an
|
||||
[i/n] counter when multiple buffers are open.
|
||||
The line plus column numbers and the character code are displayed only when
|
||||
\fB\-\-\%constantshow\fR is used, and can be toggled on and off with \fBM\-C\fR.
|
||||
The state flags are displayed only when \fB\-\-\%stateflags\fR is used.
|
||||
.TP
|
||||
.BR \-0 ", " \-\-zero
|
||||
Hide all elements of the interface (title bar, status bar, and help lines)
|
||||
and use all rows of the terminal for showing the contents of the buffer.
|
||||
The status bar appears only when there is a significant message,
|
||||
and disappears after 1.5 seconds or upon the next keystroke.
|
||||
With \fBM\-Z\fR the title bar plus status bar can be toggled.
|
||||
With \fBM\-X\fR the help lines.
|
||||
.TP
|
||||
.BR \-1 ", " \-\-solosidescroll
|
||||
When the cursor approaches the right edge of the edit window, scroll only the
|
||||
current line sideways by a large amount, instead of scrolling all visible lines
|
||||
sideways by just the amount needed to keep the cursor in view.
|
||||
This latter whole-window smooth sideways scrolling is the new default behavior.
|
||||
The single-line jerky sideways scrolling enabled by this option was the old
|
||||
behavior \[em] the only behavior that \fBnano\fR knew.
|
||||
.TP
|
||||
.BR \-/ ", " \-\-modernbindings
|
||||
Use key bindings similar to the ones that most modern programs use:
|
||||
\fB^X\fR cuts, \fB^C\fR copies, \fB^V\fR pastes,
|
||||
\fB^Z\fR undoes, \fB^Y\fR redoes,
|
||||
\fB^F\fR searches forward, \fB^G\fR searches next,
|
||||
\fB^S\fR saves, \fB^O\fR opens a file, \fB^Q\fR quits,
|
||||
and (when the terminal permits) \fB^H\fR shows help.
|
||||
Furthermore, \fB^A\fR sets the mark, \fB^B\fR searches backward,
|
||||
\fB^D\fR searches previous, \fB^R\fR makes replacements,
|
||||
\fB^P\fR shows the position, \fB^T\fR goes to a line,
|
||||
\fB^W\fR writes out a file, and \fB^E\fR executes a command.
|
||||
Note that this option overrides option \fB\-p\fR (\fB\-\-\%preserve\fR).
|
||||
|
||||
.SH TOGGLES
|
||||
Several of the above options can be switched on and off also while
|
||||
@@ -325,29 +456,67 @@ hard-wrapping of long lines, \fBM\-S\fR toggles soft-wrapping,
|
||||
\fBM\-N\fR toggles line numbers, \fBM\-M\fR toggles the mouse,
|
||||
\fBM\-I\fR auto-indentation, and \fBM\-X\fR the help lines.
|
||||
See at the end of the \fB^G\fR help text for a complete list.
|
||||
.sp
|
||||
The \fBM\-X\fR toggle is special: it works in all menus except
|
||||
the help viewer and the linter. All other toggles work in
|
||||
the main menu only.
|
||||
|
||||
.SH FILES
|
||||
\fBnano\fR will read two configuration files: first the system's
|
||||
When \fB\-\-\%rcfile\fR is given, \fBnano\fR reads just the specified file
|
||||
for setting its options and syntaxes and key bindings. Without that
|
||||
option, \fBnano\fR reads two configuration files: first the system's
|
||||
\fInanorc\fR (if it exists), and then the user's \fInanorc\fR (if it
|
||||
exists), either \fI~/.nanorc\fR or \fI$XDG_CONFIG_HOME/nano/nanorc\fR
|
||||
or \fI~/.config/nano/nanorc\fR, whichever is encountered first. See
|
||||
exists), either \fI\%\[ti]/.nanorc\fR or \fI\%$XDG_CONFIG_HOME/\:nano/\:nanorc\fR
|
||||
or \fI\%\[ti]/.config/\:nano/\:nanorc\fR, whichever is encountered first. See
|
||||
.BR nanorc (5)
|
||||
for more information on the possible contents of those files.
|
||||
.sp
|
||||
See \fI/usr/\:share/\:nano/\fR and \fI/usr/\:share/\:nano/\:extra/\fR
|
||||
for available syntax-coloring definitions.
|
||||
|
||||
.SH EXIT STATUS
|
||||
.TP
|
||||
.B 0
|
||||
The editor finished normally.
|
||||
.TP
|
||||
.B 1
|
||||
An invalid option or option argument was given.
|
||||
.TP
|
||||
.B 2
|
||||
The last open buffer was discarded (with \fB^O^Q\fR or \fB^X^Q\fR).
|
||||
|
||||
.SH NOTES
|
||||
If no alternative spell checker command is specified on the command
|
||||
line nor in one of the \fInanorc\fP files, \fBnano\fP will check the
|
||||
\fBSPELL\fP environment variable for one.
|
||||
Suspension is enabled by default, reachable via \fB^T^Z\fR.
|
||||
(If you want a plain \fB^Z\fR to suspend nano, add
|
||||
\fBbind ^Z suspend main\fR to your \fInanorc\fR.)
|
||||
.sp
|
||||
In some cases \fBnano\fP will try to dump the buffer into an emergency
|
||||
file. This will happen mainly if \fBnano\fP receives a SIGHUP or
|
||||
SIGTERM or runs out of memory. It will write the buffer into a file
|
||||
named \fInano.save\fP if the buffer didn't have a name already, or will
|
||||
add a ".save" suffix to the current filename. If an emergency file with
|
||||
that name already exists in the current directory, it will add ".save"
|
||||
plus a number (e.g.\& ".save.1") to the current filename in order to make
|
||||
it unique. In multibuffer mode, \fBnano\fP will write all the open
|
||||
buffers to their respective emergency files.
|
||||
At a Yes-No prompt, \fB^Y\fR can be used for "Yes", \fB^N\fR for "No",
|
||||
and \fB^A\fR for "All".
|
||||
(And when exiting, \fB^Q\fR can be used for "Quit with error".)
|
||||
These unlisted bindings work in any locale.
|
||||
.sp
|
||||
When you want to copy marked text from \fBnano\fR to the system's clipboard,
|
||||
see one of the examples in the \fBnanorc\fR(5) man page.
|
||||
.sp
|
||||
If no alternative spell checker command is specified on the command
|
||||
line nor in one of the \fInanorc\fR files, \fBnano\fR checks the
|
||||
\fBSPELL\fR environment variable for one.
|
||||
.sp
|
||||
In some cases \fBnano\fR tries to dump the buffer into an emergency file.
|
||||
This happens mainly if \fBnano\fR receives a SIGHUP or SIGTERM or runs out
|
||||
of memory. It writes the buffer into a file named \fI\%nano.save\fR if the
|
||||
buffer didn't have a name already, or adds a ".save" suffix to the current
|
||||
filename. If an emergency file with that name already exists in the
|
||||
current directory, it adds ".save" plus a number (for example: ".save.1") to
|
||||
the current filename in order to make it unique. When multiple buffers are
|
||||
open, \fBnano\fR writes each modified buffer to its respective emergency file.
|
||||
.sp
|
||||
The complete manual is maintained in Texinfo format.
|
||||
You can read it with \fBinfo nano\fR, or at
|
||||
.IR https://nano\-editor.org/dist/latest/nano.html .
|
||||
.sp
|
||||
If you have any question about how to use \fBnano\fR in some specific
|
||||
situation, you can ask on \fIhelp\-nano@gnu.org\fR.
|
||||
|
||||
.SH BUGS
|
||||
The recording and playback of keyboard macros works correctly only on a
|
||||
@@ -358,7 +527,7 @@ Please report any other bugs that you encounter via:
|
||||
.br
|
||||
.IR https://savannah.gnu.org/bugs/?group=nano .
|
||||
.sp
|
||||
When nano crashes, it will save any modified buffers to emergency .save files.
|
||||
When \fBnano\fR crashes, it saves any modified buffers to emergency \fI.save\fR files.
|
||||
If you are able to reproduce the crash and you want to get a backtrace, define
|
||||
the environment variable \fBNANO_NOCATCH\fR.
|
||||
|
||||
@@ -368,4 +537,4 @@ the environment variable \fBNANO_NOCATCH\fR.
|
||||
.SH SEE ALSO
|
||||
.BR nanorc (5)
|
||||
.sp
|
||||
\fI/usr/share/doc/nano/\fP (or equivalent on your system)
|
||||
\fI/usr/share/doc/nano/\fR (or equivalent on your system)
|
||||
|
||||
1666
doc/nano.texi
1666
doc/nano.texi
File diff suppressed because it is too large
Load Diff
835
doc/nanorc.5
835
doc/nanorc.5
File diff suppressed because it is too large
Load Diff
33
doc/rnano.1
33
doc/rnano.1
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2002-2007, 2014-2019 Free Software Foundation, Inc.
|
||||
.\" Copyright (C) 2002-2007, 2014-2026 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This document is dual-licensed. You may distribute and/or modify it
|
||||
.\" under the terms of either of the following licenses:
|
||||
@@ -16,31 +16,48 @@
|
||||
.\" Documentation License along with this program. If not, see
|
||||
.\" <https://www.gnu.org/licenses/>.
|
||||
.\"
|
||||
.TH RNANO 1 "version 4.7" "December 2019"
|
||||
.TH RNANO 1 "July 2026" "GNU nano 9.2"
|
||||
|
||||
.SH NAME
|
||||
rnano \- a restricted nano
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B rnano
|
||||
.RI [ options "] [[+" line [, column "]]\ " file "]..."
|
||||
.RI [ options "] [[\fB+" line [\fB, column "]] " file ]...
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBrnano\fR runs the \fBnano\fR editor in restricted mode. This allows
|
||||
editing only the specified file or files, and doesn't allow the user
|
||||
access to the filesystem nor to a command shell.
|
||||
editing only the \fIfile\fR (or files) specified on the command line.
|
||||
.sp
|
||||
In restricted mode, \fBnano\fR will:
|
||||
.RS 4
|
||||
.IP \[bu] 2
|
||||
not make backups;
|
||||
.IP \[bu]
|
||||
not read nor write the history files;
|
||||
.IP \[bu]
|
||||
not allow suspending;
|
||||
.IP \[bu]
|
||||
not allow spell checking;
|
||||
.IP \[bu]
|
||||
not allow running any command in the shell;
|
||||
.IP \[bu]
|
||||
not allow saving the current buffer under a different name;
|
||||
.IP \[bu]
|
||||
not allow inserting another file or opening a new buffer;
|
||||
.IP \[bu]
|
||||
not allow appending or prepending to any file;
|
||||
.IP \[bu]
|
||||
not make backup files nor do spell checking.
|
||||
not allow appending or prepending to any file.
|
||||
.RE
|
||||
.sp
|
||||
As an exception, before the specified file or files, the \fInanorc\fR files
|
||||
are read, to allow customization. If customization should not be allowed,
|
||||
use option \fB\-I\fR (\fB\-\-ignorercfiles\fR) as well.
|
||||
.sp
|
||||
When no \fIfile\fR is specified on the command line, the user may save
|
||||
the contents that they type into the new buffer under any name, except
|
||||
that existing files may not be overwritten. If the places where this
|
||||
new file may be created should be limited, then additionally use the
|
||||
option \fB\-o\fR (\fB\-\-operatingdir\fR).
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
## Sample initialization file for GNU nano.
|
||||
##
|
||||
## This file should not be in DOS or Mac format, and characters
|
||||
## specially interpreted by the shell should not be escaped here.
|
||||
## For the options that take parameters, the default value is shown.
|
||||
## Other options are unset by default. To make sure that an option
|
||||
## is disabled, you can use "unset <option>".
|
||||
##
|
||||
## To make sure an option is disabled, use "unset <option>".
|
||||
##
|
||||
## For the options that take parameters, the default value is given.
|
||||
## Other options are unset by default.
|
||||
##
|
||||
## Inside string parameters, quotes should not be escaped. The last
|
||||
## Characters that are special in a shell should not be escaped here.
|
||||
## Inside string parameters, quotes should not be escaped -- the last
|
||||
## double quote on the line will be seen as the closing quote.
|
||||
|
||||
## Make the 'nextword' function (Ctrl+Right) stop at word ends
|
||||
## instead of at beginnings.
|
||||
## If you want ^F, ^B, M-F and M-B to do what they did before version 8.0:
|
||||
# bind ^F forward main
|
||||
# bind ^B back main
|
||||
# bind M-F formatter main
|
||||
# bind M-B linter main
|
||||
|
||||
## Make M-< and M-> switch between buffers, as they did before version 9.0:
|
||||
# bind M-< prevbuf main
|
||||
# bind M-> nextbuf main
|
||||
|
||||
## Make 'nextword' (Ctrl+Right) and 'chopwordright' (Ctrl+Delete)
|
||||
## stop at word ends instead of at beginnings.
|
||||
# set afterends
|
||||
|
||||
## When soft line wrapping is enabled, make it wrap lines at blanks
|
||||
@@ -33,6 +40,9 @@
|
||||
## Use bold text instead of reverse video text.
|
||||
# set boldtext
|
||||
|
||||
## Treat any line with leading whitespace as the beginning of a paragraph.
|
||||
# set bookstyle
|
||||
|
||||
## The characters treated as closing brackets when justifying paragraphs.
|
||||
## This may not include any blank characters. Only closing punctuation,
|
||||
## optionally followed by these closing brackets, can end sentences.
|
||||
@@ -44,8 +54,11 @@
|
||||
## Do case-sensitive searches by default.
|
||||
# set casesensitive
|
||||
|
||||
## Constantly display the cursor position in the status bar. Note that
|
||||
## this overrides "quickblank".
|
||||
## Interpret digits after a colon after a filename (on the command line)
|
||||
## as the line number to go to in that file.
|
||||
# set colonparsing
|
||||
|
||||
## Constantly report the cursor position, in the status bar or minibar.
|
||||
# set constantshow
|
||||
|
||||
## Use cut-from-cursor-to-end-of-line by default.
|
||||
@@ -54,41 +67,53 @@
|
||||
## Do not use the line below the title bar, leaving it entirely blank.
|
||||
# set emptyline
|
||||
|
||||
## Enable hard-wrapping and set the target width, both for automatic
|
||||
## line wrapping and for justifying paragraphs. If the value is 0 or
|
||||
## less, the wrapping point will be the screen width minus this number.
|
||||
## Set the target width for automatic hard-wrapping and for justifying
|
||||
## paragraphs. If the specified value is 0 or less, the wrapping point
|
||||
## will be the terminal's width minus this number.
|
||||
# set fill -8
|
||||
|
||||
## Remember the used search/replace strings for the next session.
|
||||
## Draw a vertical stripe at the given column, to help judge text width.
|
||||
## (This option does not have a default value.)
|
||||
# set guidestripe 75
|
||||
|
||||
## Remember the used search/replace/command strings for the next session.
|
||||
# set historylog
|
||||
|
||||
## Display a "scrollbar" on the righthand side of the edit window.
|
||||
# set indicator
|
||||
|
||||
## Scroll the buffer contents per half-screen instead of per line.
|
||||
# set jumpyscrolling
|
||||
|
||||
## Display line numbers to the left of the text.
|
||||
## Display line numbers to the left (and any anchors in the margin).
|
||||
# set linenumbers
|
||||
|
||||
## Enable vim-style lock-files. This is just to let a vim user know you
|
||||
## are editing a file [s]he is trying to edit and vice versa. There are
|
||||
## no plans to implement vim-style undo state in these files.
|
||||
## Let other users (of nano or vim) know that you are editing the file
|
||||
## they are trying to edit, and the other way around.
|
||||
# set locking
|
||||
|
||||
## The opening and closing brackets that can be found by bracket
|
||||
## searches. They cannot contain blank characters. The former set must
|
||||
## come before the latter set, and both must be in the same order.
|
||||
## Fall back to slow libmagic to try and determine an applicable syntax.
|
||||
# set magic
|
||||
|
||||
## The opening and closing brackets that are found by a matching-bracket
|
||||
## search. This may not contain blank characters. The opening brackets
|
||||
## must come before the closing ones, and they must be in the same order.
|
||||
# set matchbrackets "(<[{)>]}"
|
||||
|
||||
## Suppress the title bar and show the filename plus a cursor-position
|
||||
## percentage in the space of the status bar.
|
||||
# set minibar
|
||||
|
||||
## Enable mouse support, if available for your system. When enabled,
|
||||
## mouse clicks can be used to place the cursor, set the mark (with a
|
||||
## double click), and execute shortcuts. The mouse will work in the X
|
||||
## Window System, and on the console when gpm is running.
|
||||
## mouse clicks can be used to place the cursor, set the mark (with
|
||||
## two clicks), and execute shortcuts. The mouse will work in the
|
||||
## X Window System, and on the console when gpm is running.
|
||||
# set mouse
|
||||
|
||||
## Switch on multiple file buffers (inserting a file will put it into
|
||||
## a separate buffer).
|
||||
# set multibuffer
|
||||
## With ^R, insert a file into a separate buffer by default.
|
||||
# set newbuffer
|
||||
|
||||
## Don't convert files from DOS/Mac format.
|
||||
## Don't convert files from DOS format.
|
||||
# set noconvert
|
||||
|
||||
## Don't display the helpful shortcut lists at the bottom of the screen.
|
||||
@@ -103,20 +128,18 @@
|
||||
## string means the operating-directory feature is turned off.
|
||||
# set operatingdir ""
|
||||
|
||||
## Remember the cursor position in each file for the next editing session.
|
||||
## Remember the position of cursor and anchors for the next editing session.
|
||||
# set positionlog
|
||||
|
||||
## Preserve the XON and XOFF keys (^Q and ^S).
|
||||
# set preserve
|
||||
|
||||
## The characters treated as closing punctuation when justifying
|
||||
## paragraphs. They cannot contain blank characters. Only closing
|
||||
## punctuation, optionally followed by closing brackets, can end
|
||||
## sentences.
|
||||
## The characters treated as closing punctuation when justifying paragraphs.
|
||||
## This may not contain blank characters. Only these terminating characters,
|
||||
## optionally followed by closing brackets, can end sentences.
|
||||
# set punct "!.?"
|
||||
|
||||
## Do quick status-bar blanking. Status-bar messages will disappear after
|
||||
## 1 keystroke instead of 26. Note that "constantshow" overrides this.
|
||||
## Make status-bar messages disappear after 1 keystroke instead of after 20.
|
||||
# set quickblank
|
||||
|
||||
## The regular expression that matches quoting characters in email
|
||||
@@ -133,42 +156,46 @@
|
||||
## Regular expressions are of the extended type (ERE).
|
||||
# set regexp
|
||||
|
||||
## Put the cursor on the highlighted item in the file browser, and show
|
||||
## the cursor in the help viewer; useful for people who use a braille
|
||||
## display and people with poor vision.
|
||||
## Save a changed buffer automatically on exit; don't prompt.
|
||||
# set saveonexit
|
||||
|
||||
## Put the cursor on the highlighted item in the file browser, and
|
||||
## show the cursor in the help viewer; useful for people who use a
|
||||
## braille display and people with poor vision.
|
||||
# set showcursor
|
||||
|
||||
## Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
## Make the Home key smarter: when Home is pressed anywhere but at the
|
||||
## very beginning of non-whitespace characters on a line, the cursor
|
||||
## will jump to that beginning (either forwards or backwards). If the
|
||||
## cursor is already at that position, it will jump to the true
|
||||
## beginning of the line.
|
||||
## cursor is already at that position, it will jump to the true start
|
||||
## of the line (the left edge).
|
||||
# set smarthome
|
||||
|
||||
## Enable soft line wrapping (AKA full-line display).
|
||||
## Spread overlong lines over multiple screen lines.
|
||||
# set softwrap
|
||||
|
||||
## Scroll only the current line sideways (instead of all lines).
|
||||
# set solosidescroll
|
||||
|
||||
## Use this spelling checker instead of the internal one. This option
|
||||
## does not have a default value.
|
||||
# set speller "aspell -x -c"
|
||||
|
||||
## Allow nano to be suspended.
|
||||
# set suspend
|
||||
## Use the end of the title bar for some state flags: I = auto-indenting,
|
||||
## M = mark, L = hard-wrapping long lines, R = recording, S = soft-wrapping.
|
||||
# set stateflags
|
||||
|
||||
## Use this tab size instead of the default; it must be greater than 0.
|
||||
# set tabsize 8
|
||||
|
||||
## Convert typed tabs to spaces.
|
||||
## Convert each typed tab to the fitting number of spaces.
|
||||
# set tabstospaces
|
||||
|
||||
## Save automatically on exit; don't prompt.
|
||||
# set tempfile
|
||||
|
||||
## Snip whitespace at the end of lines when justifying or hard-wrapping.
|
||||
# set trimblanks
|
||||
|
||||
## Disallow file modification. Why would you want this in an rcfile? ;)
|
||||
# set view
|
||||
## Save files always in Unix format (also when they were DOS).
|
||||
# set unix
|
||||
|
||||
## The two single-column characters used to display the first characters
|
||||
## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
|
||||
@@ -191,69 +218,63 @@
|
||||
## of a single character, and without affecting the cutbuffer).
|
||||
# set zap
|
||||
|
||||
## Paint the interface elements of nano. These are examples;
|
||||
## by default there are no colors, except for errorcolor.
|
||||
# set titlecolor brightwhite,blue
|
||||
# set statuscolor brightwhite,green
|
||||
# set errorcolor brightwhite,red
|
||||
# set selectedcolor brightwhite,magenta
|
||||
# set stripecolor ,yellow
|
||||
## Hide the bars plus help lines and use the whole terminal as edit area.
|
||||
# set zero
|
||||
|
||||
|
||||
## Paint the interface elements of nano. These are examples; there are
|
||||
## no colors by default, except for errorcolor and spotlightcolor.
|
||||
# set titlecolor bold,white,blue
|
||||
# set promptcolor lightwhite,grey
|
||||
# set statuscolor bold,white,green
|
||||
# set errorcolor bold,white,red
|
||||
# set spotlightcolor black,lightyellow
|
||||
# set selectedcolor lightwhite,#804
|
||||
# set stripecolor ,#444
|
||||
# set scrollercolor slate,#222
|
||||
# set numbercolor cyan
|
||||
# set keycolor cyan
|
||||
# set functioncolor green
|
||||
|
||||
## In root's .nanorc you might want to use:
|
||||
# set titlecolor brightwhite,magenta
|
||||
# set statuscolor brightwhite,magenta
|
||||
# set errorcolor brightwhite,red
|
||||
# set selectedcolor brightwhite,cyan
|
||||
# set titlecolor bold,white,magenta
|
||||
# set promptcolor black,yellow
|
||||
# set statuscolor bold,white,magenta
|
||||
# set errorcolor bold,white,red
|
||||
# set spotlightcolor black,orange
|
||||
# set selectedcolor lightwhite,cyan
|
||||
# set stripecolor ,yellow
|
||||
# set scrollercolor magenta
|
||||
# set numbercolor magenta
|
||||
# set keycolor brightmagenta
|
||||
# set keycolor lightmagenta
|
||||
# set functioncolor magenta
|
||||
|
||||
|
||||
## Setup of syntax coloring.
|
||||
##
|
||||
## syntax "name" ["filename regex" ...]
|
||||
##
|
||||
## color|icolor foreground,background "regex" ["regex"...]
|
||||
## [...]
|
||||
##
|
||||
## 'color' will do case-sensitive matches, while 'icolor' will do
|
||||
## case-insensitive matches.
|
||||
##
|
||||
## All color commands are applied in the order in which they are specified,
|
||||
## meaning that later commands can recolor stuff that was colored earlier.
|
||||
##
|
||||
## Valid color names for foreground and background are: white, black, normal,
|
||||
## red, blue, green, yellow, magenta, cyan. For foreground colors, you may
|
||||
## use the prefix "bright" to get a stronger highlight.
|
||||
##
|
||||
## All regexes (regular expressions) are of the extended type (ERE).
|
||||
##
|
||||
## If the coloring rule should span multiple lines, use the following format:
|
||||
##
|
||||
## color fg,bg start="regex" end="regex"
|
||||
##
|
||||
## If you wish, you may put your syntax definitions in separate files.
|
||||
## You can make use of such files as follows:
|
||||
##
|
||||
## include "/path/to/syntax_file.nanorc"
|
||||
## === Syntax coloring ===
|
||||
## For all details, see 'man nanorc', section SYNTAX HIGHLIGHTING.
|
||||
|
||||
## To include all existing syntax definitions, you can do:
|
||||
# include "@PKGDATADIR@/*.nanorc"
|
||||
## To include most of the existing syntax definitions, you can do:
|
||||
# include @PKGDATADIR@/*.nanorc
|
||||
|
||||
## Or you can select just the ones you need. For example:
|
||||
# include @PKGDATADIR@/html.nanorc
|
||||
# include @PKGDATADIR@/python.nanorc
|
||||
# include @PKGDATADIR@/sh.nanorc
|
||||
|
||||
## In @PKGDATADIR@/extra/ you can find some syntaxes that are
|
||||
## specific for certain distros or for some less common languages.
|
||||
|
||||
|
||||
## If <Tab> should always produce four spaces when editing a Python file,
|
||||
## independent of the settings of 'tabsize' and 'tabstospaces':
|
||||
# extendsyntax python tabgives " "
|
||||
|
||||
## If <Tab> should always produce an actual TAB when editing a Makefile:
|
||||
# extendsyntax makefile tabgives " "
|
||||
|
||||
## === Key bindings ===
|
||||
## For all details, see 'man nanorc', section REBINDING KEYS.
|
||||
|
||||
## Key bindings.
|
||||
## See nanorc(5) (section REBINDING KEYS) for more details on this.
|
||||
## If you want to suspend nano with one keystroke (instead of with ^T^Z):
|
||||
# bind ^Z suspend main
|
||||
|
||||
## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
|
||||
## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
|
||||
@@ -264,34 +285,69 @@
|
||||
## <Ctrl+Backspace> delete the word to the left of the cursor with:
|
||||
# bind ^H chopwordleft main
|
||||
|
||||
## For a more mnemonic Comment keystroke (overriding Cut-from-cursor):
|
||||
# bind M-K comment main
|
||||
|
||||
## If you want ^L to just refresh the screen and not center the cursor:
|
||||
# bind ^L refresh main
|
||||
|
||||
## When you sometimes type M-J instead of M-K, or M-T instead of M-R:
|
||||
# unbind M-J main
|
||||
# unbind M-T main
|
||||
## (Those functions are still accessible through ^T^J and ^T^V.)
|
||||
|
||||
## For quickly uppercasing or lowercasing the word that the cursor is on.
|
||||
## (These effectively select a word and pipe it through a sed command.)
|
||||
# bind Sh-M-U "{nextword}{mark}{prevword}{execute}| sed 's/.*/\U&/' {enter}" main
|
||||
# bind Sh-M-L "{nextword}{mark}{prevword}{execute}| sed 's/.*/\L&/' {enter}" main
|
||||
|
||||
## Two ways of copying a marked region to the system clipboard:
|
||||
# bind Sh-M-C "{execute}| xsel -ib {enter}{undo}" main
|
||||
# bind Sh-M-P "{execute}| xclip -select clipboard 1>&- 2>&- {enter}{undo}" main
|
||||
|
||||
## For copying text to the local clipboard via OSC 52 (if terminal supports it):
|
||||
# bind M-* "{execute}|| printf "\033]52;c;%s\007" "$(base64 | tr -d '\n')" {enter}{undo}" main
|
||||
|
||||
## For normalizing Unicode to precomposed characters:
|
||||
# bind Sh-M-N "{execute}| uconv -x nfc {enter}" main
|
||||
|
||||
## For wiping all anchors in a buffer:
|
||||
# bind Sh-M-W "{execute}| cat {enter}" main
|
||||
|
||||
## For snipping trailing blanks when you save a file:
|
||||
# bind ^S "{execute}| sed 's/\s\+$//' {enter}{savefile}" main
|
||||
|
||||
## If you would like nano to have keybindings that are more "usual",
|
||||
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
|
||||
## then uncomment these:
|
||||
#bind ^Q exit all
|
||||
#bind ^H help all
|
||||
#bind ^H exit help
|
||||
#bind ^F whereis all
|
||||
#bind ^G findnext all
|
||||
#bind ^B wherewas all
|
||||
#bind ^D findprevious all
|
||||
#bind ^R replace main
|
||||
#bind ^W writeout main
|
||||
#bind ^O insert main
|
||||
#unbind ^V all
|
||||
#unbind ^Y all
|
||||
#bind M-X flipnewbuffer all
|
||||
#bind ^X cut all
|
||||
#bind ^C copy all
|
||||
#bind ^V paste all
|
||||
#bind ^P curpos main
|
||||
#bind ^T gotoline main
|
||||
#bind ^T gotodir browser
|
||||
#bind ^Y speller main
|
||||
#unbind ^K all
|
||||
#unbind ^U all
|
||||
#bind M-R redo main
|
||||
#bind ^U undo main
|
||||
#bind ^E redo main
|
||||
#unbind M-J main
|
||||
#unbind M-T main
|
||||
#set multibuffer
|
||||
# bind ^X cut main
|
||||
# bind ^C copy main
|
||||
# bind ^V paste all
|
||||
# bind ^Q exit all
|
||||
# bind ^S savefile main
|
||||
# bind ^W writeout main
|
||||
# bind ^O insert main
|
||||
# set newbuffer
|
||||
# bind ^H help all
|
||||
# bind ^H exit help
|
||||
# bind ^F whereis all
|
||||
# bind ^G findnext all
|
||||
# bind ^B wherewas all
|
||||
# bind ^D findprevious all
|
||||
# bind ^R replace main
|
||||
# unbind ^U all
|
||||
# unbind ^N main
|
||||
# unbind ^Y all
|
||||
# unbind M-J main
|
||||
# unbind M-T main
|
||||
# bind ^A mark main
|
||||
# bind ^P location main
|
||||
# bind ^T gotoline main
|
||||
# bind ^T gotodir browser
|
||||
# bind ^T cutrestoffile execute
|
||||
# bind ^L linter execute
|
||||
# bind ^E execute main
|
||||
# bind ^K "{mark}{end}{zap}" main
|
||||
# bind ^U "{mark}{home}{zap}" main
|
||||
# bind ^Z undo main
|
||||
# bind ^Y redo main
|
||||
|
||||
29
m4/ChangeLog
29
m4/ChangeLog
@@ -1,29 +0,0 @@
|
||||
2002-08-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* gettext.m4: Upgrade to gettext-0.11.5.
|
||||
* ulonglong.m4: New file, from gettext-0.11.5.
|
||||
* iconv.m4: Upgrade to gettext-0.11.5.
|
||||
* intdiv0.m4: New file, from gettext-0.11.5.
|
||||
* inttypes.m4: New file, from gettext-0.11.5.
|
||||
* inttypes_h.m4: New file, from gettext-0.11.5.
|
||||
* inttypes-pri.m4: New file, from gettext-0.11.5.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.5.
|
||||
* lib-link.m4: Upgrade to gettext-0.11.5.
|
||||
* stdint_h.m4: New file, from gettext-0.11.5.
|
||||
* uintmax_t.m4: New file, from gettext-0.11.5.
|
||||
* Makefile.am (EXTRA_DIST): Add the new files.
|
||||
|
||||
2002-06-03 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: Upgrade to gettext-0.11.2.
|
||||
* gettext.m4: Upgrade to gettext-0.11.2.
|
||||
* glibc21.m4: Upgrade to gettext-0.11.2.
|
||||
* iconv.m4: Upgrade to gettext-0.11.2.
|
||||
* isc-posix.m4: New file, from gettext-0.11.2.
|
||||
* lcmessage.m4: Upgrade to gettext-0.11.2.
|
||||
* lib-ld.m4: New file, from gettext-0.11.2.
|
||||
* lib-link.m4: New file, from gettext-0.11.2.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.2.
|
||||
* progtest.m4: Upgrade to gettext-0.11.2.
|
||||
* Makefile.am (EXTRA_DIST): Add the new files.
|
||||
|
||||
@@ -31,6 +31,5 @@ EXTRA_DIST = \
|
||||
threadlib.m4 \
|
||||
uintmax_t.m4 \
|
||||
visibility.m4 \
|
||||
wchar_t.m4 \
|
||||
wint_t.m4 \
|
||||
xsize.m4
|
||||
|
||||
53
nano.spec.in
53
nano.spec.in
@@ -1,53 +0,0 @@
|
||||
%define name @PACKAGE@
|
||||
%define version @VERSION@
|
||||
%define release 1
|
||||
|
||||
Name : %{name}
|
||||
Version : %{version}
|
||||
Release : %{release}
|
||||
Summary : a user-friendly editor, a Pico clone with enhancements
|
||||
|
||||
License : GPLv3+
|
||||
Group : Applications/Editors
|
||||
URL : https://nano-editor.org/
|
||||
Source : https://nano-editor.org/dist/latest/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRoot : %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires : autoconf, automake, gettext-devel, ncurses-devel, texinfo
|
||||
Requires(post) : info
|
||||
Requires(preun) : info
|
||||
|
||||
%description
|
||||
GNU nano is a small and friendly text editor. It aims to emulate the
|
||||
Pico text editor while also offering several enhancements.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR="%{buildroot}" install
|
||||
#ln -s nano %{buildroot}/%{_bindir}/pico
|
||||
rm -f %{buildroot}/%{_infodir}/dir
|
||||
|
||||
%post
|
||||
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ] ; then
|
||||
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/sample.nanorc
|
||||
%{_bindir}/*
|
||||
%{_docdir}/nano/*
|
||||
%{_mandir}/man*/*
|
||||
%{_mandir}/fr/man*/*
|
||||
%{_infodir}/nano.info*
|
||||
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
|
||||
%{_datadir}/nano/*
|
||||
998
po/ChangeLog
998
po/ChangeLog
@@ -1,998 +0,0 @@
|
||||
2014-05-28 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, eo.po, nl.po: Updates for German, Dutch, and Esperanto.
|
||||
|
||||
2014-05-27 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, nl.po, ru.po: Updates for Russian, Dutch, and German.
|
||||
|
||||
2014-05-25 Benno Schulenberg <bensberg@justemail.net>
|
||||
* it.po, uk.po: Updates from the TP for Ukrainian and Italian.
|
||||
|
||||
2014-05-22 Benno Schulenberg <bensberg@justemail.net>
|
||||
* de.po, uk.po: Updates from the TP for German and Ukrainian.
|
||||
|
||||
2014-05-16 Benno Schulenberg <bensberg@justemail.net>
|
||||
* eo.po, fi.po, fr.po, nl.po, vi.po: Updates from the TP for
|
||||
Vietnamese, Finnish, Dutch, French, and Esperanto.
|
||||
|
||||
2014-05-13 Benno Schulenberg <bensberg@justemail.net>
|
||||
* nano.pot, *.po: Regenerated the POT file and refreshed the PO's.
|
||||
|
||||
2014-03-22 Benno Schulenberg <bensberg@justemail.net>
|
||||
* nano.pot: Regenerated the POT file.
|
||||
* cs.po, es.po, it.po, nb.po, sr.po, zh_TW: Updates from the TP
|
||||
for Czech, Spanish, Italian, Norwegian, Serbian, and Chinese.
|
||||
* LINGUAS: Removed rw (Kinyarwanda) -- it was just fragments.
|
||||
|
||||
2007-12-09 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* LINGUAS: Add zh_CN.
|
||||
* es.po, fr.po, it.po, nb.po, nl.po, pt_BR.po: New pull from the TP,
|
||||
to fetch the now corrected latest pt_BR file.
|
||||
|
||||
2007-12-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* zh_CN.po: New Simplified Chinese translation by
|
||||
LI Daobing <lidaobing@gmail.com>.
|
||||
* fr.po, ga.po, ms.po, nl.po, nn.po, vi.po: Translation updates taken
|
||||
from the Translation Project.
|
||||
* Refreshed the rest of the files from the latest TP archive.
|
||||
|
||||
2007-09-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* po/ru.po: Updated Russian translation by Sergey A. Ribalchenko.
|
||||
|
||||
2007-08-11 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
|
||||
* po/update.pl: Relicense to the GNU GPL version 3 or later.
|
||||
|
||||
2007-07-31 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
|
||||
* po/update.pl: Update copyright notice to account for
|
||||
modifications.
|
||||
|
||||
2007-01-29 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* ru.po: Updated Russian translation by Dimitriy Ryazantcev.
|
||||
* ru.po: Fix incorrect "Project-Id-Version" entry and misplaced
|
||||
space.
|
||||
|
||||
2007-01-13 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* es.po: Fix misplaced space.
|
||||
* eu.po: Fix typos and misplaced space.
|
||||
* fr.po: Fix misplaced space.
|
||||
* gl.po: Fix typos and misplaced space.
|
||||
* nb.po: Fix typos and more misplaced space.
|
||||
|
||||
2007-01-06 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* nb.po: Fix misplaced space.
|
||||
|
||||
2006-12-06 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* hu.po: Removed unneeded duplicate plural forms again.
|
||||
* ms.po: Fix incorrect "Project-Id-Version" entry.
|
||||
|
||||
2006-12-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2006-11-20 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* tr.po: Removed unneeded blank plural forms, as gettext 0.15
|
||||
generates errors upon encountering them.
|
||||
|
||||
2006-10-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nb.po: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
|
||||
2006-10-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by
|
||||
Francisco Javier Tsao Santín.
|
||||
|
||||
2006-10-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation by Mikel Olasagasti.
|
||||
|
||||
2006-10-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by
|
||||
Francisco Javier Tsao Santín.
|
||||
|
||||
2006-10-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Refetch the current nano 1.9.99pre0 pt_BR file from
|
||||
the TP, as the latest file offered is apparently for 1.3.11pre1.
|
||||
|
||||
2006-10-02 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* pt_BR.po: Restore previous version of pt_BR, as it was for
|
||||
nano 1.9.99pre0, and the current version is for 1.3.11pre1.
|
||||
|
||||
2006-09-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2006-09-10 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* hu.po: Removed unneeded duplicate plural forms again.
|
||||
|
||||
2006-09-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
|
||||
2006-09-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2006-09-01 Benno Schulenberg <bensberg@justemail.net>
|
||||
|
||||
* ChangeLog: Fix incorrect years in two entries.
|
||||
|
||||
2006-08-31 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* bg.po: Fix misplaced space.
|
||||
|
||||
2006-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cardenes Medina.
|
||||
|
||||
2006-08-28 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2006-08-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by Anton Zinoviev.
|
||||
* ca.po: Updated Catalan translation.
|
||||
* ga.po: Updated Irish translation by Kevin Patrick Scannell.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
* sv.po: Updated Swedish translation by Daniel Nylander.
|
||||
|
||||
2006-08-15 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* hu.po: Removed unneeded duplicate plural forms, as gettext
|
||||
0.15 generates errors upon encountering them.
|
||||
* id.po: Removed unneeded duplicate plural forms, as gettext
|
||||
0.15 generates errors upon encountering them.
|
||||
|
||||
2006-06-20 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
|
||||
2006-06-20 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* fr.po: Fix incorrect "Project-Id-Version" entry.
|
||||
* hu.po: Fix incorrect "Project-Id-Version" entry.
|
||||
* it.po: Fix incorrect "Project-Id-Version" entry.
|
||||
|
||||
2006-06-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by Anton Zinoviev.
|
||||
* ga.po: Updated Irish translation by Kevin Patrick Scannell.
|
||||
|
||||
2006-06-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
|
||||
2006-06-12 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
|
||||
2006-06-09 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* ga.po: Updated Irish translation by Kevin Patrick Scannell.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
|
||||
2006-05-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* LINGUAS: Added "ga".
|
||||
* ga.po: New Irish translation by
|
||||
Kevin Patrick Scannell <scannell@SLU.EDU>.
|
||||
|
||||
2006-05-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
|
||||
2006-03-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sv.po: Updated Swedish translation by Daniel Nylander.
|
||||
|
||||
2006-03-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Vietnamese translation by
|
||||
Phan Vinh Thinh.
|
||||
|
||||
2005-12-21 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by Anton Zinoviev.
|
||||
* ca.po: Updated Catalan translation.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
* zh_TW: Updated Traditional Chinese translation by
|
||||
Wei-Lun Chao.
|
||||
|
||||
2005-12-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
|
||||
2005-11-08 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* POTFILES.in: Add prompt.c.
|
||||
|
||||
2005-11-05 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* POTFILES.in: Add browser.c.
|
||||
|
||||
2005-11-01 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* POTFILES.in: Add help.c.
|
||||
|
||||
2005-10-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* eu.po: Updated Basque translation by Mikel Olasagasti.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
* nl.po: Updated Dutch translation by Benno Schulenberg.
|
||||
* zh_TW: Updated Traditional Chinese translation by
|
||||
Wei-Lun Chao.
|
||||
|
||||
2005-08-22 Jordi Mallach <jordi@gnu.org>
|
||||
* bg.po: New Bulgarian translation by
|
||||
Yavor Doganov <yavor@doganov.org>.
|
||||
|
||||
* LINGUAS: Added "bg".
|
||||
|
||||
2005-08-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2005-08-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by
|
||||
Benno Schulenberg and Reinout van Schouwen.
|
||||
|
||||
2005-07-24 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* POTFILES.in: Add text.c.
|
||||
|
||||
2005-07-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2005-07-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2005-07-07 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2005-06-28 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* POTFILES.in: Remove source files that contain no translatable
|
||||
strings.
|
||||
|
||||
2005-06-19 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* pt_BR.po: Typo fix.
|
||||
|
||||
2005-06-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Typo fix by Jens Seidel.
|
||||
|
||||
2005-05-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2005-04-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2005-04-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
|
||||
2005-04-20 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
* zh_TW.po: Updated Traditional Chinese translation by
|
||||
CHAO Wei-Lun.
|
||||
|
||||
2005-04-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* vi.po: Updated Vietnamese translation by Phan Vinh Thinh.
|
||||
|
||||
2005-04-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
|
||||
2005-04-14 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2005-04-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* vi.po: New Vietnamese translation by Phan Vinh Thinh.
|
||||
* LINGUAS: Added "vi".
|
||||
|
||||
2005-04-09 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* zh_TW.po: Added Plural-Forms header and fix format specification
|
||||
typos.
|
||||
|
||||
2005-04-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* zh_TW.po: Updated Traditional Chinese translation by
|
||||
CHAO Wei-Lun.
|
||||
|
||||
2005-04-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* rw.po: New Kinyarwanda translation by Steve Murphy.
|
||||
* LINGUAS: Added "rw".
|
||||
|
||||
2005-04-05 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
* ro.po: Updated Romanian translation by
|
||||
Laurentiu Buzdugan.
|
||||
|
||||
2005-03-11 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2005-01-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2004-12-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
|
||||
2004-12-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2004-12-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2004-12-07 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by
|
||||
Marco Colombo.
|
||||
* ro.po: Updated Romanian translation by
|
||||
Laurentiu Buzdugan.
|
||||
|
||||
2004-12-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* nb: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-11-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-11-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2004-10-07 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation by
|
||||
Mikel Olasagasti.
|
||||
|
||||
2004-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2004-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated Catalan translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-08-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2004-06-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* zh_TW.po: Added Traditional Chinese translation by
|
||||
CHAO Wei-Lun <chaoweilun@pcmail.com.tw>.
|
||||
* LINGUAS: Added "zh_TW".
|
||||
|
||||
2004-02-24 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-11-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
|
||||
2003-11-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sr.po: Added Serbian translation by Danilo Segan <dsegan@gmx.net>.
|
||||
* LINGUAS: Added "sr" (Serbian), and alphabetize.
|
||||
* ChangeLog: Recoded as UTF-8.
|
||||
|
||||
2003-10-30 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Patch from Martin-Eric Racine <q-funk@pp.fishpool.fi>
|
||||
to accept "Yy" and "Nn" as well as the Finnish letters in Yes/No
|
||||
prompts.
|
||||
|
||||
2003-10-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-09-12 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* POTFILES.in: Updated path to sources.
|
||||
|
||||
2003-09-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-08-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* tr.po: Updated Turkish translation by A. Murat EREN.
|
||||
|
||||
2003-08-05 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-06-11 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation by Geir Helland.
|
||||
|
||||
2003-06-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-06-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2003-05-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-04-24 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ro.po: New Romanian translation by Laurentiu Buzdugan.
|
||||
* id.po: Updated Indonesian translation by Tedi Heriyanto.
|
||||
* LINGUAS: Added "ro" (Romanian).
|
||||
|
||||
2003-04-12 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-04-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-03-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-03-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* da.po: Updated Danish translation by Keld Simonsen.
|
||||
|
||||
2003-03-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
* id.po: Updated Indonesian translation by Tedi Heriyanto.
|
||||
|
||||
2003-02-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
|
||||
2003-02-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Olavi Niemitalo.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* ru.po: Updated Russian translation by Sergey A. Ribalchenko.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-02-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-02-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-02-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ru.po: Updated Russian translation from Sergey A. Ribalchenko.
|
||||
|
||||
2003-02-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* Makevars (XGETTEXT_OPTIONS): Added --keyword=P_:1,2.
|
||||
* update.pl: likewise.
|
||||
* fi.po: Added Plural-Forms: header.
|
||||
|
||||
2003-02-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Kivimaa and
|
||||
Kalle Olavi Niemitalo.
|
||||
|
||||
2003-02-08 Chris Allegretta <chrisa@asty.org>
|
||||
|
||||
* it.po: Fix broken format string in translation.
|
||||
|
||||
2003-02-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pl.po: Updated Polish translation by Wojciech Kotwica.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2003-02-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2003-01-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-01-26 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-01-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2003-01-21 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-01-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2003-01-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* Makefile.in.in: Removed, generated by autopoint.
|
||||
* Rules-quot: Likewise.
|
||||
* boldquot.sed: Likewise.
|
||||
* en@boldquot.header: Likewise.
|
||||
* en@quot.header: Likewise.
|
||||
* insert-header.sin: Likewise.
|
||||
* quot.sed: Likewise.
|
||||
* remove-potcdate.sin: Likewise.
|
||||
|
||||
2003-01-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* LINGUAS: New file, exported values from configure.ac's ALL_LINGUAS.
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
* eu.po: New Basque translation by Peio Ziarsolo.
|
||||
|
||||
2002-12-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* tr.po: New Turkish translation by Doruk Fisek.
|
||||
|
||||
2002-11-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-11-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-11-03 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-10-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-10-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michel Piefel.
|
||||
|
||||
2002-10-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michel Piefel.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-08-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-07-30 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
* sv.po: Upadted translation by Christian Rose.
|
||||
|
||||
2002-07-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-07-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-07-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pt_BR.po: New Brazilian Portuguese translation by
|
||||
Claudio Neves.
|
||||
|
||||
2002-07-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-07-09 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-07-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-07-03 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ms.po: New Bahasa Melayu translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2002-06-03 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.11.2.
|
||||
* Rules-quot: New file, from gettext-0.11.2.
|
||||
* boldquot.sed: New file, from gettext-0.11.2.
|
||||
* en@boldquot.header: New file, from gettext-0.11.2.
|
||||
* en@quot.header: New file, from gettext-0.11.2.
|
||||
* insert-header.sin: New file, from gettext-0.11.2.
|
||||
* quot.sed: New file, from gettext-0.11.2.
|
||||
* remove-potcdate.sin: New file, from gettext-0.11.2.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* ca.po: Updated translation.
|
||||
* es.po: Updated translation.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-05-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-04-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-04-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ru.po: Updated translation by Sergey A. Ribalchenko.
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
|
||||
2002-04-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
|
||||
2002-04-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
|
||||
2002-04-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-04-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrio.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-03-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-03-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
|
||||
2002-03-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
|
||||
2002-03-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-15 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-03-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po, ru.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
|
||||
2002-03-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated to current CVS.
|
||||
* es.po: Updated to current CVS.
|
||||
* gl.po: Updated translation to current CVS by Jacobo Tarrio.
|
||||
|
||||
2002-03-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrio.
|
||||
|
||||
2002-03-11 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-09 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-03-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-03-05 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-02-20 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
|
||||
2002-02-15 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* nb.po: Updated translation by Stig E Sandoe.
|
||||
|
||||
2002-02-15 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* nb.po: Updated translation by Stig E Sandoe.
|
||||
|
||||
2002-02-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-02-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* hu.po: Updated translation by Gergely Nagy.
|
||||
|
||||
2002-02-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* uk.po, ru.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
|
||||
2002-02-06 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* hu.po: Updated translation by Gergely Nagy.
|
||||
|
||||
2002-02-06 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* cs.po: Incomplete update by Václav Haisman.
|
||||
|
||||
2002-01-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
|
||||
2002-01-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* nn.po: Updated translation by Kjetil Torgrim Homme.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-01-23 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-01-19 gettextize <bug-gnu-utils@gnu.org>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.10.40.
|
||||
* cat-id-tbl.c: Remove file.
|
||||
* stamp-cat-id: Remove file.
|
||||
|
||||
2002-01-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
2002-01-19 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-01-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* no.po: Removed, replaced by nn.po.
|
||||
* nn.po: Updated translation by Kjetil Torgrim Homme.
|
||||
* nb.po: New Norwegian bokmål translation by Stig E Sandoe.
|
||||
|
||||
2002-01-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ru.po, uk.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-01-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
|
||||
2002-01-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
@@ -1,2 +1,2 @@
|
||||
# List of available languages.
|
||||
bg ca cs da de eo es eu fi fr ga gl hr hu id it ja ko ms nb nl nn pl pt pt_BR ro ru sl sr sv tr uk vi zh_CN zh_TW
|
||||
ar bg ca cs da de eo es eu fi fr ga gl hr hu id is it ja ka kk ko ms nb nl pl pt pt_BR ro ru sk sl sq sr sv tr uk vi zh_CN zh_TW
|
||||
|
||||
@@ -7,6 +7,7 @@ src/files.c
|
||||
src/global.c
|
||||
src/help.c
|
||||
src/history.c
|
||||
src/move.c
|
||||
src/nano.c
|
||||
src/prompt.c
|
||||
src/rcfile.c
|
||||
|
||||
2513
po/nano.pot
2513
po/nano.pot
File diff suppressed because it is too large
Load Diff
2611
po/pt_BR.po
2611
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,9 @@ rm *.po
|
||||
wget --recursive --level=1 --accept=po --no-directories --no-verbose \
|
||||
https://translationproject.org/latest/nano/ || exit 2
|
||||
|
||||
# This PO file is less than twenty percent translated:
|
||||
rm -v nn.po
|
||||
|
||||
# Are there now PO files that are not in git yet?
|
||||
NEWSTUFF=$(git status --porcelain *.po | grep "^??")
|
||||
|
||||
@@ -26,6 +29,11 @@ for pofile in *.po; do
|
||||
msgattrib --no-obsolete --no-fuzzy $pofile >trimmed.po || exit 4
|
||||
mv trimmed.po $pofile || exit 4
|
||||
done
|
||||
echo
|
||||
|
||||
if grep "[[:cntrl:]]" ./*.po; then
|
||||
echo "*** PO file contains control character"; exit 5;
|
||||
fi
|
||||
|
||||
# If needed, fix a problem in the Makefile template.
|
||||
grep -q '^datarootdir' Makefile.in.in || \
|
||||
|
||||
2540
po/zh_CN.po
2540
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2537
po/zh_TW.po
2537
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="4.7"
|
||||
VERSION="9.2"
|
||||
|
||||
./configure -C --enable-tiny && make && ./configure -C &&
|
||||
|
||||
@@ -12,7 +12,7 @@ po/update_linguas.sh &&
|
||||
|
||||
make distcheck && make dist-xz &&
|
||||
|
||||
git add po/*.po po/nano.pot &&
|
||||
git add po/*.po po/nano.pot po/LINGUAS &&
|
||||
git commit -m "$(git log -1 --grep 'po: up' | grep o: | sed 's/^ //')" &&
|
||||
|
||||
gpg -a -b nano-$VERSION.tar.gz &&
|
||||
@@ -20,7 +20,7 @@ gpg -a -b nano-$VERSION.tar.xz &&
|
||||
gpg --verify nano-$VERSION.tar.gz.asc &&
|
||||
gpg --verify nano-$VERSION.tar.xz.asc &&
|
||||
|
||||
git tag -u A0ACE884 -a v$VERSION -m "the nano $VERSION release" &&
|
||||
git tag -u B8E1961F -a v$VERSION -m "the nano $VERSION release" &&
|
||||
|
||||
make pdf && rm -rf doc/nano.t2p &&
|
||||
scp doc/nano.pdf bens@wh0rd.org:nano.pdf &&
|
||||
|
||||
@@ -6,7 +6,7 @@ CLEANFILES = revision.h
|
||||
if BUILDING_FROM_GIT
|
||||
SOMETHING = "REVISION \"`git describe --tags 2>/dev/null`\""
|
||||
else
|
||||
SOMETHING = "NOTHING \"from tarball\""
|
||||
SOMETHING = "PLAINBUILD \"from tarball\""
|
||||
endif
|
||||
|
||||
nano.o: revision.h
|
||||
@@ -16,32 +16,35 @@ winio.o: revision.h
|
||||
# only when the revision actually changed.
|
||||
revision.h: FORCE
|
||||
@[ -f $@ ] || touch $@
|
||||
@echo "#define $(SOMETHING)" | cmp -s $@ - || \
|
||||
@! git describe >/dev/null 2>&1 || \
|
||||
echo "#define $(SOMETHING)" | cmp -s $@ - || \
|
||||
echo "#define $(SOMETHING)" > $@
|
||||
FORCE:
|
||||
|
||||
bin_PROGRAMS = nano
|
||||
nano_SOURCES = browser.c \
|
||||
nano_SOURCES = \
|
||||
definitions.h \
|
||||
prototypes.h \
|
||||
browser.c \
|
||||
chars.c \
|
||||
color.c \
|
||||
cut.c \
|
||||
files.c \
|
||||
folding.c \
|
||||
global.c \
|
||||
help.c \
|
||||
history.c \
|
||||
move.c \
|
||||
nano.c \
|
||||
nano.h \
|
||||
prompt.c \
|
||||
proto.h \
|
||||
rcfile.c \
|
||||
search.c \
|
||||
text.c \
|
||||
utils.c \
|
||||
winio.c
|
||||
|
||||
nano_LDADD = @LIBINTL@ $(top_builddir)/lib/libgnu.a \
|
||||
$(LIB_CLOCK_GETTIME) $(LIBTHREAD)
|
||||
nano_LDADD = $(top_builddir)/lib/libgnu.a @LIBINTL@ \
|
||||
$(GETRANDOM_LIB) $(CLOCK_TIME_LIB) $(LIBTHREAD)
|
||||
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano
|
||||
|
||||
1080
src/browser.c
1080
src/browser.c
File diff suppressed because it is too large
Load Diff
508
src/chars.c
508
src/chars.c
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* chars.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 2001-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016-2018 Benno Schulenberg *
|
||||
* Copyright (C) 2001-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016-2021 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,150 +15,110 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
static bool use_utf8 = FALSE;
|
||||
/* Whether we've enabled UTF-8 support. */
|
||||
|
||||
/* Enable UTF-8 support. */
|
||||
void utf8_init(void)
|
||||
{
|
||||
use_utf8 = TRUE;
|
||||
}
|
||||
|
||||
/* Is UTF-8 support enabled? */
|
||||
bool using_utf8(void)
|
||||
{
|
||||
return use_utf8;
|
||||
}
|
||||
#endif /* ENABLE_UTF8 */
|
||||
|
||||
/* Concatenate two allocated strings, and free the second. */
|
||||
char *addstrings(char* str1, size_t len1, char* str2, size_t len2)
|
||||
{
|
||||
str1 = charealloc(str1, len1 + len2 + 1);
|
||||
str1[len1] = '\0';
|
||||
|
||||
strncat(&str1[len1], str2, len2);
|
||||
free(str2);
|
||||
|
||||
return str1;
|
||||
}
|
||||
|
||||
/* Return TRUE if the value of c is in byte range, and FALSE otherwise. */
|
||||
bool is_byte(int c)
|
||||
{
|
||||
return ((unsigned int)c == (unsigned char)c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to isalpha() for multibyte characters. */
|
||||
bool is_alpha_mbchar(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
|
||||
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
|
||||
return FALSE;
|
||||
|
||||
return iswalpha(wc);
|
||||
} else
|
||||
#endif
|
||||
return isalpha((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to isalnum() for multibyte characters. */
|
||||
bool is_alnum_mbchar(const char *c)
|
||||
#ifdef ENABLE_SPELLER
|
||||
/* Return TRUE when the given character is some kind of letter. */
|
||||
bool is_alpha_char(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
wchar_t wc;
|
||||
|
||||
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
|
||||
return FALSE;
|
||||
if (mbtowide(&wc, c) < 0)
|
||||
return FALSE;
|
||||
|
||||
return iswalnum(wc);
|
||||
} else
|
||||
return iswalpha(wc);
|
||||
#else
|
||||
return isalpha((unsigned char)*c);
|
||||
#endif
|
||||
return isalnum((unsigned char)*c);
|
||||
}
|
||||
#endif /* ENABLE_SPELLER */
|
||||
|
||||
/* This function is equivalent to isblank() for multibyte characters. */
|
||||
bool is_blank_mbchar(const char *c)
|
||||
/* Return TRUE when the given character is some kind of letter or a digit. */
|
||||
bool is_alnum_char(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
wchar_t wc;
|
||||
|
||||
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
|
||||
return FALSE;
|
||||
if (mbtowide(&wc, c) < 0)
|
||||
return FALSE;
|
||||
|
||||
return iswblank(wc);
|
||||
} else
|
||||
return iswalnum(wc);
|
||||
#else
|
||||
return isalnum((unsigned char)*c);
|
||||
#endif
|
||||
return isblank((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to iscntrl(), except in that it only
|
||||
* handles non-high-bit control characters. */
|
||||
bool is_ascii_cntrl_char(int c)
|
||||
{
|
||||
return (0 <= c && c < 32);
|
||||
}
|
||||
|
||||
/* This function is equivalent to iscntrl() for multibyte characters,
|
||||
* except in that it also handles multibyte control characters with
|
||||
* their high bits set. */
|
||||
bool is_cntrl_mbchar(const char *c)
|
||||
/* Return TRUE when the given character is space or tab or other whitespace. */
|
||||
bool is_blank_char(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
return ((c[0] & 0xE0) == 0 || c[0] == 127 ||
|
||||
wchar_t wc;
|
||||
|
||||
if ((signed char)*c >= 0)
|
||||
return (*c == ' ' || *c == '\t');
|
||||
|
||||
if (mbtowide(&wc, c) < 0)
|
||||
return FALSE;
|
||||
|
||||
return iswblank(wc);
|
||||
#else
|
||||
return isblank((unsigned char)*c);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return TRUE when the given character is a control character. */
|
||||
bool is_cntrl_char(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (using_utf8)
|
||||
return ((c[0] & 0xE0) == 0 || c[0] == DEL_CODE ||
|
||||
((signed char)c[0] == -62 && (signed char)c[1] < -96));
|
||||
} else
|
||||
#endif
|
||||
return (((unsigned char)*c & 0x60) == 0 || (unsigned char)*c == 127);
|
||||
|
||||
return ((*c & 0x60) == 0 || *c == DEL_CODE);
|
||||
}
|
||||
|
||||
/* This function is equivalent to ispunct() for multibyte characters. */
|
||||
bool is_punct_mbchar(const char *c)
|
||||
/* Return TRUE when the given character is a punctuation character. */
|
||||
bool is_punct_char(const char *c)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
wchar_t wc;
|
||||
|
||||
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
|
||||
return FALSE;
|
||||
if (mbtowide(&wc, c) < 0)
|
||||
return FALSE;
|
||||
|
||||
return iswpunct(wc);
|
||||
} else
|
||||
return iswpunct(wc);
|
||||
#else
|
||||
return ispunct((unsigned char)*c);
|
||||
#endif
|
||||
return ispunct((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* Return TRUE when the given multibyte character c is a word-forming
|
||||
* character (that is: alphanumeric, or specified in wordchars, or
|
||||
* punctuation when allow_punct is TRUE), and FALSE otherwise. */
|
||||
bool is_word_mbchar(const char *c, bool allow_punct)
|
||||
/* Return TRUE when the given character is word-forming (it is alphanumeric or
|
||||
* specified in 'wordchars', or it is punctuation when allow_punct is TRUE). */
|
||||
bool is_word_char(const char *c, bool allow_punct)
|
||||
{
|
||||
if (*c == '\0')
|
||||
return FALSE;
|
||||
|
||||
if (is_alnum_mbchar(c))
|
||||
if (is_alnum_char(c))
|
||||
return TRUE;
|
||||
|
||||
if (word_chars != NULL && *word_chars != '\0') {
|
||||
if (allow_punct && is_punct_char(c))
|
||||
return TRUE;
|
||||
|
||||
if (word_chars && *word_chars) {
|
||||
char symbol[MAXCHARLEN + 1];
|
||||
int symlen = collect_char(c, symbol);
|
||||
|
||||
@@ -166,7 +126,7 @@ bool is_word_mbchar(const char *c, bool allow_punct)
|
||||
return (strstr(word_chars, symbol) != NULL);
|
||||
}
|
||||
|
||||
return (allow_punct && is_punct_mbchar(c));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Return the visible representation of control character c. */
|
||||
@@ -178,8 +138,8 @@ char control_rep(const signed char c)
|
||||
return '=';
|
||||
else if (c < 0)
|
||||
return c + 224;
|
||||
else
|
||||
return c + 64;
|
||||
|
||||
return c + 64;
|
||||
}
|
||||
|
||||
/* Return the visible representation of multibyte control character c. */
|
||||
@@ -190,79 +150,138 @@ char control_mbrep(const char *c, bool isdata)
|
||||
return '@';
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
if ((unsigned char)c[0] < 128)
|
||||
return control_rep(c[0]);
|
||||
else
|
||||
return control_rep(c[1]);
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return control_rep(*c);
|
||||
|
||||
return control_rep(*c);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* Return the width in columns of the given (multibyte) character. */
|
||||
int mbwidth(const char *c)
|
||||
/* Convert the given multibyte sequence c to wide character wc, and return
|
||||
* the number of bytes in the sequence, or -1 for an invalid sequence. */
|
||||
int mbtowide(wchar_t *wc, const char *c)
|
||||
{
|
||||
/* Ask for the width only when the character isn't plain ASCII. */
|
||||
if ((signed char)*c <= 0) {
|
||||
wchar_t wc;
|
||||
int width;
|
||||
if ((signed char)*c < 0 && using_utf8) {
|
||||
unsigned char v1 = c[0];
|
||||
unsigned char v2 = c[1] ^ 0x80;
|
||||
|
||||
if (mbtowc(&wc, c, MAXCHARLEN) < 0)
|
||||
return 1;
|
||||
if (v2 > 0x3F || v1 < 0xC2)
|
||||
return -1;
|
||||
|
||||
width = wcwidth(wc);
|
||||
|
||||
if (width < 0)
|
||||
return 1;
|
||||
|
||||
return width;
|
||||
} else
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Convert the Unicode value in code to a multibyte character, if possible.
|
||||
* If the conversion succeeds, return the (dynamically allocated) multibyte
|
||||
* character and its length. Otherwise, return an undefined (dynamically
|
||||
* allocated) multibyte character and a length of zero. */
|
||||
char *make_mbchar(long code, int *length)
|
||||
{
|
||||
char *mb_char;
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
mb_char = charalloc(MAXCHARLEN);
|
||||
*length = wctomb(mb_char, (wchar_t)code);
|
||||
|
||||
/* Reject invalid Unicode characters. */
|
||||
if (*length < 0 || !is_valid_unicode((wchar_t)code)) {
|
||||
IGNORE_CALL_RESULT(wctomb(NULL, 0));
|
||||
*length = 0;
|
||||
if (v1 < 0xE0) {
|
||||
*wc = (((unsigned int)(v1 & 0x1F) << 6) | (unsigned int)v2);
|
||||
return 2;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
mb_char = measured_copy((char *)&code, 1);
|
||||
*length = 1;
|
||||
|
||||
unsigned char v3 = c[2] ^ 0x80;
|
||||
|
||||
if (v3 > 0x3F)
|
||||
return -1;
|
||||
|
||||
if (v1 < 0xF0) {
|
||||
if ((v1 > 0xE0 || v2 >= 0x20) && (v1 != 0xED || v2 < 0x20)) {
|
||||
*wc = (((unsigned int)(v1 & 0x0F) << 12) |
|
||||
((unsigned int)v2 << 6) | (unsigned int)v3);
|
||||
return 3;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
unsigned char v4 = c[3] ^ 0x80;
|
||||
|
||||
if (v4 > 0x3F || v1 > 0xF4)
|
||||
return -1;
|
||||
|
||||
if ((v1 > 0xF0 || v2 >= 0x10) && (v1 != 0xF4 || v2 < 0x10)) {
|
||||
*wc = (((unsigned int)(v1 & 0x07) << 18) | ((unsigned int)v2 << 12) |
|
||||
((unsigned int)v3 << 6) | (unsigned int)v4);
|
||||
return 4;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
return mb_char;
|
||||
*wc = (unsigned int)*c;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return the length (in bytes) of the character located at *pointer. */
|
||||
/* Return TRUE when the given character occupies two cells. */
|
||||
bool is_doublewidth(const char *ch)
|
||||
{
|
||||
wchar_t wc;
|
||||
|
||||
/* Only from U+1100 can code points have double width. */
|
||||
if ((unsigned char)*ch < 0xE1 || !using_utf8)
|
||||
return FALSE;
|
||||
|
||||
if (mbtowide(&wc, ch) < 0)
|
||||
return FALSE;
|
||||
|
||||
return (wcwidth(wc) == 2);
|
||||
}
|
||||
|
||||
/* Return TRUE when the given character occupies zero cells. */
|
||||
bool is_zerowidth(const char *ch)
|
||||
{
|
||||
wchar_t wc;
|
||||
|
||||
/* Only from U+0300 can code points have zero width. */
|
||||
if ((unsigned char)*ch < 0xCC || !using_utf8)
|
||||
return FALSE;
|
||||
|
||||
if (mbtowide(&wc, ch) < 0)
|
||||
return FALSE;
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
/* Work around an OpenBSD bug -- see https://sv.gnu.org/bugs/?60393. */
|
||||
if (wc >= 0xF0000)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return (wcwidth(wc) == 0);
|
||||
}
|
||||
#endif /* ENABLE_UTF8 */
|
||||
|
||||
/* Return the number of bytes in the character that starts at *pointer. */
|
||||
int char_length(const char *pointer)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
/* If possibly a multibyte character, get its length; otherwise, it's 1. */
|
||||
if ((signed char)*pointer < 0) {
|
||||
int length = mblen(pointer, MAXCHARLEN);
|
||||
if ((unsigned char)*pointer > 0xC1 && using_utf8) {
|
||||
unsigned char c1 = pointer[0];
|
||||
unsigned char c2 = pointer[1];
|
||||
|
||||
return (length < 0 ? 1 : length);
|
||||
} else
|
||||
if ((c2 ^ 0x80) > 0x3F)
|
||||
return 1;
|
||||
|
||||
if (c1 < 0xE0)
|
||||
return 2;
|
||||
|
||||
if (((unsigned char)pointer[2] ^ 0x80) > 0x3F)
|
||||
return 1;
|
||||
|
||||
if (c1 < 0xF0) {
|
||||
if ((c1 > 0xE0 || c2 >= 0xA0) && (c1 != 0xED || c2 < 0xA0))
|
||||
return 3;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (((unsigned char)pointer[3] ^ 0x80) > 0x3F)
|
||||
return 1;
|
||||
|
||||
if (c1 > 0xF4)
|
||||
return 1;
|
||||
|
||||
if ((c1 > 0xF0 || c2 >= 0x90) && (c1 != 0xF4 || c2 < 0x90))
|
||||
return 4;
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return the number of (multibyte) characters in the given string. */
|
||||
@@ -270,16 +289,8 @@ size_t mbstrlen(const char *pointer)
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
while (*pointer != '\0') {
|
||||
#ifdef ENABLE_UTF8
|
||||
if ((signed char)*pointer < 0) {
|
||||
int length = mblen(pointer, MAXCHARLEN);
|
||||
|
||||
pointer += (length < 0 ? 1 : length);
|
||||
} else
|
||||
#endif
|
||||
pointer++;
|
||||
|
||||
while (*pointer) {
|
||||
pointer += char_length(pointer);
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -290,19 +301,7 @@ size_t mbstrlen(const char *pointer)
|
||||
* given string, and return a copy of this character in *thechar. */
|
||||
int collect_char(const char *string, char *thechar)
|
||||
{
|
||||
int charlen;
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* If this is a UTF-8 starter byte, get the number of bytes of the character. */
|
||||
if ((signed char)*string < 0) {
|
||||
charlen = mblen(string, MAXCHARLEN);
|
||||
|
||||
/* When the multibyte sequence is invalid, only take the first byte. */
|
||||
if (charlen <= 0)
|
||||
charlen = 1;
|
||||
} else
|
||||
#endif
|
||||
charlen = 1;
|
||||
int charlen = char_length(string);
|
||||
|
||||
for (int i = 0; i < charlen; i++)
|
||||
thechar[i] = string[i];
|
||||
@@ -315,20 +314,29 @@ int collect_char(const char *string, char *thechar)
|
||||
int advance_over(const char *string, size_t *column)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if ((signed char)*string < 0) {
|
||||
int charlen = mblen(string, MAXCHARLEN);
|
||||
|
||||
if (charlen > 0) {
|
||||
if (is_cntrl_mbchar(string))
|
||||
*column += 2;
|
||||
else
|
||||
*column += mbwidth(string);
|
||||
if ((signed char)*string < 0 && using_utf8) {
|
||||
/* A UTF-8 upper control code has two bytes and takes two columns. */
|
||||
if (((unsigned char)string[0] == 0xC2 && (signed char)string[1] < -96)) {
|
||||
*column += 2;
|
||||
return 2;
|
||||
} else {
|
||||
charlen = 1;
|
||||
*column += 1;
|
||||
}
|
||||
wchar_t wc;
|
||||
int charlen = mbtowide(&wc, string);
|
||||
|
||||
return charlen;
|
||||
if (charlen < 0) {
|
||||
*column += 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int width = wcwidth(wc);
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
*column += (width < 0 || wc >= 0xF0000) ? 1 : width;
|
||||
#else
|
||||
*column += (width < 0) ? 1 : width;
|
||||
#endif
|
||||
return charlen;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -337,12 +345,8 @@ int advance_over(const char *string, size_t *column)
|
||||
*column += tabsize - *column % tabsize;
|
||||
else
|
||||
*column += 2;
|
||||
} else if (*string == 0x7F)
|
||||
} else if (0x7E < (unsigned char)*string && (unsigned char)*string < 0xA0)
|
||||
*column += 2;
|
||||
#ifndef ENABLE_UTF8
|
||||
else if (0x7F < (unsigned char)*string && (unsigned char)*string < 0xA0)
|
||||
*column += 2;
|
||||
#endif
|
||||
else
|
||||
*column += 1;
|
||||
|
||||
@@ -354,7 +358,7 @@ int advance_over(const char *string, size_t *column)
|
||||
size_t step_left(const char *buf, size_t pos)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
size_t before, charlen = 0;
|
||||
|
||||
if (pos < 4)
|
||||
@@ -383,9 +387,10 @@ size_t step_left(const char *buf, size_t pos)
|
||||
}
|
||||
|
||||
return before - charlen;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return (pos == 0 ? 0 : pos - 1);
|
||||
|
||||
return (pos == 0 ? 0 : pos - 1);
|
||||
}
|
||||
|
||||
/* Return the index in buf of the beginning of the multibyte character
|
||||
@@ -405,12 +410,28 @@ int mbstrcasecmp(const char *s1, const char *s2)
|
||||
int mbstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
wchar_t wc1, wc2;
|
||||
|
||||
while (*s1 != '\0' && *s2 != '\0' && n > 0) {
|
||||
bool bad1 = (mbtowc(&wc1, s1, MAXCHARLEN) < 0);
|
||||
bool bad2 = (mbtowc(&wc2, s2, MAXCHARLEN) < 0);
|
||||
while (*s1 && *s2 && n > 0) {
|
||||
if ((signed char)*s1 >= 0 && (signed char)*s2 >= 0) {
|
||||
if ('A' <= (*s1 & 0x5F) && (*s1 & 0x5F) <= 'Z') {
|
||||
if ('A' <= (*s2 & 0x5F) && (*s2 & 0x5F) <= 'Z') {
|
||||
if ((*s1 & 0x5F) != (*s2 & 0x5F))
|
||||
return ((*s1 & 0x5F) - (*s2 & 0x5F));
|
||||
} else
|
||||
return ((*s1 | 0x20) - *s2);
|
||||
} else if ('A' <= (*s2 & 0x5F) && (*s2 & 0x5F) <= 'Z')
|
||||
return (*s1 - (*s2 | 0x20));
|
||||
else if (*s1 != *s2)
|
||||
return (*s1 - *s2);
|
||||
|
||||
s1++; s2++; n--;
|
||||
continue;
|
||||
}
|
||||
|
||||
bool bad1 = (mbtowide(&wc1, s1) < 0);
|
||||
bool bad2 = (mbtowide(&wc2, s2) < 0);
|
||||
|
||||
if (bad1 || bad2) {
|
||||
if (*s1 != *s2)
|
||||
@@ -431,19 +452,20 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
}
|
||||
|
||||
return (n > 0) ? ((unsigned char)*s1 - (unsigned char)*s2) : 0;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return strncasecmp(s1, s2, n);
|
||||
|
||||
return strncasecmp(s1, s2, n);
|
||||
}
|
||||
|
||||
/* This function is equivalent to strcasestr() for multibyte strings. */
|
||||
char *mbstrcasestr(const char *haystack, const char *needle)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
size_t needle_len = mbstrlen(needle);
|
||||
|
||||
while (*haystack != '\0') {
|
||||
while (*haystack) {
|
||||
if (mbstrncasecmp(haystack, needle, needle_len) == 0)
|
||||
return (char *)haystack;
|
||||
|
||||
@@ -451,9 +473,10 @@ char *mbstrcasestr(const char *haystack, const char *needle)
|
||||
}
|
||||
|
||||
return NULL;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return (char *)strcasestr(haystack, needle);
|
||||
|
||||
return (char *)strcasestr(haystack, needle);
|
||||
}
|
||||
|
||||
/* This function is equivalent to strstr(), except in that it scans the
|
||||
@@ -465,7 +488,7 @@ char *revstrstr(const char *haystack, const char *needle,
|
||||
size_t tail_len = strlen(pointer);
|
||||
|
||||
if (tail_len < needle_len)
|
||||
pointer += tail_len - needle_len;
|
||||
pointer -= (needle_len - tail_len);
|
||||
|
||||
while (pointer >= haystack) {
|
||||
if (strncmp(pointer, needle, needle_len) == 0)
|
||||
@@ -485,7 +508,7 @@ char *revstrcasestr(const char *haystack, const char *needle,
|
||||
size_t tail_len = strlen(pointer);
|
||||
|
||||
if (tail_len < needle_len)
|
||||
pointer += tail_len - needle_len;
|
||||
pointer -= (needle_len - tail_len);
|
||||
|
||||
while (pointer >= haystack) {
|
||||
if (strncasecmp(pointer, needle, needle_len) == 0)
|
||||
@@ -502,12 +525,12 @@ char *mbrevstrcasestr(const char *haystack, const char *needle,
|
||||
const char *pointer)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
size_t needle_len = mbstrlen(needle);
|
||||
size_t tail_len = mbstrlen(pointer);
|
||||
|
||||
if (tail_len < needle_len)
|
||||
pointer += tail_len - needle_len;
|
||||
pointer -= (needle_len - tail_len);
|
||||
|
||||
if (pointer < haystack)
|
||||
return NULL;
|
||||
@@ -521,27 +544,28 @@ char *mbrevstrcasestr(const char *haystack, const char *needle,
|
||||
|
||||
pointer = haystack + step_left(haystack, pointer - haystack);
|
||||
}
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return revstrcasestr(haystack, needle, pointer);
|
||||
|
||||
return revstrcasestr(haystack, needle, pointer);
|
||||
}
|
||||
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
||||
/* This function is equivalent to strchr() for multibyte strings. */
|
||||
char *mbstrchr(const char *string, const char *chr)
|
||||
const char *mbstrchr(const char *string, const char *chr)
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
if (using_utf8) {
|
||||
bool bad_s = FALSE, bad_c = FALSE;
|
||||
wchar_t ws, wc;
|
||||
|
||||
if (mbtowc(&wc, chr, MAXCHARLEN) < 0) {
|
||||
if (mbtowide(&wc, chr) < 0) {
|
||||
wc = (unsigned char)*chr;
|
||||
bad_c = TRUE;
|
||||
}
|
||||
|
||||
while (*string != '\0') {
|
||||
int symlen = mbtowc(&ws, string, MAXCHARLEN);
|
||||
while (*string) {
|
||||
int symlen = mbtowide(&ws, string);
|
||||
|
||||
if (symlen < 0) {
|
||||
ws = (unsigned char)*string;
|
||||
@@ -558,9 +582,10 @@ char *mbstrchr(const char *string, const char *chr)
|
||||
return NULL;
|
||||
|
||||
return (char *)string;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
return strchr(string, *chr);
|
||||
|
||||
return strchr(string, *chr);
|
||||
}
|
||||
#endif /* !NANO_TINY || ENABLE_JUSTIFY */
|
||||
|
||||
@@ -569,8 +594,8 @@ char *mbstrchr(const char *string, const char *chr)
|
||||
* the characters in accept, searching forward. */
|
||||
char *mbstrpbrk(const char *string, const char *accept)
|
||||
{
|
||||
while (*string != '\0') {
|
||||
if (mbstrchr(accept, string) != NULL)
|
||||
while (*string) {
|
||||
if (mbstrchr(accept, string))
|
||||
return (char *)string;
|
||||
|
||||
string += char_length(string);
|
||||
@@ -590,7 +615,7 @@ char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer)
|
||||
}
|
||||
|
||||
while (TRUE) {
|
||||
if (mbstrchr(accept, pointer) != NULL)
|
||||
if (mbstrchr(accept, pointer))
|
||||
return (char *)pointer;
|
||||
|
||||
/* If we've reached the head of the string, we found nothing. */
|
||||
@@ -603,39 +628,30 @@ char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer)
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || defined(ENABLE_JUSTIFY))
|
||||
/* Return TRUE if the given string contains at least one blank character,
|
||||
* and FALSE otherwise. */
|
||||
/* Return TRUE if the given string contains at least one blank character. */
|
||||
bool has_blank_char(const char *string)
|
||||
{
|
||||
char symbol[MAXCHARLEN];
|
||||
while (*string && !is_blank_char(string))
|
||||
string += char_length(string);
|
||||
|
||||
while (*string != '\0') {
|
||||
string += collect_char(string, symbol);
|
||||
|
||||
if (is_blank_mbchar(symbol))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return *string;
|
||||
}
|
||||
#endif /* ENABLE_NANORC && (!NANO_TINY || ENABLE_JUSTIFY) */
|
||||
#endif
|
||||
|
||||
/* Return TRUE when the given string is empty or consists of only blanks. */
|
||||
bool white_string(const char *string)
|
||||
{
|
||||
while (*string != '\0' && (is_blank_mbchar(string) || *string == '\r'))
|
||||
while (*string && (is_blank_char(string) || *string == '\r'))
|
||||
string += char_length(string);
|
||||
|
||||
return !*string;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* Return TRUE if wc is valid Unicode, and FALSE otherwise. */
|
||||
bool is_valid_unicode(wchar_t wc)
|
||||
#if defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
||||
/* Remove leading whitespace from the given string. */
|
||||
void strip_leading_blanks_from(char *string)
|
||||
{
|
||||
return ((0 <= wc && wc <= 0xD7FF) ||
|
||||
(0xE000 <= wc && wc <= 0xFDCF) ||
|
||||
(0xFDF0 <= wc && wc <= 0xFFFD) ||
|
||||
(0xFFFF < wc && wc <= 0x10FFFF && (wc & 0xFFFF) <= 0xFFFD));
|
||||
while (string && (*string == ' ' || *string == '\t'))
|
||||
memmove(string, string + 1, strlen(string));
|
||||
}
|
||||
#endif
|
||||
|
||||
360
src/color.c
360
src/color.c
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* color.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 2001-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2017 Benno Schulenberg *
|
||||
* Copyright (C) 2001-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2017, 2020, 2021 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,11 +15,11 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
@@ -29,116 +29,101 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/* For early versions of ncurses-6.0, use an additional A_PROTECT attribute
|
||||
* for all colors, in order to work around an ncurses miscoloring bug. */
|
||||
#if defined(NCURSES_VERSION_MAJOR) && (NCURSES_VERSION_MAJOR == 6) && \
|
||||
(NCURSES_VERSION_MINOR == 0) && (NCURSES_VERSION_PATCH < 20151017)
|
||||
#define A_BANDAID A_PROTECT
|
||||
#else
|
||||
#define A_BANDAID A_NORMAL
|
||||
#endif
|
||||
static bool defaults_allowed = FALSE;
|
||||
/* Whether ncurses accepts -1 to mean "default color". */
|
||||
|
||||
/* Assign pair numbers for the colors in the given syntax, giving identical
|
||||
* color pairs the same number. */
|
||||
void set_syntax_colorpairs(syntaxtype *sint)
|
||||
/* Initialize the color pairs for nano's interface. */
|
||||
void set_interface_colorpairs(void)
|
||||
{
|
||||
int new_number = NUMBER_OF_ELEMENTS + 1;
|
||||
colortype *ink;
|
||||
|
||||
for (ink = sint->color; ink != NULL; ink = ink->next) {
|
||||
const colortype *beforenow = sint->color;
|
||||
|
||||
while (beforenow != ink && (beforenow->fg != ink->fg ||
|
||||
beforenow->bg != ink->bg))
|
||||
beforenow = beforenow->next;
|
||||
|
||||
if (beforenow != ink)
|
||||
ink->pairnum = beforenow->pairnum;
|
||||
else
|
||||
ink->pairnum = new_number++;
|
||||
|
||||
ink->attributes |= COLOR_PAIR(ink->pairnum) | A_BANDAID;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize the colors for nano's interface, and assign pair numbers
|
||||
* for the colors in each loaded syntax. */
|
||||
void set_colorpairs(void)
|
||||
{
|
||||
syntaxtype *sint;
|
||||
bool using_defaults = FALSE;
|
||||
size_t i;
|
||||
|
||||
/* Tell ncurses to enable colors. */
|
||||
start_color();
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
/* Allow using the default colors, if available. */
|
||||
using_defaults = (use_default_colors() != ERR);
|
||||
/* Ask ncurses to allow -1 to mean "default color". */
|
||||
defaults_allowed = (use_default_colors() == OK);
|
||||
#endif
|
||||
|
||||
/* Initialize the color pairs for nano's interface elements. */
|
||||
for (i = 0; i < NUMBER_OF_ELEMENTS; i++) {
|
||||
colortype *combo = color_combo[i];
|
||||
for (size_t index = 0; index < NUMBER_OF_ELEMENTS; index++) {
|
||||
colortype *combo = color_combo[index];
|
||||
|
||||
if (combo != NULL) {
|
||||
if (combo->fg == USE_THE_DEFAULT && !using_defaults)
|
||||
combo->fg = COLOR_WHITE;
|
||||
if (combo->bg == USE_THE_DEFAULT && !using_defaults)
|
||||
combo->bg = COLOR_BLACK;
|
||||
init_pair(i + 1, combo->fg, combo->bg);
|
||||
interface_color_pair[i] = COLOR_PAIR(i + 1) | A_BANDAID |
|
||||
combo->attributes;
|
||||
if (combo) {
|
||||
if (!defaults_allowed) {
|
||||
if (combo->fg == THE_DEFAULT)
|
||||
combo->fg = COLOR_WHITE;
|
||||
if (combo->bg == THE_DEFAULT)
|
||||
combo->bg = COLOR_BLACK;
|
||||
}
|
||||
init_pair(index + 1, combo->fg, combo->bg);
|
||||
interface_color_pair[index] = COLOR_PAIR(index + 1) | combo->attributes;
|
||||
rescind_colors = FALSE;
|
||||
} else {
|
||||
if (i == FUNCTION_TAG)
|
||||
interface_color_pair[i] = A_NORMAL;
|
||||
else if (i == GUIDE_STRIPE)
|
||||
interface_color_pair[i] = A_REVERSE;
|
||||
else if (i == ERROR_MESSAGE) {
|
||||
init_pair(i + 1, COLOR_WHITE, COLOR_RED);
|
||||
interface_color_pair[i] = COLOR_PAIR(i + 1) | A_BOLD | A_BANDAID;
|
||||
} else
|
||||
interface_color_pair[i] = hilite_attribute;
|
||||
if (index == FUNCTION_TAG || index == SCROLL_BAR)
|
||||
interface_color_pair[index] = A_NORMAL;
|
||||
else if (index == GUIDE_STRIPE)
|
||||
interface_color_pair[index] = A_REVERSE;
|
||||
else if (index == SPOTLIGHTED) {
|
||||
init_pair(index + 1, COLOR_BLACK, COLOR_YELLOW + (COLORS > 15 ? 8 : 0));
|
||||
interface_color_pair[index] = COLOR_PAIR(index + 1);
|
||||
} else if (index == MINI_INFOBAR || index == PROMPT_BAR)
|
||||
interface_color_pair[index] = interface_color_pair[TITLE_BAR];
|
||||
else if (index == ERROR_MESSAGE) {
|
||||
init_pair(index + 1, COLOR_WHITE, COLOR_RED);
|
||||
interface_color_pair[index] = COLOR_PAIR(index + 1) | A_BOLD;
|
||||
} else if (index == FOLDED_LINE) {
|
||||
if (COLORS > 15)
|
||||
init_pair(index + 1, COLOR_BLACK + 8, COLOR_BLACK);
|
||||
else
|
||||
init_pair(index + 1, COLOR_WHITE, COLOR_BLACK);
|
||||
interface_color_pair[index] = COLOR_PAIR(index + 1);
|
||||
} else {
|
||||
interface_color_pair[index] = hilite_attribute;
|
||||
}
|
||||
}
|
||||
|
||||
free(color_combo[i]);
|
||||
free(color_combo[index]);
|
||||
}
|
||||
|
||||
/* For each loaded syntax, assign pair numbers to color combinations. */
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next)
|
||||
if (sint->filename == NULL)
|
||||
set_syntax_colorpairs(sint);
|
||||
if (rescind_colors) {
|
||||
interface_color_pair[SPOTLIGHTED] = A_REVERSE;
|
||||
interface_color_pair[ERROR_MESSAGE] = A_REVERSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize the color information. */
|
||||
void color_init(void)
|
||||
/* Assign a pair number to each of the foreground/background color combinations
|
||||
* in the given syntax, giving identical combinations the same number. */
|
||||
void set_syntax_colorpairs(syntaxtype *sntx)
|
||||
{
|
||||
const colortype *ink;
|
||||
bool using_defaults = FALSE;
|
||||
short foreground, background;
|
||||
short number = NUMBER_OF_ELEMENTS;
|
||||
colortype *older;
|
||||
|
||||
/* If the terminal is not capable of colors, forget it. */
|
||||
if (!has_colors())
|
||||
return;
|
||||
for (colortype *ink = sntx->color; ink != NULL; ink = ink->next) {
|
||||
if (!defaults_allowed) {
|
||||
if (ink->fg == THE_DEFAULT)
|
||||
ink->fg = COLOR_WHITE;
|
||||
if (ink->bg == THE_DEFAULT)
|
||||
ink->bg = COLOR_BLACK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
/* Allow using the default colors, if available. */
|
||||
using_defaults = (use_default_colors() != ERR);
|
||||
#endif
|
||||
older = sntx->color;
|
||||
|
||||
/* For each coloring expression, initialize the color pair. */
|
||||
for (ink = openfile->colorstrings; ink != NULL; ink = ink->next) {
|
||||
foreground = ink->fg;
|
||||
background = ink->bg;
|
||||
while (older != ink && (older->fg != ink->fg || older->bg != ink->bg))
|
||||
older = older->next;
|
||||
|
||||
if (foreground == USE_THE_DEFAULT && !using_defaults)
|
||||
foreground = COLOR_WHITE;
|
||||
ink->pairnum = (older != ink) ? older->pairnum : ++number;
|
||||
|
||||
if (background == USE_THE_DEFAULT && !using_defaults)
|
||||
background = COLOR_BLACK;
|
||||
|
||||
init_pair(ink->pairnum, foreground, background);
|
||||
ink->attributes |= COLOR_PAIR(ink->pairnum);
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize the color pairs for the current syntax. */
|
||||
void prepare_palette(void)
|
||||
{
|
||||
short number = NUMBER_OF_ELEMENTS;
|
||||
|
||||
/* For each unique pair number, tell ncurses the combination of colors. */
|
||||
for (colortype *ink = openfile->syntax->color; ink != NULL; ink = ink->next)
|
||||
if (ink->pairnum > number) {
|
||||
init_pair(ink->pairnum, ink->fg, ink->bg);
|
||||
number = ink->pairnum;
|
||||
}
|
||||
|
||||
have_palette = TRUE;
|
||||
}
|
||||
@@ -147,74 +132,62 @@ void color_init(void)
|
||||
* the list starting at head. Return TRUE upon success. */
|
||||
bool found_in_list(regexlisttype *head, const char *shibboleth)
|
||||
{
|
||||
regexlisttype *item;
|
||||
regex_t rgx;
|
||||
|
||||
for (item = head; item != NULL; item = item->next) {
|
||||
regcomp(&rgx, item->full_regex, NANO_REG_EXTENDED);
|
||||
|
||||
if (regexec(&rgx, shibboleth, 0, NULL, 0) == 0) {
|
||||
regfree(&rgx);
|
||||
for (regexlisttype *item = head; item != NULL; item = item->next)
|
||||
if (regexec(item->one_rgx, shibboleth, 0, NULL, 0) == 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
regfree(&rgx);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Update the color information based on the current filename and content. */
|
||||
void color_update(void)
|
||||
/* Find a syntax that applies to the current buffer, based upon filename
|
||||
* or buffer content, and load and prime this syntax when needed. */
|
||||
void find_and_prime_applicable_syntax(void)
|
||||
{
|
||||
syntaxtype *sint = NULL;
|
||||
syntaxtype *sntx = NULL;
|
||||
|
||||
/* If the rcfiles were not read, or contained no syntaxes, get out. */
|
||||
if (syntaxes == NULL)
|
||||
return;
|
||||
|
||||
/* If we specified a syntax-override string, use it. */
|
||||
if (syntaxstr != NULL) {
|
||||
if (syntaxstr) {
|
||||
/* An override of "none" is like having no syntax at all. */
|
||||
if (strcmp(syntaxstr, "none") == 0)
|
||||
return;
|
||||
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next) {
|
||||
if (strcmp(sint->name, syntaxstr) == 0)
|
||||
for (sntx = syntaxes; sntx != NULL; sntx = sntx->next)
|
||||
if (strcmp(sntx->name, syntaxstr) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (sint == NULL && !inhelp)
|
||||
if (sntx == NULL && !inhelp)
|
||||
statusline(ALERT, _("Unknown syntax name: %s"), syntaxstr);
|
||||
}
|
||||
|
||||
/* If no syntax-override string was specified, or it didn't match,
|
||||
* try finding a syntax based on the filename (extension). */
|
||||
if (sint == NULL && !inhelp) {
|
||||
if (sntx == NULL && !inhelp) {
|
||||
char *fullname = get_full_path(openfile->filename);
|
||||
|
||||
if (fullname == NULL)
|
||||
fullname = mallocstrcpy(fullname, openfile->filename);
|
||||
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next) {
|
||||
if (found_in_list(sint->extensions, fullname))
|
||||
for (sntx = syntaxes; sntx != NULL; sntx = sntx->next)
|
||||
if (found_in_list(sntx->extensions, fullname))
|
||||
break;
|
||||
}
|
||||
|
||||
free(fullname);
|
||||
}
|
||||
|
||||
/* If the filename didn't match anything, try the first line. */
|
||||
if (sint == NULL && !inhelp) {
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next) {
|
||||
if (found_in_list(sint->headers, openfile->filetop->data))
|
||||
if (sntx == NULL && !inhelp) {
|
||||
for (sntx = syntaxes; sntx != NULL; sntx = sntx->next)
|
||||
if (found_in_list(sntx->headers, openfile->filetop->data))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
/* If we still don't have an answer, try using magic. */
|
||||
if (sint == NULL && !inhelp) {
|
||||
/* If we still don't have an answer, try using magic (when requested). */
|
||||
if (sntx == NULL && !inhelp && ISSET(USE_MAGIC)) {
|
||||
struct stat fileinfo;
|
||||
magic_t cookie = NULL;
|
||||
const char *magicstring = NULL;
|
||||
@@ -237,11 +210,10 @@ void color_update(void)
|
||||
}
|
||||
|
||||
/* Now try and find a syntax that matches the magic string. */
|
||||
if (magicstring != NULL) {
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next) {
|
||||
if (found_in_list(sint->magics, magicstring))
|
||||
if (magicstring) {
|
||||
for (sntx = syntaxes; sntx != NULL; sntx = sntx->next)
|
||||
if (found_in_list(sntx->magics, magicstring))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (stat(openfile->filename, &fileinfo) == 0)
|
||||
@@ -250,30 +222,19 @@ void color_update(void)
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
|
||||
/* If nothing at all matched, see if there is a default syntax. */
|
||||
if (sint == NULL && !inhelp) {
|
||||
for (sint = syntaxes; sint != NULL; sint = sint->next) {
|
||||
if (strcmp(sint->name, "default") == 0)
|
||||
if (sntx == NULL && !inhelp) {
|
||||
for (sntx = syntaxes; sntx != NULL; sntx = sntx->next)
|
||||
if (strcmp(sntx->name, "default") == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* When the syntax isn't loaded yet, parse it and initialize its colors. */
|
||||
if (sint != NULL && sint->filename != NULL) {
|
||||
parse_one_include(sint->filename, sint);
|
||||
set_syntax_colorpairs(sint);
|
||||
if (sntx && sntx->filename) {
|
||||
parse_one_include(sntx->filename, sntx);
|
||||
set_syntax_colorpairs(sntx);
|
||||
}
|
||||
|
||||
openfile->syntax = sint;
|
||||
openfile->colorstrings = (sint == NULL ? NULL : sint->color);
|
||||
}
|
||||
|
||||
/* Allocate and initialize (for the given line) the cache for multiline info. */
|
||||
void set_up_multicache(linestruct *line)
|
||||
{
|
||||
line->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||
|
||||
for (int index = 0; index < openfile->syntax->nmultis; index++)
|
||||
line->multidata[index] = -1;
|
||||
openfile->syntax = sntx;
|
||||
}
|
||||
|
||||
/* Determine whether the matches of multiline regexes are still the same,
|
||||
@@ -286,13 +247,15 @@ void check_the_multis(linestruct *line)
|
||||
char *afterstart;
|
||||
|
||||
/* If there is no syntax or no multiline regex, there is nothing to do. */
|
||||
if (openfile->syntax == NULL || openfile->syntax->nmultis == 0)
|
||||
if (!openfile->syntax || openfile->syntax->multiscore == 0)
|
||||
return;
|
||||
|
||||
if (line->multidata == NULL)
|
||||
set_up_multicache(line);
|
||||
if (line->multidata == NULL) {
|
||||
refresh_needed = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
for (ink = openfile->colorstrings; ink != NULL; ink = ink->next) {
|
||||
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
||||
/* If it's not a multiline regex, skip. */
|
||||
if (ink->end == NULL)
|
||||
continue;
|
||||
@@ -302,23 +265,28 @@ void check_the_multis(linestruct *line)
|
||||
anend = (regexec(ink->end, afterstart, 1, &endmatch, 0) == 0);
|
||||
|
||||
/* Check whether the multidata still matches the current situation. */
|
||||
if (line->multidata[ink->id] == CNONE ||
|
||||
line->multidata[ink->id] == CWHOLELINE) {
|
||||
if (!astart && !anend)
|
||||
if (line->multidata[ink->id] == NOTHING) {
|
||||
if (!astart)
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] == CSTARTENDHERE) {
|
||||
if (astart && anend && startmatch.rm_so < endmatch.rm_so)
|
||||
} else if (line->multidata[ink->id] == WHOLELINE) {
|
||||
/* Ensure that a detected start match is not actually an end match. */
|
||||
if (!anend && (!astart || regexec(ink->end, line->data, 1, &endmatch, 0) != 0))
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] == CBEGINBEFORE) {
|
||||
if (!astart && anend)
|
||||
} else if (line->multidata[ink->id] == JUSTONTHIS) {
|
||||
if (astart && anend && regexec(ink->start, line->data + startmatch.rm_eo +
|
||||
endmatch.rm_eo, 1, &startmatch, 0) != 0)
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] == CENDAFTER) {
|
||||
} else if (line->multidata[ink->id] == STARTSHERE) {
|
||||
if (astart && !anend)
|
||||
continue;
|
||||
} else if (line->multidata[ink->id] == ENDSHERE) {
|
||||
if (!astart && anend)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* There is a mismatch, so something changed: repaint. */
|
||||
refresh_needed = TRUE;
|
||||
perturbed = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -331,14 +299,21 @@ void precalc_multicolorinfo(void)
|
||||
regmatch_t startmatch, endmatch;
|
||||
linestruct *line, *tailline;
|
||||
|
||||
if (openfile->colorstrings == NULL || ISSET(NO_COLOR_SYNTAX))
|
||||
if (!openfile->syntax || openfile->syntax->multiscore == 0 || ISSET(NO_SYNTAX))
|
||||
return;
|
||||
|
||||
//#define TIMEPRECALC 123
|
||||
#ifdef TIMEPRECALC
|
||||
#include <time.h>
|
||||
clock_t start = clock();
|
||||
#endif
|
||||
|
||||
/* For each line, allocate cache space for the multiline-regex info. */
|
||||
for (line = openfile->filetop; line != NULL; line = line->next)
|
||||
set_up_multicache(line);
|
||||
if (!line->multidata)
|
||||
line->multidata = nmalloc(openfile->syntax->multiscore * sizeof(short));
|
||||
|
||||
for (ink = openfile->colorstrings; ink != NULL; ink = ink->next) {
|
||||
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
||||
/* If this is not a multi-line regex, skip it. */
|
||||
if (ink->end == NULL)
|
||||
continue;
|
||||
@@ -347,66 +322,63 @@ void precalc_multicolorinfo(void)
|
||||
int index = 0;
|
||||
|
||||
/* Assume nothing applies until proven otherwise below. */
|
||||
line->multidata[ink->id] = CNONE;
|
||||
line->multidata[ink->id] = NOTHING;
|
||||
|
||||
/* For an unpaired start match, mark all remaining lines. */
|
||||
if (line->prev && line->prev->multidata[ink->id] == CWOULDBE) {
|
||||
line->multidata[ink->id] = CWOULDBE;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* When the line contains a start match, look for an end, and if
|
||||
* found, mark all the lines that are affected. */
|
||||
while (regexec(ink->start, line->data + index, 1,
|
||||
&startmatch, (index == 0) ? 0 : REG_NOTBOL) == 0) {
|
||||
/* When the line contains a start match, look for an end,
|
||||
* and if found, mark all the lines that are affected. */
|
||||
while (regexec(ink->start, line->data + index, 1, &startmatch,
|
||||
(index == 0) ? 0 : REG_NOTBOL) == 0) {
|
||||
/* Begin looking for an end match after the start match. */
|
||||
index += startmatch.rm_eo;
|
||||
|
||||
/* If there is an end match on this line, mark the line, but
|
||||
* continue looking for other starts after it. */
|
||||
if (regexec(ink->end, line->data + index, 1,
|
||||
&endmatch, (index == 0) ? 0 : REG_NOTBOL) == 0) {
|
||||
line->multidata[ink->id] = CSTARTENDHERE;
|
||||
/* If there is an end match on this same line, mark the line,
|
||||
* but continue looking for other starts after it. */
|
||||
if (regexec(ink->end, line->data + index, 1, &endmatch,
|
||||
(index == 0) ? 0 : REG_NOTBOL) == 0) {
|
||||
line->multidata[ink->id] = JUSTONTHIS;
|
||||
|
||||
index += endmatch.rm_eo;
|
||||
/* If both start and end are mere anchors, step ahead. */
|
||||
if (startmatch.rm_so == startmatch.rm_eo &&
|
||||
endmatch.rm_so == endmatch.rm_eo) {
|
||||
/* When at end-of-line, we're done. */
|
||||
|
||||
/* If the total match has zero length, force an advance. */
|
||||
if (startmatch.rm_eo - startmatch.rm_so + endmatch.rm_eo == 0) {
|
||||
/* When at end-of-line, there is no other start. */
|
||||
if (line->data[index] == '\0')
|
||||
break;
|
||||
index = step_right(line->data, index);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Look for an end match on later lines. */
|
||||
tailline = line->next;
|
||||
|
||||
while (tailline != NULL) {
|
||||
if (regexec(ink->end, tailline->data, 1, &endmatch, 0) == 0)
|
||||
break;
|
||||
while (tailline && regexec(ink->end, tailline->data, 1, &endmatch, 0) != 0)
|
||||
tailline = tailline->next;
|
||||
}
|
||||
|
||||
line->multidata[ink->id] = STARTSHERE;
|
||||
|
||||
// Note that this also advances the line in the main loop.
|
||||
for (line = line->next; line != tailline; line = line->next)
|
||||
line->multidata[ink->id] = WHOLELINE;
|
||||
|
||||
if (tailline == NULL) {
|
||||
line->multidata[ink->id] = CWOULDBE;
|
||||
line = openfile->filebot;
|
||||
break;
|
||||
}
|
||||
|
||||
/* We found it, we found it, la la la la la. Mark all
|
||||
* the lines in between and the end properly. */
|
||||
line->multidata[ink->id] = CENDAFTER;
|
||||
tailline->multidata[ink->id] = ENDSHERE;
|
||||
|
||||
for (line = line->next; line != tailline; line = line->next)
|
||||
line->multidata[ink->id] = CWHOLELINE;
|
||||
|
||||
tailline->multidata[ink->id] = CBEGINBEFORE;
|
||||
|
||||
/* Begin looking for a new start after the end match. */
|
||||
/* Look for a possible new start after the end match. */
|
||||
index = endmatch.rm_eo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TIMEPRECALC
|
||||
statusline(NOTICE, "Precalculation: %.1f ms", 1000 * (double)(clock() - start) / CLOCKS_PER_SEC);
|
||||
napms(1200);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
732
src/cut.c
732
src/cut.c
@@ -1,9 +1,9 @@
|
||||
/**************************************************************************
|
||||
* cut.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014 Mark Majeres *
|
||||
* Copyright (C) 2016, 2018, 2019 Benno Schulenberg *
|
||||
* Copyright (C) 2016, 2018-2020 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -16,56 +16,61 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Delete the character under the cursor. */
|
||||
void do_deletion(undo_type action)
|
||||
/* Delete the character at the current position, and
|
||||
* add or update an undo item for the given action. */
|
||||
void expunge(undo_type action)
|
||||
{
|
||||
#ifndef NANO_TINY
|
||||
size_t old_amount = 0;
|
||||
#endif
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
/* When in the middle of a line, delete the current character. */
|
||||
if (openfile->current->data[openfile->current_x] != '\0') {
|
||||
if (openfile->current->data[openfile->current_x]) {
|
||||
int charlen = char_length(openfile->current->data + openfile->current_x);
|
||||
size_t line_len = strlen(openfile->current->data + openfile->current_x);
|
||||
#ifndef NANO_TINY
|
||||
size_t old_amount = ISSET(SOFTWRAP) ? extra_chunks_in(openfile->current) : 0;
|
||||
|
||||
/* If the type of action changed or the cursor moved to a different
|
||||
* line, create a new undo item, otherwise update the existing item. */
|
||||
if (action != openfile->last_action ||
|
||||
openfile->current->lineno != openfile->current_undo->lineno)
|
||||
openfile->current->lineno != openfile->current_undo->head_lineno)
|
||||
add_undo(action, NULL);
|
||||
else
|
||||
update_undo(action);
|
||||
|
||||
if (ISSET(SOFTWRAP))
|
||||
old_amount = number_of_chunks_in(openfile->current);
|
||||
#endif
|
||||
/* Move the remainder of the line "in", over the current character. */
|
||||
memmove(&openfile->current->data[openfile->current_x],
|
||||
&openfile->current->data[openfile->current_x + charlen],
|
||||
line_len - charlen + 1);
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
#ifndef NANO_TINY
|
||||
/* When softwrapping, a changed number of chunks requires a refresh. */
|
||||
if (ISSET(SOFTWRAP) && extra_chunks_in(openfile->current) != old_amount)
|
||||
refresh_needed = TRUE;
|
||||
/* When panning, and we have come near edge of the viewport... */
|
||||
else if (united_sidescroll && openfile->placewewant < openfile->brink + CUSHION)
|
||||
refresh_needed = TRUE;
|
||||
|
||||
/* Adjust the mark if it is after the cursor on the current line. */
|
||||
if (openfile->mark == openfile->current &&
|
||||
openfile->mark_x > openfile->current_x)
|
||||
if (openfile->mark == openfile->current && openfile->mark_x > openfile->current_x)
|
||||
openfile->mark_x -= charlen;
|
||||
#endif
|
||||
/* Otherwise, when not at end of buffer, join this line with the next. */
|
||||
} else if (openfile->current != openfile->filebot) {
|
||||
linestruct *joining = openfile->current->next;
|
||||
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
UNFOLD_SEGMENT(joining);
|
||||
|
||||
/* If there is a magic line, and we're before it: don't eat it. */
|
||||
if (joining == openfile->filebot && openfile->current_x != 0 &&
|
||||
!ISSET(NO_NEWLINES)) {
|
||||
if (joining == openfile->filebot && openfile->current_x != 0 && !ISSET(NO_NEWLINES)) {
|
||||
#ifndef NANO_TINY
|
||||
if (action == BACK)
|
||||
add_undo(BACK, NULL);
|
||||
@@ -75,44 +80,46 @@ void do_deletion(undo_type action)
|
||||
|
||||
#ifndef NANO_TINY
|
||||
add_undo(action, NULL);
|
||||
#endif
|
||||
/* Add the contents of the next line to those of the current one. */
|
||||
openfile->current->data = charealloc(openfile->current->data,
|
||||
strlen(openfile->current->data) + strlen(joining->data) + 1);
|
||||
strcat(openfile->current->data, joining->data);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Adjust the mark if it was on the line that was "eaten". */
|
||||
/* Adjust the mark if it is on the line that will be "eaten". */
|
||||
if (openfile->mark == joining) {
|
||||
openfile->mark = openfile->current;
|
||||
openfile->mark_x += openfile->current_x;
|
||||
}
|
||||
#endif
|
||||
unlink_node(joining);
|
||||
renumber_from(openfile->current);
|
||||
|
||||
/* Two lines were joined, so we need to refresh the screen. */
|
||||
openfile->current->has_anchor |= joining->has_anchor;
|
||||
#endif
|
||||
/* Add the content of the next line to that of the current one. */
|
||||
openfile->current->data = nrealloc(openfile->current->data,
|
||||
strlen(openfile->current->data) + strlen(joining->data) + 1);
|
||||
strcat(openfile->current->data, joining->data);
|
||||
|
||||
unlink_node(joining);
|
||||
|
||||
/* Two lines were joined, so do a renumbering and refresh the screen. */
|
||||
renumber_from(openfile->current);
|
||||
refresh_needed = TRUE;
|
||||
} else
|
||||
/* We're at the end-of-file: nothing to do. */
|
||||
return;
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
if (!refresh_needed)
|
||||
check_the_multis(openfile->current);
|
||||
#endif
|
||||
if (!refresh_needed)
|
||||
update_line(openfile->current, openfile->current_x);
|
||||
|
||||
/* Adjust the file size, and remember it for a possible redo. */
|
||||
openfile->totsize--;
|
||||
#ifndef NANO_TINY
|
||||
openfile->current_undo->newsize = openfile->totsize;
|
||||
|
||||
/* If the number of screen rows that a softwrapped line occupies
|
||||
* has changed, we need a full refresh. */
|
||||
if (ISSET(SOFTWRAP) && refresh_needed == FALSE &&
|
||||
number_of_chunks_in(openfile->current) != old_amount)
|
||||
refresh_needed = TRUE;
|
||||
#endif
|
||||
|
||||
set_modified();
|
||||
}
|
||||
|
||||
/* Delete the character under the cursor. */
|
||||
/* Delete the character under the cursor plus any succeeding zero-widths,
|
||||
* or, when the mark is on and --zap is active, delete the marked region. */
|
||||
void do_delete(void)
|
||||
{
|
||||
#ifndef NANO_TINY
|
||||
@@ -120,11 +127,19 @@ void do_delete(void)
|
||||
zap_text();
|
||||
else
|
||||
#endif
|
||||
do_deletion(DEL);
|
||||
{
|
||||
expunge(DEL);
|
||||
#ifdef ENABLE_UTF8
|
||||
while (openfile->current->data[openfile->current_x] &&
|
||||
is_zerowidth(openfile->current->data + openfile->current_x))
|
||||
expunge(DEL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* Backspace over one character. That is, move the cursor left one
|
||||
* character, and then delete the character under the cursor. */
|
||||
* character, and then delete the character under the cursor. Or,
|
||||
* when mark is on and --zap is active, delete the marked region. */
|
||||
void do_backspace(void)
|
||||
{
|
||||
#ifndef NANO_TINY
|
||||
@@ -132,20 +147,55 @@ void do_backspace(void)
|
||||
zap_text();
|
||||
else
|
||||
#endif
|
||||
if (openfile->current != openfile->filetop || openfile->current_x > 0) {
|
||||
do_left();
|
||||
do_deletion(BACK);
|
||||
if (openfile->current_x > 0) {
|
||||
openfile->current_x = step_left(openfile->current->data, openfile->current_x);
|
||||
expunge(BACK);
|
||||
} else if (openfile->current != openfile->filetop) {
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (openfile->current->prev->folded) {
|
||||
openfile->current = openfile->current->prev;
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
} else
|
||||
#endif
|
||||
do_left();
|
||||
expunge(BACK);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return FALSE when a cut command would not actually cut anything: when
|
||||
* on an empty line at EOF, or when the mark covers zero characters, or
|
||||
* (when test_cliff is TRUE) when the magic line would be cut. */
|
||||
bool is_cuttable(bool test_cliff)
|
||||
{
|
||||
size_t from = (test_cliff) ? openfile->current_x : 0;
|
||||
|
||||
if ((openfile->current->next == NULL && openfile->current->data[from] == '\0'
|
||||
#ifndef NANO_TINY
|
||||
&& openfile->mark == NULL) ||
|
||||
(openfile->mark == openfile->current &&
|
||||
openfile->mark_x == openfile->current_x) ||
|
||||
(from > 0 && !ISSET(NO_NEWLINES) &&
|
||||
openfile->current->data[from] == '\0' &&
|
||||
openfile->current->next == openfile->filebot
|
||||
#endif
|
||||
)) {
|
||||
#ifndef NANO_TINY
|
||||
statusbar(_("Nothing was cut"));
|
||||
openfile->mark = NULL;
|
||||
#endif
|
||||
return FALSE;
|
||||
} else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Delete text from the cursor until the first start of a word to
|
||||
* the left, or to the right when forward is TRUE. */
|
||||
void chop_word(bool forward)
|
||||
{
|
||||
/* Remember the current cursor position. */
|
||||
linestruct *is_current = openfile->current;
|
||||
size_t is_current_x = openfile->current_x;
|
||||
linestruct *was_current = openfile->current;
|
||||
size_t was_x = openfile->current_x;
|
||||
/* Remember where the cutbuffer is, then make it seem blank. */
|
||||
linestruct *is_cutbuffer = cutbuffer;
|
||||
|
||||
@@ -156,34 +206,34 @@ void chop_word(bool forward)
|
||||
* on the edge of the original line, then put the cursor on that
|
||||
* edge instead, so that lines will not be joined unexpectedly. */
|
||||
if (!forward) {
|
||||
do_prev_word(ISSET(WORD_BOUNDS));
|
||||
if (openfile->current != is_current) {
|
||||
if (is_current_x > 0) {
|
||||
openfile->current = is_current;
|
||||
do_prev_word(ALLOW_FOLDED);
|
||||
if (openfile->current != was_current) {
|
||||
if (was_x > 0) {
|
||||
openfile->current = was_current;
|
||||
openfile->current_x = 0;
|
||||
} else
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
}
|
||||
} else {
|
||||
do_next_word(FALSE, ISSET(WORD_BOUNDS));
|
||||
if (openfile->current != is_current &&
|
||||
is_current->data[is_current_x] != '\0') {
|
||||
openfile->current = is_current;
|
||||
openfile->current_x = strlen(is_current->data);
|
||||
do_next_word(ISSET(AFTER_ENDS), ALLOW_FOLDED);
|
||||
if (openfile->current != was_current && was_current->data[was_x]) {
|
||||
openfile->current = was_current;
|
||||
openfile->current_x = strlen(was_current->data);
|
||||
}
|
||||
}
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
|
||||
/* Set the mark at the start of that word. */
|
||||
openfile->mark = openfile->current;
|
||||
openfile->mark_x = openfile->current_x;
|
||||
|
||||
/* Put the cursor back where it was, so an undo will put it there too. */
|
||||
openfile->current = is_current;
|
||||
openfile->current_x = is_current_x;
|
||||
openfile->current = was_current;
|
||||
openfile->current_x = was_x;
|
||||
|
||||
/* Now kill the marked region and a word is gone. */
|
||||
add_undo(CUT, NULL);
|
||||
do_snip(FALSE, TRUE, FALSE, FALSE);
|
||||
do_snip(TRUE, FALSE, FALSE);
|
||||
update_undo(CUT);
|
||||
|
||||
/* Discard the cut word and restore the cutbuffer. */
|
||||
@@ -205,173 +255,300 @@ void chop_next_word(void)
|
||||
{
|
||||
openfile->mark = NULL;
|
||||
|
||||
if (is_cuttable(openfile->current_x > 0))
|
||||
if (is_cuttable(TRUE))
|
||||
chop_word(FORWARD);
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* Move the whole current line from the current buffer to the cutbuffer. */
|
||||
void cut_line(void)
|
||||
/* Excise the text between the given two points and add it to the cutbuffer. */
|
||||
void extract_segment(linestruct *top, size_t top_x, linestruct *bot, size_t bot_x)
|
||||
{
|
||||
/* When not on the last line of the buffer, move the text from the
|
||||
* head of this line to the head of the next line into the cutbuffer;
|
||||
* otherwise, move all of the text of this line into the cutbuffer. */
|
||||
if (openfile->current != openfile->filebot)
|
||||
extract(openfile->current, 0, openfile->current->next, 0);
|
||||
else
|
||||
extract(openfile->current, 0,
|
||||
openfile->current, strlen(openfile->current->data));
|
||||
linestruct *taken, *last;
|
||||
bool edittop_inside = (openfile->edittop->lineno >= top->lineno &&
|
||||
openfile->edittop->lineno <= bot->lineno);
|
||||
#ifndef NANO_TINY
|
||||
bool same_line = (openfile->mark == top);
|
||||
bool post_marked = (openfile->mark && (openfile->mark->lineno > top->lineno ||
|
||||
(same_line && openfile->mark_x > top_x)));
|
||||
static bool inherited_anchor = FALSE;
|
||||
bool had_anchor = top->has_anchor;
|
||||
|
||||
openfile->placewewant = 0;
|
||||
if (top == bot && top_x == bot_x)
|
||||
return;
|
||||
|
||||
if (top != bot) {
|
||||
UNFOLD_SEGMENT(top);
|
||||
for (linestruct *line = top->next; line != bot->next; line = line->next) {
|
||||
UNFOLD_SEGMENT(line);
|
||||
had_anchor |= line->has_anchor;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (top == bot) {
|
||||
taken = make_new_node(NULL);
|
||||
taken->data = measured_copy(top->data + top_x, bot_x - top_x);
|
||||
memmove(top->data + top_x, top->data + bot_x, strlen(top->data + bot_x) + 1);
|
||||
last = taken;
|
||||
} else if (top_x == 0 && bot_x == 0) {
|
||||
taken = top;
|
||||
last = make_new_node(NULL);
|
||||
last->data = copy_of("");
|
||||
#ifndef NANO_TINY
|
||||
last->has_anchor = bot->has_anchor;
|
||||
#endif
|
||||
last->prev = bot->prev;
|
||||
bot->prev->next = last;
|
||||
last->next = NULL;
|
||||
|
||||
bot->prev = top->prev;
|
||||
if (top->prev)
|
||||
top->prev->next = bot;
|
||||
else
|
||||
openfile->filetop = bot;
|
||||
|
||||
openfile->current = bot;
|
||||
} else {
|
||||
taken = make_new_node(NULL);
|
||||
taken->data = copy_of(top->data + top_x);
|
||||
taken->next = top->next;
|
||||
top->next->prev = taken;
|
||||
|
||||
top->next = bot->next;
|
||||
if (bot->next)
|
||||
bot->next->prev = top;
|
||||
|
||||
top->data = nrealloc(top->data, top_x + strlen(bot->data + bot_x) + 1);
|
||||
strcpy(top->data + top_x, bot->data + bot_x);
|
||||
|
||||
last = bot;
|
||||
last->data[bot_x] = '\0';
|
||||
last->next = NULL;
|
||||
|
||||
openfile->current = top;
|
||||
}
|
||||
|
||||
/* Subtract the size of the excised text from the buffer size. */
|
||||
openfile->totsize -= number_of_characters_in(taken, last);
|
||||
|
||||
/* If the cutbuffer is currently empty, just move all the text directly
|
||||
* into it; otherwise, append the text to what is already there. */
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = taken;
|
||||
cutbottom = last;
|
||||
#ifndef NANO_TINY
|
||||
inherited_anchor = taken->has_anchor;
|
||||
#endif
|
||||
} else {
|
||||
cutbottom->data = nrealloc(cutbottom->data,
|
||||
strlen(cutbottom->data) + strlen(taken->data) + 1);
|
||||
strcat(cutbottom->data, taken->data);
|
||||
#ifndef NANO_TINY
|
||||
cutbottom->has_anchor = taken->has_anchor && !inherited_anchor;
|
||||
inherited_anchor |= taken->has_anchor;
|
||||
#endif
|
||||
cutbottom->next = taken->next;
|
||||
delete_node(taken);
|
||||
|
||||
if (cutbottom->next) {
|
||||
cutbottom->next->prev = cutbottom;
|
||||
cutbottom = last;
|
||||
}
|
||||
}
|
||||
|
||||
openfile->current_x = top_x;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
openfile->current->has_anchor = had_anchor;
|
||||
|
||||
if (post_marked || same_line)
|
||||
openfile->mark = openfile->current;
|
||||
if (post_marked)
|
||||
openfile->mark_x = openfile->current_x;
|
||||
#endif
|
||||
if (openfile->filebot == bot)
|
||||
openfile->filebot = openfile->current;
|
||||
|
||||
renumber_from(openfile->current);
|
||||
|
||||
/* When the beginning of the viewport was inside the excision, adjust. */
|
||||
if (edittop_inside) {
|
||||
adjust_viewport(STATIONARY);
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* If the text doesn't end with a newline, and it should, add one. */
|
||||
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0])
|
||||
new_magicline();
|
||||
}
|
||||
|
||||
/* Meld the buffer that starts at topline into the current file buffer
|
||||
* at the current cursor position. */
|
||||
void ingraft_buffer(linestruct *topline)
|
||||
{
|
||||
linestruct *line = openfile->current;
|
||||
size_t length = strlen(line->data);
|
||||
size_t extralen = strlen(topline->data);
|
||||
size_t xpos = openfile->current_x;
|
||||
char *tailtext = copy_of(line->data + xpos);
|
||||
#ifndef NANO_TINY
|
||||
bool mark_follows = (openfile->mark == line && !mark_is_before_cursor());
|
||||
#endif
|
||||
linestruct *botline = topline;
|
||||
|
||||
UNFOLD_SEGMENT(line);
|
||||
|
||||
while (botline->next)
|
||||
botline = botline->next;
|
||||
|
||||
/* Add the size of the text to be grafted to the buffer size. */
|
||||
openfile->totsize += number_of_characters_in(topline, botline);
|
||||
|
||||
if (topline != botline)
|
||||
length = xpos;
|
||||
|
||||
if (extralen > 0) {
|
||||
/* Insert the text of topline at the current cursor position. */
|
||||
line->data = nrealloc(line->data, length + extralen + 1);
|
||||
memmove(line->data + xpos + extralen, line->data + xpos, length - xpos + 1);
|
||||
strncpy(line->data + xpos, topline->data, extralen);
|
||||
}
|
||||
|
||||
if (topline != botline) {
|
||||
/* When inserting at end-of-buffer, update the relevant pointer. */
|
||||
if (line->next == NULL)
|
||||
openfile->filebot = botline;
|
||||
|
||||
line->data[xpos + extralen] = '\0';
|
||||
|
||||
/* Hook the grafted lines in after the current one. */
|
||||
botline->next = openfile->current->next;
|
||||
if (botline->next)
|
||||
botline->next->prev = botline;
|
||||
openfile->current->next = topline->next;
|
||||
topline->next->prev = openfile->current;
|
||||
|
||||
/* Add the text after the cursor position at the end of botline. */
|
||||
length = strlen(botline->data);
|
||||
extralen = strlen(tailtext);
|
||||
botline->data = nrealloc(botline->data, length + extralen + 1);
|
||||
strcpy(botline->data + length, tailtext);
|
||||
|
||||
/* Put the cursor at the end of the grafted text. */
|
||||
openfile->current = botline;
|
||||
openfile->current_x = length;
|
||||
} else
|
||||
openfile->current_x += extralen;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* When needed, update the mark's pointer and position. */
|
||||
if (mark_follows && topline != botline) {
|
||||
openfile->mark = botline;
|
||||
openfile->mark_x += length - xpos;
|
||||
} else if (mark_follows)
|
||||
openfile->mark_x += extralen;
|
||||
#endif
|
||||
|
||||
delete_node(topline);
|
||||
free(tailtext);
|
||||
|
||||
renumber_from(line);
|
||||
|
||||
/* If the text doesn't end with a newline, and it should, add one. */
|
||||
if (!ISSET(NO_NEWLINES) && openfile->filebot->data[0])
|
||||
new_magicline();
|
||||
}
|
||||
|
||||
/* Meld a copy of the given buffer into the current file buffer. */
|
||||
void copy_from_buffer(linestruct *somebuffer)
|
||||
{
|
||||
#ifdef ENABLE_COLOR
|
||||
size_t threshold = openfile->edittop->lineno + editwinrows - 1;
|
||||
#endif
|
||||
linestruct *the_copy = copy_buffer(somebuffer);
|
||||
|
||||
ingraft_buffer(the_copy);
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
if (openfile->current->lineno > threshold || ISSET(SOFTWRAP))
|
||||
recook = TRUE;
|
||||
else
|
||||
perturbed = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Move all text from the cursor position until the end of this line into
|
||||
* the cutbuffer. But when already at the end of a line, then move this
|
||||
* "newline" to the cutbuffer. */
|
||||
void cut_to_eol(void)
|
||||
{
|
||||
size_t data_len = strlen(openfile->current->data);
|
||||
|
||||
/* When not at the end of a line, move the rest of this line into
|
||||
* the cutbuffer. Otherwise, when not at the end of the buffer,
|
||||
* move the line separation into the cutbuffer. */
|
||||
if (openfile->current_x < data_len)
|
||||
extract(openfile->current, openfile->current_x,
|
||||
openfile->current, data_len);
|
||||
else if (openfile->current != openfile->filebot) {
|
||||
extract(openfile->current, openfile->current_x,
|
||||
openfile->current->next, 0);
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
}
|
||||
|
||||
/* Move all marked text from the current buffer into the cutbuffer. */
|
||||
void cut_marked(bool *right_side_up)
|
||||
void cut_marked_region(void)
|
||||
{
|
||||
linestruct *top, *bot;
|
||||
size_t top_x, bot_x;
|
||||
|
||||
get_region((const linestruct **)&top, &top_x,
|
||||
(const linestruct **)&bot, &bot_x, right_side_up);
|
||||
get_region(&top, &top_x, &bot, &bot_x);
|
||||
|
||||
extract(top, top_x, bot, bot_x);
|
||||
extract_segment(top, top_x, bot, bot_x);
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Move all text from the cursor position to end-of-file into the cutbuffer. */
|
||||
void cut_to_eof(void)
|
||||
{
|
||||
extract(openfile->current, openfile->current_x,
|
||||
openfile->filebot, strlen(openfile->filebot->data));
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* Move text from the current buffer into the cutbuffer. If
|
||||
* copying is TRUE, copy the text back into the buffer afterward.
|
||||
/* Move text from the current buffer into the cutbuffer.
|
||||
* If until_eof is TRUE, move all text from the current cursor
|
||||
* position to the end of the file into the cutbuffer. If append
|
||||
* is TRUE (when zapping), always append the cut to the cutbuffer. */
|
||||
void do_snip(bool copying, bool marked, bool until_eof, bool append)
|
||||
void do_snip(bool marked, bool until_eof, bool append)
|
||||
{
|
||||
linestruct *line = openfile->current;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
linestruct *was_bottom = NULL;
|
||||
/* The current end of the cutbuffer, before we add text to it. */
|
||||
size_t botlen = 0;
|
||||
/* The length of the string at the current end of the cutbuffer,
|
||||
* before we add text to it. */
|
||||
bool using_magicline = !ISSET(NO_NEWLINES);
|
||||
/* Whether an automatic newline should be added at end-of-buffer. */
|
||||
bool right_side_up = TRUE;
|
||||
/* There *is* no region, *or* it is marked forward. */
|
||||
keep_cutbuffer &= (openfile->last_action != COPY);
|
||||
#endif
|
||||
static bool precedent = FALSE;
|
||||
/* Whether the previous operation was a copying operation. */
|
||||
|
||||
/* If cuts were not continuous, or when cutting a region, clear the slate. */
|
||||
if ((!keep_cutbuffer || marked || until_eof || copying != precedent) &&
|
||||
!append) {
|
||||
if ((marked || until_eof || !keep_cutbuffer) && !append) {
|
||||
free_lines(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
}
|
||||
|
||||
/* After a line operation, future ones should add to the cutbuffer. */
|
||||
keep_cutbuffer = !marked && !until_eof;
|
||||
precedent = copying;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (copying) {
|
||||
/* If the cutbuffer isn't empty, remember where it currently ends. */
|
||||
if (cutbuffer != NULL) {
|
||||
was_bottom = cutbottom;
|
||||
botlen = strlen(cutbottom->data);
|
||||
}
|
||||
/* Don't add a magic line when moving text to the cutbuffer. */
|
||||
SET(NO_NEWLINES);
|
||||
}
|
||||
|
||||
/* Now move the relevant piece of text into the cutbuffer. */
|
||||
if (until_eof)
|
||||
cut_to_eof();
|
||||
extract_segment(openfile->current, openfile->current_x,
|
||||
openfile->filebot, strlen(openfile->filebot->data));
|
||||
else if (openfile->mark) {
|
||||
cut_marked(&right_side_up);
|
||||
cut_marked_region();
|
||||
openfile->mark = NULL;
|
||||
} else if (ISSET(CUT_FROM_CURSOR))
|
||||
cut_to_eol();
|
||||
else
|
||||
#endif
|
||||
cut_line();
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (copying) {
|
||||
/* Copy the text that was put into the cutbuffer back into the current
|
||||
* file buffer, so that in the end nothing has been deleted. */
|
||||
if (cutbuffer != NULL) {
|
||||
if (was_bottom != NULL) {
|
||||
was_bottom->data += botlen;
|
||||
copy_from_buffer(was_bottom);
|
||||
was_bottom->data -= botlen;
|
||||
} else
|
||||
copy_from_buffer(cutbuffer);
|
||||
|
||||
/* If the copied region was marked forward, put the new desired
|
||||
* x position at its end; otherwise, leave it at its beginning. */
|
||||
if (right_side_up)
|
||||
openfile->placewewant = xplustabs();
|
||||
} else if (ISSET(CUT_FROM_CURSOR)) {
|
||||
/* When not at the end of a line, move the rest of this line into
|
||||
* the cutbuffer. Otherwise, when not at the end of the buffer,
|
||||
* move just the "line separator" into the cutbuffer. */
|
||||
if (line->data[openfile->current_x])
|
||||
extract_segment(line, openfile->current_x, line, strlen(line->data));
|
||||
else if (openfile->current != openfile->filebot) {
|
||||
extract_segment(line, openfile->current_x, line->next, 0);
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
/* Restore the magic-line behavior now that we're done fiddling. */
|
||||
if (using_magicline)
|
||||
UNSET(NO_NEWLINES);
|
||||
} else
|
||||
#endif
|
||||
set_modified();
|
||||
{
|
||||
/* When not at end-of-buffer, move one full line into the cutbuffer;
|
||||
* otherwise, move all text until end-of-line into the cutbuffer. */
|
||||
if (openfile->current != openfile->filebot)
|
||||
extract_segment(line, 0, line->next, 0);
|
||||
else
|
||||
extract_segment(line, 0, line, strlen(line->data));
|
||||
|
||||
openfile->placewewant = 0;
|
||||
}
|
||||
|
||||
/* After a line operation, future ones should add to the cutbuffer. */
|
||||
keep_cutbuffer = !marked && !until_eof;
|
||||
|
||||
set_modified();
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* Return FALSE when a cut command would not actually cut anything: when
|
||||
* on an empty line at EOF, or when the mark covers zero characters, or
|
||||
* (when test_cliff is TRUE) when the magic line would be cut. */
|
||||
bool is_cuttable(bool test_cliff)
|
||||
{
|
||||
if ((openfile->current->next == NULL && openfile->current->data[0] == '\0'
|
||||
#ifndef NANO_TINY
|
||||
&& openfile->mark == NULL) ||
|
||||
(openfile->mark == openfile->current &&
|
||||
openfile->mark_x == openfile->current_x) ||
|
||||
(test_cliff && openfile->current->data[openfile->current_x] == '\0' &&
|
||||
((ISSET(NO_NEWLINES) && openfile->current == openfile->filebot) ||
|
||||
(!ISSET(NO_NEWLINES) && openfile->current == openfile->filebot->prev))
|
||||
#ifdef ENABLE_COLOR
|
||||
perturbed = TRUE;
|
||||
#endif
|
||||
)) {
|
||||
#ifndef NANO_TINY
|
||||
openfile->mark = NULL;
|
||||
#endif
|
||||
statusbar(_("Nothing was cut"));
|
||||
return FALSE;
|
||||
} else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Move text from the current buffer into the cutbuffer. */
|
||||
@@ -388,56 +565,32 @@ void cut_text(void)
|
||||
add_undo(CUT, NULL);
|
||||
}
|
||||
|
||||
do_snip(FALSE, openfile->mark != NULL, FALSE, FALSE);
|
||||
do_snip(openfile->mark != NULL, FALSE, FALSE);
|
||||
|
||||
update_undo(CUT);
|
||||
#else
|
||||
if (is_cuttable(FALSE))
|
||||
do_snip(FALSE, FALSE, FALSE, FALSE);
|
||||
do_snip(FALSE, FALSE, FALSE);
|
||||
#endif
|
||||
wipe_statusbar();
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Move text from the current buffer into the cutbuffer, and copy it
|
||||
* back into the buffer afterward. If the mark is set or the cursor
|
||||
* was moved, blow away previous contents of the cutbuffer. */
|
||||
void copy_text(void)
|
||||
{
|
||||
bool mark_is_set = (openfile->mark != NULL);
|
||||
|
||||
/* Remember the current viewport and cursor position. */
|
||||
ssize_t is_edittop_lineno = openfile->edittop->lineno;
|
||||
size_t is_firstcolumn = openfile->firstcolumn;
|
||||
ssize_t is_current_lineno = openfile->current->lineno;
|
||||
size_t is_current_x = openfile->current_x;
|
||||
|
||||
do_snip(TRUE, mark_is_set, FALSE, FALSE);
|
||||
|
||||
/* If the mark was set, restore the viewport and cursor position. */
|
||||
if (mark_is_set) {
|
||||
openfile->edittop = line_from_number(is_edittop_lineno);
|
||||
openfile->firstcolumn = is_firstcolumn;
|
||||
openfile->current = line_from_number(is_current_lineno);
|
||||
openfile->current_x = is_current_x;
|
||||
} else
|
||||
focusing = FALSE;
|
||||
|
||||
openfile->last_action = OTHER;
|
||||
}
|
||||
|
||||
/* Cut from the current cursor position to the end of the file. */
|
||||
void cut_till_eof(void)
|
||||
{
|
||||
if ((openfile->current == openfile->filebot && openfile->current->data[0] == '\0') ||
|
||||
(!ISSET(NO_NEWLINES) && openfile->current->next == openfile->filebot &&
|
||||
openfile->current->data[openfile->current_x] == '\0')) {
|
||||
ran_a_tool = TRUE;
|
||||
|
||||
if (openfile->current->data[openfile->current_x] == '\0' &&
|
||||
(openfile->current->next == NULL ||
|
||||
(!ISSET(NO_NEWLINES) && openfile->current_x > 0 &&
|
||||
openfile->current->next == openfile->filebot))) {
|
||||
statusbar(_("Nothing was cut"));
|
||||
return;
|
||||
}
|
||||
|
||||
add_undo(CUT_TO_EOF, NULL);
|
||||
do_snip(FALSE, FALSE, TRUE, FALSE);
|
||||
do_snip(FALSE, TRUE, FALSE);
|
||||
update_undo(CUT_TO_EOF);
|
||||
wipe_statusbar();
|
||||
}
|
||||
@@ -459,27 +612,152 @@ void zap_text(void)
|
||||
/* Use the cutbuffer from the ZAP undo item, so the cut can be undone. */
|
||||
cutbuffer = openfile->current_undo->cutbuffer;
|
||||
|
||||
do_snip(FALSE, openfile->mark != NULL, FALSE, TRUE);
|
||||
do_snip(openfile->mark != NULL, FALSE, TRUE);
|
||||
|
||||
update_undo(ZAP);
|
||||
wipe_statusbar();
|
||||
|
||||
cutbuffer = was_cutbuffer;
|
||||
}
|
||||
|
||||
/* Make a copy of the marked region, putting it in the cutbuffer. */
|
||||
void copy_marked_region(void)
|
||||
{
|
||||
linestruct *topline, *botline, *afterline;
|
||||
char *was_datastart, saved_byte;
|
||||
size_t top_x, bot_x;
|
||||
|
||||
get_region(&topline, &top_x, &botline, &bot_x);
|
||||
|
||||
openfile->last_action = OTHER;
|
||||
keep_cutbuffer = FALSE;
|
||||
openfile->mark = NULL;
|
||||
refresh_needed = TRUE;
|
||||
|
||||
if (topline == botline && top_x == bot_x) {
|
||||
statusbar(_("Copied nothing"));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make the area that was marked look like a separate buffer. */
|
||||
afterline = botline->next;
|
||||
botline->next = NULL;
|
||||
saved_byte = botline->data[bot_x];
|
||||
botline->data[bot_x] = '\0';
|
||||
was_datastart = topline->data;
|
||||
topline->data += top_x;
|
||||
|
||||
cutbuffer = copy_buffer(topline);
|
||||
|
||||
/* Restore the proper state of the buffer. */
|
||||
topline->data = was_datastart;
|
||||
botline->data[bot_x] = saved_byte;
|
||||
botline->next = afterline;
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* Copy text from the current buffer into the cutbuffer. The text is either
|
||||
* the marked region, the whole line, the text from cursor to end-of-line,
|
||||
* just the line break, or nothing, depending on mode and cursor position. */
|
||||
void copy_text(void)
|
||||
{
|
||||
bool at_eol = (openfile->current->data[openfile->current_x] == '\0');
|
||||
bool sans_newline = (ISSET(NO_NEWLINES) && openfile->current->next == NULL);
|
||||
size_t from_x = (ISSET(CUT_FROM_CURSOR)) ? openfile->current_x : 0;
|
||||
linestruct *was_current = openfile->current;
|
||||
linestruct *addition;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (openfile->mark || openfile->last_action != COPY)
|
||||
keep_cutbuffer = FALSE;
|
||||
#endif
|
||||
|
||||
if (!keep_cutbuffer) {
|
||||
free_lines(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
}
|
||||
|
||||
wipe_statusbar();
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (openfile->mark) {
|
||||
copy_marked_region();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* When at the very end of the buffer, there is nothing to do. */
|
||||
if (openfile->current->next == NULL && at_eol && (ISSET(CUT_FROM_CURSOR) ||
|
||||
openfile->current_x == 0 || cutbuffer)) {
|
||||
statusbar(_("Copied nothing"));
|
||||
return;
|
||||
}
|
||||
|
||||
addition = make_new_node(NULL);
|
||||
addition->data = copy_of(openfile->current->data + from_x);
|
||||
|
||||
if (ISSET(CUT_FROM_CURSOR))
|
||||
sans_newline = !at_eol;
|
||||
|
||||
/* Create the cutbuffer OR add to it, depending on the mode, the position
|
||||
* of the cursor, and whether or not the cutbuffer is currently empty. */
|
||||
if (cutbuffer == NULL && sans_newline) {
|
||||
cutbuffer = addition;
|
||||
cutbottom = addition;
|
||||
} else if (cutbuffer == NULL) {
|
||||
cutbuffer = addition;
|
||||
cutbottom = make_new_node(cutbuffer);
|
||||
cutbottom->data = copy_of("");
|
||||
cutbuffer->next = cutbottom;
|
||||
} else if (sans_newline) {
|
||||
addition->prev = cutbottom->prev;
|
||||
addition->prev->next = addition;
|
||||
delete_node(cutbottom);
|
||||
cutbottom = addition;
|
||||
} else if (ISSET(CUT_FROM_CURSOR)) {
|
||||
addition->prev = cutbottom;
|
||||
cutbottom->next = addition;
|
||||
cutbottom = addition;
|
||||
} else {
|
||||
addition->prev = cutbottom->prev;
|
||||
addition->prev->next = addition;
|
||||
addition->next = cutbottom;
|
||||
cutbottom->prev = addition;
|
||||
}
|
||||
|
||||
/* When needed and possible, move the cursor to the next line. */
|
||||
if ((!ISSET(CUT_FROM_CURSOR) || at_eol) && openfile->current->next) {
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current_x = 0;
|
||||
} else
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
|
||||
edit_redraw(was_current, FLOWING);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
openfile->last_action = COPY;
|
||||
#endif
|
||||
keep_cutbuffer = TRUE;
|
||||
}
|
||||
|
||||
/* Copy text from the cutbuffer into the current buffer. */
|
||||
void paste_text(void)
|
||||
{
|
||||
#if defined(ENABLE_WRAPPING) || !defined(NANO_TINY)
|
||||
/* Remember where the paste started. */
|
||||
linestruct *was_current = openfile->current;
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
bool had_anchor = was_current->has_anchor;
|
||||
#endif
|
||||
ssize_t was_lineno = openfile->current->lineno;
|
||||
/* The line number where we started the paste. */
|
||||
size_t was_leftedge = 0;
|
||||
/* The leftedge where we started the paste. */
|
||||
|
||||
if (cutbuffer == NULL) {
|
||||
statusbar(_("Cutbuffer is empty"));
|
||||
statusline(AHEM, _("Cutbuffer is empty"));
|
||||
return;
|
||||
}
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
add_undo(PASTE, NULL);
|
||||
@@ -493,12 +771,28 @@ void paste_text(void)
|
||||
copy_from_buffer(cutbuffer);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Wipe any anchors in the pasted text, so that they don't proliferate. */
|
||||
for (linestruct *line = was_current; line != openfile->current->next; line = line->next)
|
||||
line->has_anchor = FALSE;
|
||||
|
||||
was_current->has_anchor = had_anchor;
|
||||
|
||||
update_undo(PASTE);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_WRAPPING
|
||||
/* When still on the same line and doing hard-wrapping, limit the width. */
|
||||
if (openfile->current == was_current && ISSET(BREAK_LONG_LINES))
|
||||
do_wrap();
|
||||
#endif
|
||||
|
||||
/* If we pasted less than a screenful, don't center the cursor. */
|
||||
if (less_than_a_screenful(was_lineno, was_leftedge))
|
||||
focusing = FALSE;
|
||||
#ifdef ENABLE_COLOR
|
||||
else
|
||||
precalc_multicolorinfo();
|
||||
#endif
|
||||
|
||||
/* Set the desired x position to where the pasted text ends. */
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* nano.h -- This file is part of GNU nano. *
|
||||
* definitions.h -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2017 Benno Schulenberg *
|
||||
* Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2017, 2020-2022, 2024 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,7 +15,7 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
@@ -25,138 +25,281 @@
|
||||
|
||||
#ifdef NEED_XOPEN_SOURCE_EXTENDED
|
||||
#ifndef _XOPEN_SOURCE_EXTENDED
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__HAIKU__) && !defined(_DEFAULT_SOURCE)
|
||||
#define _DEFAULT_SOURCE 1
|
||||
#endif
|
||||
|
||||
#ifdef __TANDEM
|
||||
/* Tandem NonStop Kernel support. */
|
||||
#include <floss.h>
|
||||
#define NANO_ROOT_UID 65535
|
||||
#define ROOT_UID 65535
|
||||
#else
|
||||
#define NANO_ROOT_UID 0
|
||||
#define ROOT_UID 0
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && !defined(st_atim)
|
||||
#define st_atim st_atimespec
|
||||
#define st_mtim st_mtimespec
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* Set a default value for PATH_MAX if there isn't one. */
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
/* Suppress warnings for __attribute__((warn_unused_result)). */
|
||||
#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
|
||||
|
||||
/* Macros for flags, indexing each bit in a small array. */
|
||||
#define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))]
|
||||
#define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8)))
|
||||
#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
|
||||
#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
|
||||
#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)
|
||||
#define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag)
|
||||
|
||||
/* Macros for allocation of character strings. */
|
||||
#define charalloc(howmuch) (char *)nmalloc(howmuch)
|
||||
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, howmuch)
|
||||
|
||||
/* In UTF-8 a character is at most six bytes long. */
|
||||
#ifdef ENABLE_UTF8
|
||||
#define MAXCHARLEN 6
|
||||
#else
|
||||
#define MAXCHARLEN 1
|
||||
#endif
|
||||
|
||||
/* Set a default value for PATH_MAX if there isn't one. */
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#ifdef USE_SLANG
|
||||
/* Slang support. */
|
||||
#include <slcurses.h>
|
||||
/* Slang curses emulation brain damage, part 3: Slang doesn't define the
|
||||
* curses equivalents of the Insert or Delete keys. */
|
||||
#define KEY_DC SL_KEY_DELETE
|
||||
#define KEY_IC SL_KEY_IC
|
||||
/* Ncurses support. */
|
||||
#elif defined(HAVE_NCURSESW_NCURSES_H)
|
||||
#include <ncursesw/ncurses.h>
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
/* Curses support. */
|
||||
#include <curses.h>
|
||||
#endif /* CURSES_H */
|
||||
|
||||
#if defined(NCURSES_VERSION_MAJOR) && (NCURSES_VERSION_MAJOR < 6)
|
||||
#define USING_OLD_NCURSES yes
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
/* Native language support. */
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
#define _(string) gettext(string)
|
||||
#define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||
#endif
|
||||
#define gettext_noop(string) (string)
|
||||
#define N_(string) gettext_noop(string)
|
||||
/* Mark a string that will be sent to gettext() later. */
|
||||
|
||||
#include <dirent.h>
|
||||
#include <regex.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* If we aren't using an ncurses with mouse support, exclude any
|
||||
* mouse routines, as they are useless then. */
|
||||
#ifdef HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
/* Native language support. */
|
||||
#ifdef ENABLE_NLS
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
#define _(string) gettext(string)
|
||||
#define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||
#endif
|
||||
/* For marking a string on which gettext() will be called later. */
|
||||
#define gettext_noop(string) (string)
|
||||
#define N_(string) gettext_noop(string)
|
||||
|
||||
/* If we aren't using an ncurses with mouse support, then
|
||||
* exclude the mouse routines, as they are useless then. */
|
||||
#ifndef NCURSES_MOUSE_VERSION
|
||||
#undef ENABLE_MOUSE
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_WRAPPING) || defined(ENABLE_JUSTIFY)
|
||||
#define ENABLED_WRAPORJUSTIFY 1
|
||||
#define ENABLED_WRAPORJUSTIFY 1
|
||||
#endif
|
||||
|
||||
#define BACKWARD FALSE
|
||||
#define FORWARD TRUE
|
||||
/* Suppress warnings for __attribute__((warn_unused_result)). */
|
||||
#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
|
||||
|
||||
#define BLIND FALSE
|
||||
#define VISIBLE TRUE
|
||||
/* Macros for flags, indexing each bit in a small array. */
|
||||
#define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))]
|
||||
#define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8)))
|
||||
#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
|
||||
#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
|
||||
#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)
|
||||
#define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag)
|
||||
|
||||
#define JUSTFIND 0
|
||||
#define REPLACING 1
|
||||
#define INREGION 2
|
||||
#define BACKWARD FALSE
|
||||
#define FORWARD TRUE
|
||||
|
||||
#define YESORNO FALSE
|
||||
#define YESORALLORNO TRUE
|
||||
|
||||
#define YES 1
|
||||
#define ALL 2
|
||||
#define NO 0
|
||||
#define CANCEL -1
|
||||
|
||||
#define BLIND FALSE
|
||||
#define VISIBLE TRUE
|
||||
|
||||
#define JUSTFIND 0
|
||||
#define REPLACING 1
|
||||
#define INREGION 2
|
||||
|
||||
#define NONOTES FALSE
|
||||
|
||||
#define PRUNE_DUPLICATE TRUE
|
||||
#define IGNORE_DUPLICATES FALSE
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* In UTF-8 a valid character is at most four bytes long. */
|
||||
#define MAXCHARLEN 4
|
||||
#else
|
||||
#define MAXCHARLEN 1
|
||||
#endif
|
||||
|
||||
/* The default width of a tab in spaces. */
|
||||
#define WIDTH_OF_TAB 8
|
||||
|
||||
/* The default number of columns from end of line where wrapping occurs. */
|
||||
#define COLUMNS_FROM_EOL 8
|
||||
|
||||
/* The number of columns the cursor should stay away from the edge. */
|
||||
#define CUSHION 3
|
||||
|
||||
/* The default comment character when a syntax does not specify any. */
|
||||
#define GENERAL_COMMENT_CHARACTER "#"
|
||||
|
||||
/* The maximum number of search/replace history strings saved. */
|
||||
#define MAX_SEARCH_HISTORY 100
|
||||
|
||||
/* The largest size_t number that doesn't have the high bit set. */
|
||||
#define HIGHEST_POSITIVE ((~(size_t)0) >> 1)
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
#define USE_THE_DEFAULT -1
|
||||
#define BAD_COLOR -2
|
||||
#define THE_DEFAULT -1
|
||||
#define BAD_COLOR -2
|
||||
|
||||
/* Flags for indicating how a multiline regex pair apply to a line. */
|
||||
#define NOTHING (1<<1)
|
||||
/* The start/end regexes don't cover this line at all. */
|
||||
#define STARTSHERE (1<<2)
|
||||
/* The start regex matches on this line, the end regex on a later one. */
|
||||
#define WHOLELINE (1<<3)
|
||||
/* The start regex matches on an earlier line, the end regex on a later one. */
|
||||
#define ENDSHERE (1<<4)
|
||||
/* The start regex matches on an earlier line, the end regex on this one. */
|
||||
#define JUSTONTHIS (1<<5)
|
||||
/* Both the start and end regexes match within this line. */
|
||||
#endif
|
||||
|
||||
#define STANDARD_INPUT 0
|
||||
/* Basic control codes. */
|
||||
#define ESC_CODE 0x1B
|
||||
#define DEL_CODE 0x7F
|
||||
|
||||
/* Codes for "modified" Arrow keys, beyond KEY_MAX of ncurses. */
|
||||
#define CONTROL_LEFT 0x401
|
||||
#define CONTROL_RIGHT 0x402
|
||||
#define CONTROL_UP 0x403
|
||||
#define CONTROL_DOWN 0x404
|
||||
#define CONTROL_HOME 0x405
|
||||
#define CONTROL_END 0x406
|
||||
#define CONTROL_DELETE 0x40D
|
||||
#define SHIFT_CONTROL_LEFT 0x411
|
||||
#define SHIFT_CONTROL_RIGHT 0x412
|
||||
#define SHIFT_CONTROL_UP 0x413
|
||||
#define SHIFT_CONTROL_DOWN 0x414
|
||||
#define SHIFT_CONTROL_HOME 0x415
|
||||
#define SHIFT_CONTROL_END 0x416
|
||||
#define CONTROL_SHIFT_DELETE 0x41D
|
||||
#define ALT_LEFT 0x421
|
||||
#define ALT_RIGHT 0x422
|
||||
#define ALT_UP 0x423
|
||||
#define ALT_DOWN 0x424
|
||||
#define ALT_HOME 0x425
|
||||
#define ALT_END 0x426
|
||||
#define ALT_PAGEUP 0x427
|
||||
#define ALT_PAGEDOWN 0x428
|
||||
#define ALT_INSERT 0x42C
|
||||
#define ALT_DELETE 0x42D
|
||||
#define SHIFT_ALT_LEFT 0x431
|
||||
#define SHIFT_ALT_RIGHT 0x432
|
||||
#define SHIFT_ALT_UP 0x433
|
||||
#define SHIFT_ALT_DOWN 0x434
|
||||
#define SHIFT_UP 0x453
|
||||
#define SHIFT_DOWN 0x454
|
||||
#define SHIFT_HOME 0x455
|
||||
#define SHIFT_END 0x456
|
||||
#define SHIFT_PAGEUP 0x457
|
||||
#define SHIFT_PAGEDOWN 0x458
|
||||
#define SHIFT_DELETE 0x45D
|
||||
#define SHIFT_TAB 0x45F
|
||||
|
||||
#define FOCUS_IN 0x491
|
||||
#define FOCUS_OUT 0x499
|
||||
|
||||
/* Custom keycodes for signaling the start and end of a bracketed paste. */
|
||||
#define START_OF_PASTE 0x4B5
|
||||
#define END_OF_PASTE 0x4BE
|
||||
|
||||
/* Special keycodes for when a string bind has been partially implanted
|
||||
* or has an unpaired opening brace, or when a function in a string bind
|
||||
* needs execution or a specified function name is invalid. */
|
||||
#define MORE_PLANTS 0x4EA
|
||||
#define MISSING_BRACE 0x4EB
|
||||
#define PLANTED_A_COMMAND 0x4EC
|
||||
#define NO_SUCH_FUNCTION 0x4EF
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* A special keycode for Ctrl + the central key on the numeric keypad. */
|
||||
#define KEY_CENTER 0x4F0
|
||||
|
||||
/* A special keycode for when we get a SIGWINCH (a window resize). */
|
||||
#define THE_WINDOW_RESIZED 0x4F7
|
||||
#endif
|
||||
|
||||
/* A special keycode for when a key produces an unknown escape sequence. */
|
||||
#define FOREIGN_SEQUENCE 0x4FC
|
||||
|
||||
/* A special keycode for plugging into the input stream after a suspension. */
|
||||
#define KEY_FRESH 0x4FE
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Some extra flags for the undo function. */
|
||||
#define WAS_BACKSPACE_AT_EOF (1<<1)
|
||||
#define WAS_WHOLE_LINE (1<<2)
|
||||
#define INCLUDED_LAST_LINE (1<<3)
|
||||
#define MARK_WAS_SET (1<<4)
|
||||
#define CURSOR_WAS_AT_HEAD (1<<5)
|
||||
#define HAD_ANCHOR_AT_START (1<<6)
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* Identifiers for the different menus. */
|
||||
#define MMAIN (1<<0)
|
||||
#define MWHEREIS (1<<1)
|
||||
#define MREPLACE (1<<2)
|
||||
#define MREPLACEWITH (1<<3)
|
||||
#define MGOTOLINE (1<<4)
|
||||
#define MWRITEFILE (1<<5)
|
||||
#define MINSERTFILE (1<<6)
|
||||
#define MEXECUTE (1<<7)
|
||||
#define MHELP (1<<8)
|
||||
#define MSPELL (1<<9)
|
||||
#define MBROWSER (1<<10)
|
||||
#define MWHEREISFILE (1<<11)
|
||||
#define MGOTODIR (1<<12)
|
||||
#define MYESNO (1<<13)
|
||||
#define MLINTER (1<<14)
|
||||
#define MFINDINHELP (1<<15)
|
||||
/* This is an abbreviation for all menus except Help and Browser and YesNo. */
|
||||
#define MMOST (MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|\
|
||||
MEXECUTE|MWHEREISFILE|MGOTODIR|MFINDINHELP|MSPELL|MLINTER)
|
||||
#ifndef NANO_TINY
|
||||
#define MSOME MMOST|MBROWSER
|
||||
#else
|
||||
#define MSOME MMAIN|MBROWSER
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
#define UNFOLD_SEGMENT(line) unfold_folded_segment(line)
|
||||
#else
|
||||
#define UNFOLD_SEGMENT(line)
|
||||
#endif
|
||||
|
||||
#define ALLOW_FOLDED TRUE
|
||||
#define DISALLOW_FOLDED FALSE
|
||||
|
||||
/* Enumeration types. */
|
||||
typedef enum {
|
||||
NIX_FILE, DOS_FILE, MAC_FILE
|
||||
UNSPECIFIED, NIX_FILE, DOS_FILE
|
||||
} format_type;
|
||||
|
||||
typedef enum {
|
||||
HUSH, NOTICE, MILD, ALERT
|
||||
VACUUM, HUSH, REMARK, INFO, NOTICE, AHEM, MILD, ALERT
|
||||
} message_type;
|
||||
|
||||
typedef enum {
|
||||
OVERWRITE, APPEND, PREPEND
|
||||
} kind_of_writing_type;
|
||||
|
||||
typedef enum {
|
||||
SOFTMARK, HARDMARK
|
||||
} mark_type;
|
||||
OVERWRITE, APPEND, PREPEND, SPECIAL
|
||||
} writing_type;
|
||||
|
||||
typedef enum {
|
||||
CENTERING, FLOWING, STATIONARY
|
||||
@@ -172,16 +315,99 @@ typedef enum {
|
||||
#ifdef ENABLE_COMMENT
|
||||
COMMENT, UNCOMMENT, PREFLIGHT,
|
||||
#endif
|
||||
ZAP, CUT, CUT_TO_EOF, PASTE, INSERT, COUPLE_BEGIN, COUPLE_END, OTHER
|
||||
ZAP, CUT, CUT_TO_EOF, COPY, PASTE, INSERT,
|
||||
COUPLE_BEGIN, COUPLE_END, OTHER
|
||||
} undo_type;
|
||||
|
||||
/* The elements of the interface that can be colored differently. */
|
||||
enum {
|
||||
TITLE_BAR = 0,
|
||||
LINE_NUMBER,
|
||||
GUIDE_STRIPE,
|
||||
SCROLL_BAR,
|
||||
SELECTED_TEXT,
|
||||
SPOTLIGHTED,
|
||||
MINI_INFOBAR,
|
||||
PROMPT_BAR,
|
||||
STATUS_BAR,
|
||||
ERROR_MESSAGE,
|
||||
KEY_COMBO,
|
||||
FUNCTION_TAG,
|
||||
FOLDED_LINE,
|
||||
NUMBER_OF_ELEMENTS
|
||||
};
|
||||
|
||||
/* Enumeration used in the flags array. See the definition of FLAGMASK. */
|
||||
enum {
|
||||
DONTUSE = 0,
|
||||
CASE_SENSITIVE,
|
||||
CONSTANT_SHOW,
|
||||
NO_HELP,
|
||||
NO_WRAP,
|
||||
AUTOINDENT,
|
||||
VIEW_MODE,
|
||||
USE_MOUSE,
|
||||
USE_REGEXP,
|
||||
SAVE_ON_EXIT,
|
||||
CUT_FROM_CURSOR,
|
||||
BACKWARDS_SEARCH,
|
||||
NEW_BUFFER,
|
||||
REBIND_DELETE,
|
||||
RAW_SEQUENCES,
|
||||
NO_CONVERT,
|
||||
MAKE_BACKUP,
|
||||
INSECURE_BACKUP,
|
||||
NO_SYNTAX,
|
||||
PRESERVE,
|
||||
HISTORYLOG,
|
||||
RESTRICTED,
|
||||
SMART_HOME,
|
||||
WHITESPACE_DISPLAY,
|
||||
TABS_TO_SPACES,
|
||||
QUICK_BLANK,
|
||||
WORD_BOUNDS,
|
||||
NO_NEWLINES,
|
||||
BOLD_TEXT,
|
||||
SOFTWRAP,
|
||||
POSITIONLOG,
|
||||
LOCKING,
|
||||
NOREAD_MODE,
|
||||
MAKE_IT_UNIX,
|
||||
TRIM_BLANKS,
|
||||
SHOW_CURSOR,
|
||||
LINE_NUMBERS,
|
||||
AT_BLANKS,
|
||||
AFTER_ENDS,
|
||||
LET_THEM_ZAP,
|
||||
BREAK_LONG_LINES,
|
||||
JUMPY_SCROLLING,
|
||||
EMPTY_LINE,
|
||||
INDICATOR,
|
||||
BOOKSTYLE,
|
||||
COLON_PARSING,
|
||||
STATEFLAGS,
|
||||
USE_MAGIC,
|
||||
MINIBAR,
|
||||
ZERO,
|
||||
MODERN_BINDINGS,
|
||||
SOLO_SIDESCROLL
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
FOUND_BRACKET = 0,
|
||||
NOT_FOUND_BRACKET,
|
||||
NOT_A_BRACKET
|
||||
} bracket_search_result;
|
||||
|
||||
/* Structure types. */
|
||||
#ifdef ENABLE_COLOR
|
||||
typedef struct colortype {
|
||||
short id;
|
||||
/* An ordinal number (if this color combo is for a multiline regex). */
|
||||
short fg;
|
||||
/* This syntax's foreground color. */
|
||||
/* This combo's foreground color. */
|
||||
short bg;
|
||||
/* This syntax's background color. */
|
||||
/* This combo's background color. */
|
||||
short pairnum;
|
||||
/* The pair number for this foreground/background color combination. */
|
||||
int attributes;
|
||||
@@ -191,14 +417,12 @@ typedef struct colortype {
|
||||
regex_t *end;
|
||||
/* The compiled regular expression for 'end=', if any. */
|
||||
struct colortype *next;
|
||||
/* Next set of colors. */
|
||||
int id;
|
||||
/* Basic id for assigning to lines later. */
|
||||
/* Next color combination. */
|
||||
} colortype;
|
||||
|
||||
typedef struct regexlisttype {
|
||||
char *full_regex;
|
||||
/* A regex string to match things that imply a certain syntax. */
|
||||
regex_t *one_rgx;
|
||||
/* A regex to match things that imply a certain syntax. */
|
||||
struct regexlisttype *next;
|
||||
/* The next regex. */
|
||||
} regexlisttype;
|
||||
@@ -221,7 +445,7 @@ typedef struct syntaxtype {
|
||||
/* File where the syntax is defined, or NULL if not an included file. */
|
||||
size_t lineno;
|
||||
/* The line number where the 'syntax' command was found. */
|
||||
struct augmentstruct *augmentations;
|
||||
augmentstruct *augmentations;
|
||||
/* List of extendsyntax commands to apply when loaded. */
|
||||
regexlisttype *extensions;
|
||||
/* The list of extensions that this syntax applies to. */
|
||||
@@ -233,7 +457,7 @@ typedef struct syntaxtype {
|
||||
/* The command with which to lint this type of file. */
|
||||
char *formatter;
|
||||
/* The command with which to format/modify/arrange this type of file. */
|
||||
char *tab;
|
||||
char *tabstring;
|
||||
/* What the Tab key should produce; NULL for default behavior. */
|
||||
#ifdef ENABLE_COMMENT
|
||||
char *comment;
|
||||
@@ -241,7 +465,7 @@ typedef struct syntaxtype {
|
||||
#endif
|
||||
colortype *color;
|
||||
/* The colors and their regexes used in this syntax. */
|
||||
int nmultis;
|
||||
short multiscore;
|
||||
/* How many multiline regex strings this syntax has. */
|
||||
struct syntaxtype *next;
|
||||
/* Next syntax. */
|
||||
@@ -261,20 +485,6 @@ typedef struct lintstruct {
|
||||
struct lintstruct *prev;
|
||||
/* Previous error. */
|
||||
} lintstruct;
|
||||
|
||||
/* Flags that indicate how a multiline regex applies to a line. */
|
||||
#define CNONE (1<<1)
|
||||
/* Yay, regex doesn't apply to this line at all! */
|
||||
#define CBEGINBEFORE (1<<2)
|
||||
/* Regex starts on an earlier line, ends on this one. */
|
||||
#define CENDAFTER (1<<3)
|
||||
/* Regex starts on this line and ends on a later one. */
|
||||
#define CWHOLELINE (1<<4)
|
||||
/* Whole line engulfed by the regex, start < me, end > me. */
|
||||
#define CSTARTENDHERE (1<<5)
|
||||
/* Regex starts and ends within this line. */
|
||||
#define CWOULDBE (1<<6)
|
||||
/* An unpaired start match on or before this line. */
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
/* More structure types. */
|
||||
@@ -291,6 +501,14 @@ typedef struct linestruct {
|
||||
short *multidata;
|
||||
/* Array of which multi-line regexes apply to this line. */
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
bool has_anchor;
|
||||
/* Whether the user has placed an anchor at this line. */
|
||||
#endif
|
||||
#ifdef ENABLE_FOLDING
|
||||
bool folded;
|
||||
/* Whether or not this line is in a fold segment */
|
||||
#endif
|
||||
} linestruct;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
@@ -310,9 +528,9 @@ typedef struct undostruct {
|
||||
/* The operation type that this undo item is for. */
|
||||
int xflags;
|
||||
/* Some flag data to mark certain corner cases. */
|
||||
ssize_t lineno;
|
||||
ssize_t head_lineno;
|
||||
/* The line number where the operation began or ended. */
|
||||
size_t begin;
|
||||
size_t head_x;
|
||||
/* The x position where the operation began or ended. */
|
||||
char *strdata;
|
||||
/* String data to help restore the affected line. */
|
||||
@@ -324,9 +542,9 @@ typedef struct undostruct {
|
||||
/* Undo info specific to groups of lines. */
|
||||
linestruct *cutbuffer;
|
||||
/* A copy of the cutbuffer. */
|
||||
ssize_t mark_begin_lineno;
|
||||
ssize_t tail_lineno;
|
||||
/* Mostly the line number of the current line; sometimes something else. */
|
||||
size_t mark_begin_x;
|
||||
size_t tail_x;
|
||||
/* The x position corresponding to the above line number. */
|
||||
struct undostruct *next;
|
||||
/* A pointer to the undo item of the preceding action. */
|
||||
@@ -334,16 +552,18 @@ typedef struct undostruct {
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#ifdef ENABLE_HISTORIES
|
||||
typedef struct poshiststruct {
|
||||
typedef struct positionstruct {
|
||||
char *filename;
|
||||
/* The file. */
|
||||
ssize_t lineno;
|
||||
/* Line number we left off on. */
|
||||
ssize_t xno;
|
||||
/* The x position in the file we left off on. */
|
||||
struct poshiststruct *next;
|
||||
/* The next item of position history. */
|
||||
} poshiststruct;
|
||||
/* The full path plus name of the file. */
|
||||
ssize_t linenumber;
|
||||
/* The line where the cursor was when the file was closed. */
|
||||
ssize_t columnnumber;
|
||||
/* The column where the cursor was. */
|
||||
char *anchors;
|
||||
/* The line numbers where anchors were placed, in string form. */
|
||||
struct positionstruct *next;
|
||||
/* The next item in the positions register. */
|
||||
} positionstruct;
|
||||
#endif
|
||||
|
||||
typedef struct openfilestruct {
|
||||
@@ -365,11 +585,13 @@ typedef struct openfilestruct {
|
||||
size_t current_x;
|
||||
/* The file's x-coordinate position. */
|
||||
size_t placewewant;
|
||||
/* The file's x position we would like. */
|
||||
ssize_t current_y;
|
||||
/* The file's y-coordinate position. */
|
||||
struct stat *current_stat;
|
||||
/* The file's current stat information. */
|
||||
/* The preferred column for the cursor. */
|
||||
size_t brink;
|
||||
/* From which column the edit window is drawn (when panning). */
|
||||
ssize_t cursor_row;
|
||||
/* The row in the edit window that the cursor is on. */
|
||||
struct stat *statinfo;
|
||||
/* The file's stat information from when it was opened or last saved. */
|
||||
#ifdef ENABLE_WRAPPING
|
||||
linestruct *spillage_line;
|
||||
/* The line for prepending stuff to during automatic hard-wrapping. */
|
||||
@@ -379,10 +601,10 @@ typedef struct openfilestruct {
|
||||
/* The line in the file where the mark is set; NULL if not set. */
|
||||
size_t mark_x;
|
||||
/* The mark's x position in the above line. */
|
||||
mark_type kind_of_mark;
|
||||
/* Whether it is a soft (with Shift) or a hard mark. */
|
||||
bool softmark;
|
||||
/* Whether a marked region was made by holding Shift. */
|
||||
format_type fmt;
|
||||
/* The file's format -- Unix or DOS or Mac or mixed. */
|
||||
/* The file's format -- Unix or DOS. */
|
||||
char *lock_filename;
|
||||
/* The path of the lockfile, if we created one. */
|
||||
undostruct *undotop;
|
||||
@@ -398,11 +620,11 @@ typedef struct openfilestruct {
|
||||
/* Whether the file has been modified. */
|
||||
#ifdef ENABLE_COLOR
|
||||
syntaxtype *syntax;
|
||||
/* The syntax struct for this file, if any. */
|
||||
colortype *colorstrings;
|
||||
/* The file's associated colors. */
|
||||
/* The syntax that applies to this file, if any. */
|
||||
#endif
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
char *errormessage;
|
||||
/* The ALERT message (if any) that occurred when opening the file. */
|
||||
struct openfilestruct *next;
|
||||
/* The next open file, if any. */
|
||||
struct openfilestruct *prev;
|
||||
@@ -422,8 +644,6 @@ typedef struct rcoption {
|
||||
typedef struct keystruct {
|
||||
const char *keystr;
|
||||
/* The string that describes the keystroke, like "^C" or "M-R". */
|
||||
bool meta;
|
||||
/* Whether this is a Meta keystroke. */
|
||||
int keycode;
|
||||
/* The integer that, together with meta, identifies the keystroke. */
|
||||
int menus;
|
||||
@@ -448,204 +668,23 @@ typedef struct keystruct {
|
||||
typedef struct funcstruct {
|
||||
void (*func)(void);
|
||||
/* The actual function to call. */
|
||||
const char *tag;
|
||||
/* The function's help-line label, for example "Where Is". */
|
||||
#ifdef ENABLE_HELP
|
||||
const char *phrase;
|
||||
/* The function's description for in the help viewer. */
|
||||
bool blank_after;
|
||||
/* Whether to distance this function from the next in the help viewer. */
|
||||
#endif
|
||||
int menus;
|
||||
/* In what menus this function applies. */
|
||||
const char *desc;
|
||||
/* The function's short description, for example "Where Is". */
|
||||
#ifdef ENABLE_HELP
|
||||
const char *help;
|
||||
/* The help-screen text for this function. */
|
||||
bool blank_after;
|
||||
/* Whether there should be a blank line after the help text
|
||||
* for this function. */
|
||||
#endif
|
||||
bool viewok;
|
||||
/* Is this function allowed when in view mode? */
|
||||
long toggle;
|
||||
/* If this is a toggle, which toggle to affect. */
|
||||
struct funcstruct *next;
|
||||
/* Next item in the list. */
|
||||
} funcstruct;
|
||||
|
||||
#ifdef ENABLE_WORDCOMPLETION
|
||||
typedef struct completion_word {
|
||||
typedef struct completionstruct {
|
||||
char *word;
|
||||
struct completion_word *next;
|
||||
} completion_word;
|
||||
struct completionstruct *next;
|
||||
} completionstruct;
|
||||
#endif
|
||||
|
||||
/* The elements of the interface that can be colored differently. */
|
||||
enum
|
||||
{
|
||||
TITLE_BAR = 0,
|
||||
LINE_NUMBER,
|
||||
GUIDE_STRIPE,
|
||||
SELECTED_TEXT,
|
||||
STATUS_BAR,
|
||||
ERROR_MESSAGE,
|
||||
KEY_COMBO,
|
||||
FUNCTION_TAG,
|
||||
NUMBER_OF_ELEMENTS
|
||||
};
|
||||
|
||||
/* Enumeration used in the flags array. See the definition of FLAGMASK. */
|
||||
enum
|
||||
{
|
||||
DONTUSE,
|
||||
CASE_SENSITIVE,
|
||||
CONSTANT_SHOW,
|
||||
NO_HELP,
|
||||
SUSPEND,
|
||||
NO_WRAP,
|
||||
AUTOINDENT,
|
||||
VIEW_MODE,
|
||||
USE_MOUSE,
|
||||
USE_REGEXP,
|
||||
TEMP_FILE,
|
||||
CUT_FROM_CURSOR,
|
||||
BACKWARDS_SEARCH,
|
||||
MULTIBUFFER,
|
||||
SMOOTH_SCROLL,
|
||||
REBIND_DELETE,
|
||||
RAW_SEQUENCES,
|
||||
NO_CONVERT,
|
||||
BACKUP_FILE,
|
||||
INSECURE_BACKUP,
|
||||
NO_COLOR_SYNTAX,
|
||||
PRESERVE,
|
||||
HISTORYLOG,
|
||||
RESTRICTED,
|
||||
SMART_HOME,
|
||||
WHITESPACE_DISPLAY,
|
||||
MORE_SPACE,
|
||||
TABS_TO_SPACES,
|
||||
QUICK_BLANK,
|
||||
WORD_BOUNDS,
|
||||
NO_NEWLINES,
|
||||
BOLD_TEXT,
|
||||
SOFTWRAP,
|
||||
POSITIONLOG,
|
||||
LOCKING,
|
||||
NOREAD_MODE,
|
||||
MAKE_IT_UNIX,
|
||||
TRIM_BLANKS,
|
||||
SHOW_CURSOR,
|
||||
LINE_NUMBERS,
|
||||
NO_PAUSES,
|
||||
AT_BLANKS,
|
||||
AFTER_ENDS,
|
||||
LET_THEM_ZAP,
|
||||
BREAK_LONG_LINES,
|
||||
JUMPY_SCROLLING,
|
||||
EMPTY_LINE
|
||||
};
|
||||
|
||||
/* Flags for the menus in which a given function should be present. */
|
||||
#define MMAIN (1<<0)
|
||||
#define MWHEREIS (1<<1)
|
||||
#define MREPLACE (1<<2)
|
||||
#define MREPLACEWITH (1<<3)
|
||||
#define MGOTOLINE (1<<4)
|
||||
#define MWRITEFILE (1<<5)
|
||||
#define MINSERTFILE (1<<6)
|
||||
#define MEXTCMD (1<<7)
|
||||
#define MHELP (1<<8)
|
||||
#define MSPELL (1<<9)
|
||||
#define MBROWSER (1<<10)
|
||||
#define MWHEREISFILE (1<<11)
|
||||
#define MGOTODIR (1<<12)
|
||||
#define MYESNO (1<<13)
|
||||
#define MLINTER (1<<14)
|
||||
#define MFINDINHELP (1<<15)
|
||||
/* This is an abbreviation for all menus except Help and Browser and YesNo. */
|
||||
#define MMOST (MMAIN|MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE|MWRITEFILE|MINSERTFILE|\
|
||||
MEXTCMD|MWHEREISFILE|MGOTODIR|MFINDINHELP|MSPELL|MLINTER)
|
||||
#ifndef NANO_TINY
|
||||
#define MSOME MMOST|MBROWSER
|
||||
#else
|
||||
#define MSOME MMAIN|MBROWSER
|
||||
#endif
|
||||
|
||||
/* Basic control codes. */
|
||||
#define BS_CODE 0x08
|
||||
#define TAB_CODE 0x09
|
||||
#define ESC_CODE 0x1B
|
||||
#define DEL_CODE 0x7F
|
||||
|
||||
/* Codes for "modified" Arrow keys, beyond KEY_MAX of ncurses. */
|
||||
#define CONTROL_LEFT 0x401
|
||||
#define CONTROL_RIGHT 0x402
|
||||
#define CONTROL_UP 0x403
|
||||
#define CONTROL_DOWN 0x404
|
||||
#define CONTROL_HOME 0x405
|
||||
#define CONTROL_END 0x406
|
||||
#define CONTROL_DELETE 0x40D
|
||||
#define SHIFT_CONTROL_LEFT 0x411
|
||||
#define SHIFT_CONTROL_RIGHT 0x412
|
||||
#define SHIFT_CONTROL_UP 0x413
|
||||
#define SHIFT_CONTROL_DOWN 0x414
|
||||
#define SHIFT_CONTROL_HOME 0x415
|
||||
#define SHIFT_CONTROL_END 0x416
|
||||
#define CONTROL_SHIFT_DELETE 0x41D
|
||||
#define ALT_LEFT 0x421
|
||||
#define ALT_RIGHT 0x422
|
||||
#define ALT_UP 0x423
|
||||
#define ALT_DOWN 0x424
|
||||
#define ALT_DELETE 0x42D
|
||||
#define SHIFT_ALT_LEFT 0x431
|
||||
#define SHIFT_ALT_RIGHT 0x432
|
||||
#define SHIFT_ALT_UP 0x433
|
||||
#define SHIFT_ALT_DOWN 0x434
|
||||
//#define SHIFT_LEFT 0x451
|
||||
//#define SHIFT_RIGHT 0x452
|
||||
#define SHIFT_UP 0x453
|
||||
#define SHIFT_DOWN 0x454
|
||||
#define SHIFT_HOME 0x455
|
||||
#define SHIFT_END 0x456
|
||||
#define SHIFT_PAGEUP 0x457
|
||||
#define SHIFT_PAGEDOWN 0x458
|
||||
#define SHIFT_DELETE 0x45D
|
||||
#define SHIFT_TAB 0x45F
|
||||
|
||||
/* A special keycode for when <Tab> is pressed while the mark is on. */
|
||||
#define INDENT_KEY 0x4F1
|
||||
|
||||
#ifdef USE_SLANG
|
||||
#ifdef ENABLE_UTF8
|
||||
#define KEY_BAD 0xFF /* Clipped error code. */
|
||||
#endif
|
||||
#define KEY_FLUSH 0x91 /* User-definable control code. */
|
||||
#else
|
||||
#define KEY_FLUSH KEY_F0 /* Nonexistent function key. */
|
||||
#endif
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* An imaginary key for when we get a SIGWINCH (window resize). */
|
||||
#define KEY_WINCH -2
|
||||
|
||||
/* Some extra flags for the undo function. */
|
||||
#define WAS_FINAL_BACKSPACE (1<<1)
|
||||
#define WAS_WHOLE_LINE (1<<2)
|
||||
#define WAS_FINAL_LINE (1<<3)
|
||||
#define MARK_WAS_SET (1<<4)
|
||||
#define WAS_MARKED_FORWARD (1<<5)
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* The default number of columns from end of line where wrapping occurs. */
|
||||
#define COLUMNS_FROM_EOL 8
|
||||
|
||||
/* The default width of a tab in spaces. */
|
||||
#define WIDTH_OF_TAB 8
|
||||
|
||||
/* The default comment character when a syntax does not specify any. */
|
||||
#define GENERAL_COMMENT_CHARACTER "#"
|
||||
|
||||
/* The maximum number of search/replace history strings saved, not
|
||||
* counting the blank lines at their ends. */
|
||||
#define MAX_SEARCH_HISTORY 100
|
||||
|
||||
/* The maximum number of bytes buffered at one time. */
|
||||
#define MAX_BUF_SIZE 128
|
||||
|
||||
/* The largest size_t number that doesn't have the high bit set. */
|
||||
#define HIGHEST_POSITIVE ((~(size_t)0) >> 1)
|
||||
2915
src/files.c
2915
src/files.c
File diff suppressed because it is too large
Load Diff
158
src/folding.c
Normal file
158
src/folding.c
Normal file
@@ -0,0 +1,158 @@
|
||||
/**************************************************************************
|
||||
* folding.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 2023 rexy712 *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, *
|
||||
* or (at your option) any later version. *
|
||||
* *
|
||||
* GNU nano is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty *
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
|
||||
/* Unfold a folded segment containing the given line. */
|
||||
void unfold_folded_segment(linestruct *line)
|
||||
{
|
||||
line = get_start_of_folded_segment(line);
|
||||
if (line != NULL)
|
||||
refresh_needed = TRUE;
|
||||
for (; line != NULL && line->folded; line = line->next)
|
||||
line->folded = FALSE;
|
||||
}
|
||||
|
||||
/* Get the first line of the folded segment. */
|
||||
linestruct *get_start_of_folded_segment(linestruct *line)
|
||||
{
|
||||
if (!line->folded)
|
||||
return line;
|
||||
|
||||
while (line->prev != NULL && line->prev->folded)
|
||||
line = line->prev;
|
||||
|
||||
return line;
|
||||
}
|
||||
/* Get the last line of the folded segment. */
|
||||
linestruct *get_end_of_folded_segment(linestruct *line)
|
||||
{
|
||||
if (!line->folded)
|
||||
return line;
|
||||
|
||||
while (line->next != NULL && line->next->folded)
|
||||
line = line->next;
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
/* Get the number of lines in a folded segment. */
|
||||
int get_folded_segment_length(linestruct *line)
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
if (!line->folded)
|
||||
return 0;
|
||||
|
||||
line = get_start_of_folded_segment(line);
|
||||
for (; line->next != NULL && line->next->folded; line = line->next)
|
||||
++i;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/* Unfolds a folded segment containing line, or if line is not folded
|
||||
* does nothing. Returns true if any segments are unfolded. */
|
||||
bool do_unfold_segment(linestruct *line)
|
||||
{
|
||||
/* If current line is folded, just unfold and finish. */
|
||||
if (line->folded) {
|
||||
unfold_folded_segment(line);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* If all else fails, attempt to find the next folded line in the file. */
|
||||
for (line = openfile->current; line != NULL; line = line->next) {
|
||||
if (line->folded) {
|
||||
unfold_folded_segment(line);
|
||||
openfile->current = line;
|
||||
if (line->prev)
|
||||
do_up();
|
||||
else
|
||||
move_cursor_to_proper_column();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Fold the currently selected lines unless the current line is
|
||||
* a folded lines. In that case, remove unfold the lines. */
|
||||
void do_fold_segment(void)
|
||||
{
|
||||
linestruct *top, *bot, *line;
|
||||
get_range(&top, &bot);
|
||||
size_t top_pos, bot_pos;
|
||||
bool region_found = (top != bot);
|
||||
|
||||
if (top == bot) {
|
||||
/* First try to unfold if this line/bracketed region is folded. */
|
||||
if (top->folded) {
|
||||
unfold_folded_segment(top);
|
||||
return;
|
||||
}
|
||||
|
||||
/* When no selection is made, attempt to find the next line
|
||||
* ending with an opening bracket as the top bound. */
|
||||
for (; find_terminus_of_bracketed_region(&top, &top_pos, get_matchbrackets_halfway(), FALSE)
|
||||
; top = top->next) {
|
||||
bot = top;
|
||||
bot_pos = top_pos;
|
||||
if (find_matching_bracket_pos(&bot, &bot_pos) == FOUND_BRACKET
|
||||
&& bot->lineno - top->lineno >= 2) {
|
||||
top = top->next;
|
||||
bot = bot->prev;
|
||||
/* Unfold if already folded. */
|
||||
region_found = !top->folded;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (region_found == TRUE) {
|
||||
for (line = top; line != bot->next; line = line->next)
|
||||
line->folded = TRUE;
|
||||
|
||||
/* Place the cursor after the new fold, accounting for possible
|
||||
* fold concatenations occurring. */
|
||||
openfile->current = get_end_of_folded_segment(bot);
|
||||
if (bot->next)
|
||||
do_down();
|
||||
else
|
||||
move_cursor_to_proper_column();
|
||||
|
||||
if (top->lineno < openfile->edittop->lineno &&
|
||||
bot->lineno > openfile->edittop->lineno)
|
||||
openfile->edittop = top;
|
||||
|
||||
openfile->mark = NULL;
|
||||
|
||||
refresh_needed = TRUE;
|
||||
} else
|
||||
if (!do_unfold_segment(openfile->current))
|
||||
statusline(AHEM, _("No valid region found for automatic fold"));
|
||||
}
|
||||
|
||||
#endif /* ENABLE_FOLDING */
|
||||
1520
src/global.c
1520
src/global.c
File diff suppressed because it is too large
Load Diff
631
src/help.c
631
src/help.c
@@ -1,9 +1,9 @@
|
||||
/**************************************************************************
|
||||
* help.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 2000-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2000-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2017 Rishabh Dave *
|
||||
* Copyright (C) 2014-2018 Benno Schulenberg *
|
||||
* Copyright (C) 2014-2019 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -16,11 +16,11 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#ifdef ENABLE_HELP
|
||||
|
||||
@@ -29,246 +29,15 @@
|
||||
|
||||
static char *help_text = NULL;
|
||||
/* The text displayed in the help window. */
|
||||
|
||||
static const char *start_of_body = NULL;
|
||||
/* The point in the help text just after the title. */
|
||||
|
||||
static char *end_of_intro = NULL;
|
||||
/* The point in the help text where the shortcut descriptions begin. */
|
||||
|
||||
static size_t location;
|
||||
/* The offset (in bytes) of the topleft of the shown help text. */
|
||||
|
||||
/* Hard-wrap the concatenated help text, and write it into a new buffer. */
|
||||
void wrap_help_text_into_buffer(void)
|
||||
{
|
||||
size_t sum = 0;
|
||||
const char *ptr = start_of_body;
|
||||
|
||||
make_new_buffer();
|
||||
|
||||
/* Copy the help text into the just-created new buffer. */
|
||||
while (*ptr != '\0') {
|
||||
int length = help_line_len(ptr);
|
||||
char *oneline = nmalloc(length + 1);
|
||||
|
||||
snprintf(oneline, length + 1, "%s", ptr);
|
||||
free(openfile->current->data);
|
||||
openfile->current->data = oneline;
|
||||
|
||||
ptr += length;
|
||||
if (*ptr != '\n')
|
||||
ptr--;
|
||||
|
||||
/* Create a new line, and then one more for each extra \n. */
|
||||
do {
|
||||
openfile->current->next = make_new_node(openfile->current);
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current->data = copy_of("");
|
||||
} while (*(++ptr) == '\n');
|
||||
}
|
||||
|
||||
openfile->filebot = openfile->current;
|
||||
openfile->current = openfile->filetop;
|
||||
|
||||
remove_magicline();
|
||||
#ifdef ENABLE_COLOR
|
||||
color_update();
|
||||
#endif
|
||||
prepare_for_display();
|
||||
|
||||
/* Move to the position in the file where we were before. */
|
||||
while (TRUE) {
|
||||
sum += strlen(openfile->current->data);
|
||||
if (sum > location)
|
||||
break;
|
||||
openfile->current = openfile->current->next;
|
||||
}
|
||||
|
||||
openfile->edittop = openfile->current;
|
||||
}
|
||||
|
||||
/* Assemble a help text, display it, and allow scrolling through it. */
|
||||
void show_help(void)
|
||||
{
|
||||
int kbinput = ERR;
|
||||
functionptrtype func;
|
||||
/* The function of the key the user typed in. */
|
||||
int oldmenu = currmenu;
|
||||
/* The menu we were called from. */
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
int was_margin = margin;
|
||||
#endif
|
||||
ssize_t was_tabsize = tabsize;
|
||||
#ifdef ENABLE_COLOR
|
||||
char *was_syntax = syntaxstr;
|
||||
#endif
|
||||
char *saved_answer = (answer != NULL) ? copy_of(answer) : NULL;
|
||||
/* The current answer when the user invokes help at the prompt. */
|
||||
unsigned stash[sizeof(flags) / sizeof(flags[0])];
|
||||
/* A storage place for the current flag settings. */
|
||||
linestruct *line;
|
||||
int length;
|
||||
|
||||
blank_statusbar();
|
||||
|
||||
/* Save the settings of all flags. */
|
||||
memcpy(stash, flags, sizeof(flags));
|
||||
|
||||
/* Ensure that the help screen's shortcut list can be displayed. */
|
||||
if (ISSET(NO_HELP) && LINES > 4) {
|
||||
UNSET(NO_HELP);
|
||||
window_init();
|
||||
}
|
||||
|
||||
/* When searching, do it forward, case insensitive, and without regexes. */
|
||||
UNSET(BACKWARDS_SEARCH);
|
||||
UNSET(CASE_SENSITIVE);
|
||||
UNSET(USE_REGEXP);
|
||||
|
||||
UNSET(WHITESPACE_DISPLAY);
|
||||
UNSET(NOREAD_MODE);
|
||||
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
UNSET(LINE_NUMBERS);
|
||||
editwincols = COLS;
|
||||
margin = 0;
|
||||
#endif
|
||||
tabsize = 8;
|
||||
#ifdef ENABLE_COLOR
|
||||
syntaxstr = "nanohelp";
|
||||
#endif
|
||||
curs_set(0);
|
||||
|
||||
/* Compose the help text from all the relevant pieces. */
|
||||
help_init();
|
||||
|
||||
inhelp = TRUE;
|
||||
location = 0;
|
||||
didfind = 0;
|
||||
|
||||
bottombars(MHELP);
|
||||
|
||||
/* Extract the title from the head of the help text. */
|
||||
length = break_line(help_text, MAX_BUF_SIZE, TRUE);
|
||||
title = measured_copy(help_text, length + 1);
|
||||
title[length] = '\0';
|
||||
|
||||
titlebar(title);
|
||||
|
||||
/* Skip over the title to point at the start of the body text. */
|
||||
start_of_body = help_text + length;
|
||||
while (*start_of_body == '\n')
|
||||
start_of_body++;
|
||||
|
||||
wrap_help_text_into_buffer();
|
||||
edit_refresh();
|
||||
|
||||
while (TRUE) {
|
||||
lastmessage = HUSH;
|
||||
focusing = TRUE;
|
||||
|
||||
/* Show the cursor when we searched and found something. */
|
||||
kbinput = get_kbinput(edit, didfind == 1 || ISSET(SHOW_CURSOR));
|
||||
didfind = 0;
|
||||
|
||||
func = parse_help_input(&kbinput);
|
||||
|
||||
if (func == total_refresh) {
|
||||
total_redraw();
|
||||
} else if (ISSET(SHOW_CURSOR) && (func == do_left || func == do_right ||
|
||||
func == do_up || func == do_down)) {
|
||||
func();
|
||||
} else if (func == do_up || func == do_scroll_up) {
|
||||
do_scroll_up();
|
||||
} else if (func == do_down || func == do_scroll_down) {
|
||||
if (openfile->edittop->lineno + editwinrows - 1 <
|
||||
openfile->filebot->lineno)
|
||||
do_scroll_down();
|
||||
} else if (func == do_page_up || func == do_page_down ||
|
||||
func == to_first_line || func == to_last_line ||
|
||||
func == do_findprevious || func == do_findnext) {
|
||||
func();
|
||||
} else if (func == do_search_forward || func == do_search_backward) {
|
||||
func();
|
||||
bottombars(MHELP);
|
||||
#ifdef ENABLE_NANORC
|
||||
} else if (func == (functionptrtype)implant) {
|
||||
implant(first_sc_for(MHELP, func)->expansion);
|
||||
#endif
|
||||
#ifdef ENABLE_MOUSE
|
||||
} else if (kbinput == KEY_MOUSE) {
|
||||
int dummy_row, dummy_col;
|
||||
get_mouseinput(&dummy_row, &dummy_col, TRUE);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
} else if (kbinput == KEY_WINCH) {
|
||||
; /* Nothing to do. */
|
||||
#endif
|
||||
} else if (func == do_exit) {
|
||||
break;
|
||||
} else
|
||||
unbound_key(kbinput);
|
||||
|
||||
currmenu = MHELP;
|
||||
edit_refresh();
|
||||
|
||||
location = 0;
|
||||
line = openfile->filetop;
|
||||
|
||||
/* Count how far (in bytes) edittop is into the file. */
|
||||
while (line != openfile->edittop) {
|
||||
location += strlen(line->data);
|
||||
line = line->next;
|
||||
}
|
||||
}
|
||||
|
||||
/* Discard the help-text buffer. */
|
||||
close_buffer();
|
||||
|
||||
/* Restore the settings of all flags. */
|
||||
memcpy(flags, stash, sizeof(flags));
|
||||
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
margin = was_margin;
|
||||
editwincols = COLS - margin;
|
||||
#endif
|
||||
tabsize = was_tabsize;
|
||||
#ifdef ENABLE_COLOR
|
||||
syntaxstr = was_syntax;
|
||||
have_palette = FALSE;
|
||||
#endif
|
||||
|
||||
free(title);
|
||||
title = NULL;
|
||||
free(answer);
|
||||
answer = saved_answer;
|
||||
free(help_text);
|
||||
inhelp = FALSE;
|
||||
|
||||
curs_set(0);
|
||||
|
||||
if (ISSET(NO_HELP)) {
|
||||
currmenu = oldmenu;
|
||||
window_init();
|
||||
} else {
|
||||
wipe_statusbar();
|
||||
bottombars(oldmenu);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_BROWSER
|
||||
if (oldmenu == MBROWSER || oldmenu == MWHEREISFILE || oldmenu == MGOTODIR)
|
||||
browser_refresh();
|
||||
else
|
||||
#endif
|
||||
{
|
||||
titlebar(NULL);
|
||||
edit_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate space for the help text for the current menu, and concatenate
|
||||
* the different pieces of text into it. */
|
||||
/* Allocate space for the help text for the current menu,
|
||||
* and concatenate the different pieces of text into it. */
|
||||
void help_init(void)
|
||||
{
|
||||
size_t allocsize = 0;
|
||||
@@ -276,12 +45,12 @@ void help_init(void)
|
||||
const char *htx[3];
|
||||
/* Untranslated help introduction. We break it up into three chunks
|
||||
* in case the full string is too long for the compiler to handle. */
|
||||
char *ptr;
|
||||
const funcstruct *f;
|
||||
const keystruct *s;
|
||||
char *ptr;
|
||||
|
||||
/* First, set up the initial help text for the current function. */
|
||||
if (currmenu == MWHEREIS || currmenu == MREPLACE || currmenu == MREPLACEWITH) {
|
||||
if (currmenu & (MWHEREIS|MREPLACE)) {
|
||||
htx[0] = N_("Search Command Help Text\n\n "
|
||||
"Enter the words or characters you would like to "
|
||||
"search for, and then press Enter. If there is a "
|
||||
@@ -296,6 +65,13 @@ void help_init(void)
|
||||
"will be replaced.\n\n The following function keys are "
|
||||
"available in Search mode:\n\n");
|
||||
htx[2] = NULL;
|
||||
} else if (currmenu == MREPLACEWITH) {
|
||||
htx[0] = N_("=== Replacement ===\n\n "
|
||||
"Type the characters that should replace what you "
|
||||
"typed at the previous prompt, and press Enter.\n\n");
|
||||
htx[1] = N_(" The following function keys "
|
||||
"are available at this prompt:\n\n");
|
||||
htx[2] = NULL;
|
||||
} else if (currmenu == MGOTOLINE) {
|
||||
htx[0] = N_("Go To Line Help Text\n\n "
|
||||
"Enter the line number that you wish to go to and hit "
|
||||
@@ -357,8 +133,8 @@ void help_init(void)
|
||||
"shown in brackets after the search prompt. Hitting "
|
||||
"Enter without entering any text will perform the "
|
||||
"previous search.\n\n");
|
||||
htx[1] = N_(" The following function keys are available in "
|
||||
"Browser Search mode:\n\n");
|
||||
htx[1] = N_(" The following function keys "
|
||||
"are available at this prompt:\n\n");
|
||||
htx[2] = NULL;
|
||||
} else if (currmenu == MGOTODIR) {
|
||||
htx[0] = N_("Browser Go To Directory Help Text\n\n "
|
||||
@@ -374,21 +150,19 @@ void help_init(void)
|
||||
#endif /* ENABLE_BROWSER */
|
||||
#ifdef ENABLE_SPELLER
|
||||
else if (currmenu == MSPELL) {
|
||||
htx[0] = N_("Spell Check Help Text\n\n "
|
||||
"The spell checker checks the spelling of all text in "
|
||||
"the current file. When an unknown word is "
|
||||
"encountered, it is highlighted and a replacement can "
|
||||
"be edited. It will then prompt to replace every "
|
||||
"instance of the given misspelled word in the current "
|
||||
"file, or, if you have selected text with the mark, in "
|
||||
"the selected text.\n\n The following function keys "
|
||||
"are available in Spell Check mode:\n\n");
|
||||
htx[1] = NULL;
|
||||
htx[0] = N_("=== Spelling correction ===\n\n "
|
||||
"The spell checker has examined the spelling of all text "
|
||||
"in the current buffer or marked region. An unknown word "
|
||||
"has been encountered -- it is highlighted and a replacement "
|
||||
"can now be edited. After this you will be asked whether "
|
||||
"to replace each instance of that unknown word.\n\n");
|
||||
htx[1] = N_(" The following function keys "
|
||||
"are available at this prompt:\n\n");
|
||||
htx[2] = NULL;
|
||||
}
|
||||
#endif /* ENABLE_SPELLER */
|
||||
#ifndef NANO_TINY
|
||||
else if (currmenu == MEXTCMD) {
|
||||
else if (currmenu == MEXECUTE) {
|
||||
htx[0] = N_("Execute Command Help Text\n\n "
|
||||
"This mode allows you to insert the output of a "
|
||||
"command run by the shell into the current buffer (or "
|
||||
@@ -396,9 +170,10 @@ void help_init(void)
|
||||
"(the pipe symbol), the current contents of the buffer "
|
||||
"(or marked region) will be piped to the command. ");
|
||||
htx[1] = N_("If you just need another blank buffer, do not enter any "
|
||||
"command.\n\n");
|
||||
htx[2] = N_(" The following function keys are "
|
||||
"available in Execute Command mode:\n\n");
|
||||
"command.\n\n You can also pick one of four tools, or cut a "
|
||||
"large piece of the buffer, or put the editor to sleep.\n\n");
|
||||
htx[2] = N_(" The following function keys "
|
||||
"are available at this prompt:\n\n");
|
||||
} else if (currmenu == MLINTER) {
|
||||
htx[0] = N_("=== Linter ===\n\n "
|
||||
"In this mode, the status bar shows an error message or "
|
||||
@@ -438,23 +213,23 @@ void help_init(void)
|
||||
}
|
||||
|
||||
htx[0] = _(htx[0]);
|
||||
if (htx[1] != NULL)
|
||||
if (htx[1])
|
||||
htx[1] = _(htx[1]);
|
||||
if (htx[2] != NULL)
|
||||
if (htx[2])
|
||||
htx[2] = _(htx[2]);
|
||||
|
||||
allocsize += strlen(htx[0]);
|
||||
if (htx[1] != NULL)
|
||||
if (htx[1])
|
||||
allocsize += strlen(htx[1]);
|
||||
if (htx[2] != NULL)
|
||||
if (htx[2])
|
||||
allocsize += strlen(htx[2]);
|
||||
|
||||
/* Calculate the length of the shortcut help text. Each entry has
|
||||
* one or two keys, which fill 17 cells, plus translated text,
|
||||
* plus one or two \n's. */
|
||||
/* Calculate the length of the descriptions of the shortcuts.
|
||||
* Each entry has one or two keystrokes, which fill 17 cells,
|
||||
* plus translated text, plus one or two \n's. */
|
||||
for (f = allfuncs; f != NULL; f = f->next)
|
||||
if (f->menus & currmenu)
|
||||
allocsize += strlen(_(f->help)) + 21;
|
||||
allocsize += strlen(_(f->phrase)) + 21;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* If we're on the main list, we also count the toggle help text.
|
||||
@@ -464,19 +239,19 @@ void help_init(void)
|
||||
size_t onoff_len = strlen(_("enable/disable"));
|
||||
|
||||
for (s = sclist; s != NULL; s = s->next)
|
||||
if (s->func == do_toggle_void)
|
||||
allocsize += strlen(_(flagtostr(s->toggle))) + onoff_len + 9;
|
||||
if (s->func == do_toggle)
|
||||
allocsize += strlen(_(epithet_of_flag(s->toggle))) + onoff_len + 9;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allocate memory for the help text. */
|
||||
help_text = charalloc(allocsize + 1);
|
||||
help_text = nmalloc(allocsize + 1);
|
||||
|
||||
/* Now add the text we want. */
|
||||
strcpy(help_text, htx[0]);
|
||||
if (htx[1] != NULL)
|
||||
if (htx[1])
|
||||
strcat(help_text, htx[1]);
|
||||
if (htx[2] != NULL)
|
||||
if (htx[2])
|
||||
strcat(help_text, htx[2]);
|
||||
|
||||
/* Remember this end-of-introduction, start-of-shortcuts. */
|
||||
@@ -492,15 +267,15 @@ void help_init(void)
|
||||
|
||||
/* Show the first two shortcuts (if any) for each function. */
|
||||
for (s = sclist; s != NULL; s = s->next) {
|
||||
if ((s->menus & currmenu) && s->func == f->func) {
|
||||
if ((s->menus & currmenu) && s->func == f->func && s->keystr[0]) {
|
||||
/* Make the first column 7 cells wide and the second 10. */
|
||||
if (++tally == 1) {
|
||||
sprintf(ptr, "%s ", s->keystr);
|
||||
/* Unicode arrows take three bytes instead of one. */
|
||||
ptr += (strstr(s->keystr, "\xE2") != NULL ? 9 : 7);
|
||||
ptr += (strstr(s->keystr, "\xE2") ? 9 : 7);
|
||||
} else {
|
||||
sprintf(ptr, "(%s) ", s->keystr);
|
||||
ptr += (strstr(s->keystr, "\xE2") != NULL ? 12 : 10);
|
||||
ptr += (strstr(s->keystr, "\xE2") ? 12 : 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -512,7 +287,7 @@ void help_init(void)
|
||||
ptr += 10;
|
||||
|
||||
/* The shortcut's description. */
|
||||
ptr += sprintf(ptr, "%s\n", _(f->help));
|
||||
ptr += sprintf(ptr, "%s\n", _(f->phrase));
|
||||
|
||||
if (f->blank_after)
|
||||
ptr += sprintf(ptr, "\n");
|
||||
@@ -532,75 +307,279 @@ void help_init(void)
|
||||
counter++;
|
||||
for (s = sclist; s != NULL; s = s->next)
|
||||
if (s->toggle && s->ordinal == counter) {
|
||||
ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus == MMAIN ? s->keystr : ""),
|
||||
_(flagtostr(s->toggle)), _("enable/disable"));
|
||||
if (s->toggle == NO_COLOR_SYNTAX || s->toggle == TABS_TO_SPACES)
|
||||
ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus & MMAIN ? s->keystr : ""),
|
||||
_(epithet_of_flag(s->toggle)), _("enable/disable"));
|
||||
/* Add a blank like between two groups. */
|
||||
if (s->toggle == NO_SYNTAX)
|
||||
ptr += sprintf(ptr, "\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Return the function that is bound to the given key, accepting certain
|
||||
* plain characters too, for consistency with the file browser. */
|
||||
functionptrtype parse_help_input(int *kbinput)
|
||||
/* Hard-wrap the concatenated help text, and write it into a new buffer. */
|
||||
void wrap_help_text_into_buffer(void)
|
||||
{
|
||||
if (!meta_key) {
|
||||
switch (*kbinput) {
|
||||
case '-':
|
||||
return do_page_up;
|
||||
case ' ':
|
||||
return do_page_down;
|
||||
case 'W':
|
||||
case 'w':
|
||||
case '/':
|
||||
return do_search_forward;
|
||||
case 'N':
|
||||
return do_findprevious;
|
||||
case 'n':
|
||||
return do_findnext;
|
||||
case 'E':
|
||||
case 'e':
|
||||
case 'Q':
|
||||
case 'q':
|
||||
case 'X':
|
||||
case 'x':
|
||||
return do_exit;
|
||||
/* Avoid overtight and overwide paragraphs in the introductory text. */
|
||||
size_t wrapping_point = ((COLS < 40) ? 40 : (COLS > 74) ? 74 : COLS) - sidebar;
|
||||
const char *ptr = start_of_body;
|
||||
size_t sum = 0;
|
||||
|
||||
make_new_buffer();
|
||||
|
||||
/* Ensure there is a blank line at the top of the text, for esthetics. */
|
||||
if ((ISSET(MINIBAR) || !ISSET(EMPTY_LINE)) && LINES > 6) {
|
||||
openfile->current->data = mallocstrcpy(openfile->current->data, " ");
|
||||
openfile->current->next = make_new_node(openfile->current);
|
||||
openfile->current = openfile->current->next;
|
||||
}
|
||||
|
||||
/* Copy the help text into the just-created new buffer. */
|
||||
while (*ptr) {
|
||||
int length, shim;
|
||||
char *oneline;
|
||||
|
||||
if (ptr == end_of_intro)
|
||||
wrapping_point = ((COLS < 40) ? 40 : COLS) - sidebar;
|
||||
|
||||
if (ptr < end_of_intro || *(ptr - 1) == '\n') {
|
||||
length = break_line(ptr, wrapping_point, TRUE);
|
||||
oneline = nmalloc(length + 1);
|
||||
shim = (*(ptr + length - 1) == ' ') ? 0 : 1;
|
||||
snprintf(oneline, length + shim, "%s", ptr);
|
||||
} else {
|
||||
length = break_line(ptr, ((COLS < 40) ? 22 : COLS - 18) - sidebar, TRUE);
|
||||
oneline = nmalloc(length + 5);
|
||||
snprintf(oneline, length + 5, "\t\t %s", ptr);
|
||||
}
|
||||
|
||||
free(openfile->current->data);
|
||||
openfile->current->data = oneline;
|
||||
|
||||
ptr += length;
|
||||
if (*ptr != '\n')
|
||||
ptr--;
|
||||
|
||||
/* Create a new line, and then one more for each extra \n. */
|
||||
do {
|
||||
openfile->current->next = make_new_node(openfile->current);
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current->data = copy_of("");
|
||||
} while (*(++ptr) == '\n');
|
||||
}
|
||||
|
||||
openfile->filebot = openfile->current;
|
||||
openfile->current = openfile->filetop;
|
||||
|
||||
remove_magicline();
|
||||
#ifdef ENABLE_COLOR
|
||||
find_and_prime_applicable_syntax();
|
||||
#endif
|
||||
prepare_for_display();
|
||||
|
||||
/* Move to the position in the file where we were before. */
|
||||
while (TRUE) {
|
||||
sum += strlen(openfile->current->data);
|
||||
if (sum > location)
|
||||
break;
|
||||
openfile->current = openfile->current->next;
|
||||
}
|
||||
|
||||
openfile->edittop = openfile->current;
|
||||
}
|
||||
|
||||
/* Assemble a help text, display it, and allow scrolling through it. */
|
||||
void show_help(void)
|
||||
{
|
||||
int kbinput = ERR;
|
||||
functionptrtype function;
|
||||
/* The function of the key the user typed in. */
|
||||
int oldmenu = currmenu;
|
||||
/* The menu we were called from. */
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
int was_margin = margin;
|
||||
#endif
|
||||
ssize_t was_tabsize = tabsize;
|
||||
#ifndef NANO_TINY
|
||||
bool was_lighted = spotlighted;
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
char *was_syntax = syntaxstr;
|
||||
#endif
|
||||
char *saved_answer = (answer) ? copy_of(answer) : NULL;
|
||||
/* The current answer when the user invokes help at the prompt. */
|
||||
unsigned stash[sizeof(flags) / sizeof(flags[0])];
|
||||
/* A storage place for the current flag settings. */
|
||||
linestruct *line;
|
||||
int length;
|
||||
|
||||
/* Save the settings of all flags. */
|
||||
memcpy(stash, flags, sizeof(flags));
|
||||
|
||||
/* Ensure that the help screen's shortcut list can be displayed. */
|
||||
if (ISSET(NO_HELP) || ISSET(ZERO)) {
|
||||
UNSET(NO_HELP);
|
||||
UNSET(ZERO);
|
||||
window_init();
|
||||
} else
|
||||
blank_statusbar();
|
||||
|
||||
/* When searching, do it forward, case insensitive, and without regexes. */
|
||||
UNSET(BACKWARDS_SEARCH);
|
||||
UNSET(CASE_SENSITIVE);
|
||||
UNSET(USE_REGEXP);
|
||||
|
||||
UNSET(WHITESPACE_DISPLAY);
|
||||
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
editwincols = COLS - sidebar;
|
||||
margin = 0;
|
||||
#endif
|
||||
tabsize = 8;
|
||||
#ifndef NANO_TINY
|
||||
spotlighted = FALSE;
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
syntaxstr = "nanohelp";
|
||||
#endif
|
||||
curs_set(0);
|
||||
|
||||
/* Compose the help text from all the relevant pieces. */
|
||||
help_init();
|
||||
|
||||
inhelp = TRUE;
|
||||
location = 0;
|
||||
didfind = 0;
|
||||
|
||||
bottombars(MHELP);
|
||||
|
||||
/* Extract the title from the head of the help text. */
|
||||
length = break_line(help_text, HIGHEST_POSITIVE, TRUE);
|
||||
title = measured_copy(help_text, length);
|
||||
|
||||
titlebar(title);
|
||||
|
||||
/* Skip over the title to point at the start of the body text. */
|
||||
start_of_body = help_text + length;
|
||||
while (*start_of_body == '\n')
|
||||
start_of_body++;
|
||||
|
||||
wrap_help_text_into_buffer();
|
||||
edit_refresh();
|
||||
|
||||
while (TRUE) {
|
||||
lastmessage = VACUUM;
|
||||
focusing = TRUE;
|
||||
|
||||
/* Show the cursor when we searched and found something. */
|
||||
kbinput = get_kbinput(midwin, didfind == 1 || ISSET(SHOW_CURSOR));
|
||||
|
||||
didfind = 0;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
spotlighted = FALSE;
|
||||
#endif
|
||||
function = interpret(kbinput);
|
||||
|
||||
if (ISSET(SHOW_CURSOR) && (function == do_left || function == do_right ||
|
||||
function == do_up || function == do_down)) {
|
||||
function();
|
||||
} else if (function == do_up || function == do_scroll_up) {
|
||||
do_scroll_up();
|
||||
} else if (function == do_down || function == do_scroll_down) {
|
||||
if (openfile->edittop->lineno + editwinrows - 1 < openfile->filebot->lineno)
|
||||
do_scroll_down();
|
||||
} else if (function == do_page_up || function == do_page_down ||
|
||||
function == to_first_line || function == to_last_line) {
|
||||
function();
|
||||
} else if (function == do_search_backward || function == do_search_forward ||
|
||||
function == do_findprevious || function == do_findnext) {
|
||||
function();
|
||||
bottombars(MHELP);
|
||||
#ifdef ENABLE_NANORC
|
||||
} else if (function == (functionptrtype)implant) {
|
||||
implant(first_sc_for(MHELP, function)->expansion);
|
||||
#endif
|
||||
#ifdef ENABLE_MOUSE
|
||||
} else if (kbinput == KEY_MOUSE) {
|
||||
int dummy_row, dummy_col;
|
||||
get_mouseinput(&dummy_row, &dummy_col);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
} else if (kbinput == START_OF_PASTE) {
|
||||
while (get_kbinput(midwin, BLIND) != END_OF_PASTE)
|
||||
;
|
||||
statusline(AHEM, _("Paste is ignored"));
|
||||
} else if (kbinput == THE_WINDOW_RESIZED) {
|
||||
; /* Nothing to do. */
|
||||
#endif
|
||||
} else if (function == full_refresh) {
|
||||
full_refresh();
|
||||
} else if (function == do_exit) {
|
||||
break;
|
||||
} else
|
||||
unbound_key(kbinput);
|
||||
|
||||
edit_refresh();
|
||||
|
||||
location = 0;
|
||||
line = openfile->filetop;
|
||||
|
||||
/* Count how far (in bytes) edittop is into the file. */
|
||||
while (line != openfile->edittop) {
|
||||
location += strlen(line->data);
|
||||
line = line->next;
|
||||
}
|
||||
}
|
||||
return func_from_key(kbinput);
|
||||
}
|
||||
|
||||
/* Calculate the displayable length of the help-text line starting at ptr. */
|
||||
size_t help_line_len(const char *ptr)
|
||||
{
|
||||
size_t wrapping_point = (COLS > 24) ? COLS - 1 : 24;
|
||||
/* The target width for wrapping long lines. */
|
||||
ssize_t wrap_location;
|
||||
/* Actual position where the line can be wrapped. */
|
||||
size_t length = 0;
|
||||
/* Full length of the line, until the first newline. */
|
||||
/* Discard the help-text buffer. */
|
||||
close_buffer();
|
||||
|
||||
/* Avoid overwide paragraphs in the introductory text. */
|
||||
if (ptr < end_of_intro && COLS > 74)
|
||||
wrapping_point = 74;
|
||||
/* Restore the settings of all flags. */
|
||||
memcpy(flags, stash, sizeof(flags));
|
||||
|
||||
wrap_location = break_line(ptr, wrapping_point, TRUE);
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
margin = was_margin;
|
||||
editwincols = COLS - margin - sidebar;
|
||||
#endif
|
||||
tabsize = was_tabsize;
|
||||
#ifndef NANO_TINY
|
||||
spotlighted = was_lighted;
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
syntaxstr = was_syntax;
|
||||
have_palette = FALSE;
|
||||
#endif
|
||||
|
||||
/* Get the length of the entire line up to a null or a newline. */
|
||||
while (*(ptr + length) != '\0' && *(ptr + length) != '\n')
|
||||
length = step_right(ptr, length);
|
||||
free(title);
|
||||
title = NULL;
|
||||
free(answer);
|
||||
answer = saved_answer;
|
||||
free(help_text);
|
||||
inhelp = FALSE;
|
||||
|
||||
/* If the entire line will just fit the screen, don't wrap it. */
|
||||
if (wideness(ptr, length) <= wrapping_point + 1)
|
||||
return length;
|
||||
else if (wrap_location > 0)
|
||||
return wrap_location;
|
||||
curs_set(0);
|
||||
|
||||
if (ISSET(NO_HELP) || ISSET(ZERO))
|
||||
window_init();
|
||||
else
|
||||
return 1;
|
||||
blank_statusbar();
|
||||
|
||||
bottombars(oldmenu);
|
||||
|
||||
#ifdef ENABLE_BROWSER
|
||||
if (oldmenu & (MBROWSER|MGOTODIR|MWHEREISFILE))
|
||||
browser_refresh();
|
||||
else
|
||||
#endif
|
||||
{
|
||||
titlebar(NULL);
|
||||
edit_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* ENABLE_HELP */
|
||||
|
||||
/* Start the help viewer, or indicate that there is no help. */
|
||||
@@ -609,8 +588,8 @@ void do_help(void)
|
||||
#ifdef ENABLE_HELP
|
||||
show_help();
|
||||
#else
|
||||
if (currmenu == MMAIN)
|
||||
say_there_is_no_help();
|
||||
if (currmenu & (MMAIN|MBROWSER))
|
||||
statusbar(_("^W = Ctrl+W M-W = Alt+W"));
|
||||
else
|
||||
beep();
|
||||
#endif
|
||||
|
||||
757
src/history.c
757
src/history.c
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* history.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 2003-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016-2017 Benno Schulenberg *
|
||||
* Copyright (C) 2003-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016, 2017, 2019, 2025 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,11 +15,11 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#ifdef ENABLE_HISTORIES
|
||||
|
||||
@@ -27,21 +27,21 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifndef SEARCH_HISTORY
|
||||
#define SEARCH_HISTORY "search_history"
|
||||
#define SEARCH_HISTORY "search_history"
|
||||
#endif
|
||||
|
||||
#ifndef POSITION_HISTORY
|
||||
#define POSITION_HISTORY "filepos_history"
|
||||
#define POSITION_HISTORY "filepos_history"
|
||||
#endif
|
||||
|
||||
static bool history_changed = FALSE;
|
||||
/* Whether any of the history lists has changed. */
|
||||
static struct stat stat_of_positions_file;
|
||||
/* The last-obtained stat information of the positions file. */
|
||||
static char *poshistname = NULL;
|
||||
/* The name of the positions-history file. */
|
||||
static poshiststruct *position_history = NULL;
|
||||
/* The list of filenames with their last cursor positions. */
|
||||
static char *registername = NULL;
|
||||
/* The name of the positions-register file. */
|
||||
static time_t latest_timestamp = 942927132;
|
||||
/* The last time the positions-register file was written. */
|
||||
static positionstruct *positions_register = NULL;
|
||||
/* A list of recently opened files with their last cursor position. */
|
||||
|
||||
/* Initialize the lists of historical search and replace strings
|
||||
* and the list of historical executed commands. */
|
||||
@@ -63,21 +63,21 @@ void history_init(void)
|
||||
executebot = execute_history;
|
||||
}
|
||||
|
||||
/* Set the current position in the given history list to the bottom. */
|
||||
void history_reset(const linestruct *list)
|
||||
/* Reset the pointer into the history list that contains item to the bottom. */
|
||||
void reset_history_pointer_for(const linestruct *item)
|
||||
{
|
||||
if (list == search_history)
|
||||
if (item == search_history)
|
||||
search_history = searchbot;
|
||||
else if (list == replace_history)
|
||||
else if (item == replace_history)
|
||||
replace_history = replacebot;
|
||||
else if (list == execute_history)
|
||||
else if (item == execute_history)
|
||||
execute_history = executebot;
|
||||
}
|
||||
|
||||
/* Return from the history list that starts at start and ends at end
|
||||
* the first node that contains the first len characters of the given
|
||||
* text, or NULL if there is no such node. */
|
||||
linestruct *find_history(const linestruct *start, const linestruct *end,
|
||||
linestruct *find_in_history(const linestruct *start, const linestruct *end,
|
||||
const char *text, size_t len)
|
||||
{
|
||||
const linestruct *item;
|
||||
@@ -92,9 +92,10 @@ linestruct *find_history(const linestruct *start, const linestruct *end,
|
||||
|
||||
/* Update a history list (the one in which item is the current position)
|
||||
* with a fresh string text. That is: add text, or move it to the end. */
|
||||
void update_history(linestruct **item, const char *text)
|
||||
void update_history(linestruct **item, const char *text, bool avoid_duplicates)
|
||||
{
|
||||
linestruct **htop = NULL, **hbot = NULL, *thesame;
|
||||
linestruct **htop = NULL, **hbot = NULL;
|
||||
linestruct *thesame = NULL;
|
||||
|
||||
if (*item == search_history) {
|
||||
htop = &searchtop;
|
||||
@@ -107,34 +108,36 @@ void update_history(linestruct **item, const char *text)
|
||||
hbot = &executebot;
|
||||
}
|
||||
|
||||
/* See if the string is already in the history. */
|
||||
thesame = find_history(*hbot, *htop, text, HIGHEST_POSITIVE);
|
||||
/* When requested, check if the string is already in the history. */
|
||||
if (avoid_duplicates)
|
||||
thesame = find_in_history(*hbot, *htop, text, HIGHEST_POSITIVE);
|
||||
|
||||
/* If an identical string was found, delete that item. */
|
||||
if (thesame != NULL) {
|
||||
linestruct *after = thesame->next;
|
||||
|
||||
/* If the string is at the head of the list, move the head. */
|
||||
if (thesame) {
|
||||
if (thesame == *htop)
|
||||
*htop = after;
|
||||
*htop = thesame->next;
|
||||
else
|
||||
thesame->prev->next = thesame->next;
|
||||
thesame->next->prev = thesame->prev;
|
||||
|
||||
unlink_node(thesame);
|
||||
renumber_from(after);
|
||||
free(thesame->data);
|
||||
free(thesame);
|
||||
(*hbot)->lineno--;
|
||||
}
|
||||
|
||||
/* If the history is full, delete the oldest item (the one at the
|
||||
* head of the list), to make room for a new item at the end. */
|
||||
if ((*hbot)->lineno == MAX_SEARCH_HISTORY + 1) {
|
||||
linestruct *oldest = *htop;
|
||||
|
||||
if ((*hbot)->lineno > MAX_SEARCH_HISTORY) {
|
||||
*htop = (*htop)->next;
|
||||
unlink_node(oldest);
|
||||
renumber_from(*htop);
|
||||
free((*htop)->prev->data);
|
||||
free((*htop)->prev);
|
||||
(*htop)->prev = NULL;
|
||||
(*hbot)->lineno--;
|
||||
}
|
||||
|
||||
/* Store the fresh string in the last item, then create a new item. */
|
||||
(*hbot)->data = mallocstrcpy((*hbot)->data, text);
|
||||
splice_node(*hbot, make_new_node(*hbot));
|
||||
(*hbot)->next = make_new_node(*hbot);
|
||||
*hbot = (*hbot)->next;
|
||||
(*hbot)->data = copy_of("");
|
||||
|
||||
@@ -145,103 +148,68 @@ void update_history(linestruct **item, const char *text)
|
||||
*item = *hbot;
|
||||
}
|
||||
|
||||
/* Move h to the string in the history list just before it, and return
|
||||
* that string. If there isn't one, don't move h and return NULL. */
|
||||
char *get_history_older(linestruct **h)
|
||||
{
|
||||
if ((*h)->prev == NULL)
|
||||
return NULL;
|
||||
|
||||
*h = (*h)->prev;
|
||||
|
||||
return (*h)->data;
|
||||
}
|
||||
|
||||
/* Move h to the string in the history list just after it, and return
|
||||
* that string. If there isn't one, don't move h and return NULL. */
|
||||
char *get_history_newer(linestruct **h)
|
||||
{
|
||||
if ((*h)->next == NULL)
|
||||
return NULL;
|
||||
|
||||
*h = (*h)->next;
|
||||
|
||||
return (*h)->data;
|
||||
}
|
||||
|
||||
/* Two empty placeholder functions. */
|
||||
void get_history_older_void(void)
|
||||
{
|
||||
}
|
||||
void get_history_newer_void(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef ENABLE_TABCOMP
|
||||
/* Move h to the next string that's a tab completion of the string s,
|
||||
* looking at only the first len characters of s, and return that
|
||||
* string. If there isn't one, or if len is 0, don't move h and return
|
||||
* s. */
|
||||
char *get_history_completion(linestruct **h, char *s, size_t len)
|
||||
/* Go backward through one of three history lists, starting at item *here,
|
||||
* searching for a string that is a tab completion of the given string,
|
||||
* looking at only its first len characters. When found, make *here point
|
||||
* at the item and return its string; otherwise, just return the string. */
|
||||
char *get_history_completion(linestruct **here, char *string, size_t len)
|
||||
{
|
||||
if (len > 0) {
|
||||
linestruct *htop = NULL, *hbot = NULL, *p;
|
||||
linestruct *htop = NULL, *hbot = NULL;
|
||||
linestruct *item;
|
||||
|
||||
if (*h == search_history) {
|
||||
htop = searchtop;
|
||||
hbot = searchbot;
|
||||
} else if (*h == replace_history) {
|
||||
htop = replacetop;
|
||||
hbot = replacebot;
|
||||
} else if (*h == execute_history) {
|
||||
htop = executetop;
|
||||
hbot = executebot;
|
||||
}
|
||||
|
||||
/* Search the history list from the current position to the top
|
||||
* for a match of len characters. Skip over an exact match. */
|
||||
p = find_history((*h)->prev, htop, s, len);
|
||||
|
||||
while (p != NULL && strcmp(p->data, s) == 0)
|
||||
p = find_history(p->prev, htop, s, len);
|
||||
|
||||
if (p != NULL) {
|
||||
*h = p;
|
||||
return mallocstrcpy(s, (*h)->data);
|
||||
}
|
||||
|
||||
/* Search the history list from the bottom to the current position
|
||||
* for a match of len characters. Skip over an exact match. */
|
||||
p = find_history(hbot, *h, s, len);
|
||||
|
||||
while (p != NULL && strcmp(p->data, s) == 0)
|
||||
p = find_history(p->prev, *h, s, len);
|
||||
|
||||
if (p != NULL) {
|
||||
*h = p;
|
||||
return mallocstrcpy(s, (*h)->data);
|
||||
}
|
||||
if (*here == search_history) {
|
||||
htop = searchtop;
|
||||
hbot = searchbot;
|
||||
} else if (*here == replace_history) {
|
||||
htop = replacetop;
|
||||
hbot = replacebot;
|
||||
} else if (*here == execute_history) {
|
||||
htop = executetop;
|
||||
hbot = executebot;
|
||||
}
|
||||
|
||||
/* If we're here, we didn't find a match, we didn't find an inexact
|
||||
* match, or len is 0. Return s. */
|
||||
return (char *)s;
|
||||
/* First search from the current position to the top of the list
|
||||
* for a match of len characters. Skip over an exact match. */
|
||||
item = find_in_history((*here)->prev, htop, string, len);
|
||||
|
||||
while (item && strcmp(item->data, string) == 0)
|
||||
item = find_in_history(item->prev, htop, string, len);
|
||||
|
||||
if (item) {
|
||||
*here = item;
|
||||
return mallocstrcpy(string, item->data);
|
||||
}
|
||||
|
||||
/* Now search from the bottom of the list to the original position. */
|
||||
item = find_in_history(hbot, *here, string, len);
|
||||
|
||||
while (item && strcmp(item->data, string) == 0)
|
||||
item = find_in_history(item->prev, *here, string, len);
|
||||
|
||||
if (item) {
|
||||
*here = item;
|
||||
return mallocstrcpy(string, item->data);
|
||||
}
|
||||
|
||||
/* When no useful match was found, simply return the given string. */
|
||||
return (char *)string;
|
||||
}
|
||||
#endif /* ENABLE_TABCOMP */
|
||||
|
||||
/* Check whether we have or could make a directory for history files. */
|
||||
bool have_statedir(void)
|
||||
{
|
||||
struct stat dirstat;
|
||||
const char *xdgdatadir;
|
||||
struct stat dirinfo;
|
||||
|
||||
get_homedir();
|
||||
|
||||
if (homedir != NULL) {
|
||||
if (homedir) {
|
||||
statedir = concatenate(homedir, "/.nano/");
|
||||
|
||||
if (stat(statedir, &dirstat) == 0 && S_ISDIR(dirstat.st_mode)) {
|
||||
poshistname = concatenate(statedir, POSITION_HISTORY);
|
||||
if (stat(statedir, &dirinfo) == 0 && S_ISDIR(dirinfo.st_mode)) {
|
||||
registername = concatenate(statedir, POSITION_HISTORY);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -252,28 +220,28 @@ bool have_statedir(void)
|
||||
if (homedir == NULL && xdgdatadir == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (xdgdatadir != NULL)
|
||||
if (xdgdatadir)
|
||||
statedir = concatenate(xdgdatadir, "/nano/");
|
||||
else
|
||||
statedir = concatenate(homedir, "/.local/share/nano/");
|
||||
|
||||
if (stat(statedir, &dirstat) == -1) {
|
||||
if (stat(statedir, &dirinfo) < 0) {
|
||||
if (xdgdatadir == NULL) {
|
||||
char *statepath = concatenate(homedir, "/.local");
|
||||
mkdir(statepath, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
mkdir(statepath, S_IRWXU);
|
||||
free(statepath);
|
||||
statepath = concatenate(homedir, "/.local/share");
|
||||
mkdir(statepath, S_IRWXU);
|
||||
free(statepath);
|
||||
}
|
||||
if (mkdir(statedir, S_IRWXU) == -1) {
|
||||
if (mkdir(statedir, S_IRWXU) < 0) {
|
||||
jot_error(N_("Unable to create directory %s: %s\n"
|
||||
"It is required for saving/loading "
|
||||
"search history or cursor positions.\n"),
|
||||
statedir, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
} else if (!S_ISDIR(dirstat.st_mode)) {
|
||||
} else if (!S_ISDIR(dirinfo.st_mode)) {
|
||||
jot_error(N_("Path %s is not a directory and needs to be.\n"
|
||||
"Nano will be unable to load or save "
|
||||
"search history or cursor positions.\n"),
|
||||
@@ -281,324 +249,351 @@ bool have_statedir(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
poshistname = concatenate(statedir, POSITION_HISTORY);
|
||||
registername = concatenate(statedir, POSITION_HISTORY);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Load the histories for Search and Replace and Execute Command. */
|
||||
/* Load the histories for Search, Replace With, and Execute Command. */
|
||||
void load_history(void)
|
||||
{
|
||||
char *histname = concatenate(statedir, SEARCH_HISTORY);
|
||||
FILE *hisfile = fopen(histname, "rb");
|
||||
char *historyname = concatenate(statedir, SEARCH_HISTORY);
|
||||
FILE *histories = fopen(historyname, "rb");
|
||||
|
||||
if (hisfile == NULL) {
|
||||
if (errno != ENOENT) {
|
||||
/* When reading failed, don't save history when we quit. */
|
||||
UNSET(HISTORYLOG);
|
||||
jot_error(N_("Error reading %s: %s"), histname,
|
||||
strerror(errno));
|
||||
}
|
||||
} else {
|
||||
/* Load the three history lists -- first search, then replace,
|
||||
* then execute -- from oldest entry to newest. Between two
|
||||
* lists there is an empty line. */
|
||||
linestruct **history = &search_history;
|
||||
char *line = NULL;
|
||||
size_t buf_len = 0;
|
||||
ssize_t read;
|
||||
|
||||
while ((read = getline(&line, &buf_len, hisfile)) > 0) {
|
||||
line[--read] = '\0';
|
||||
if (read > 0) {
|
||||
/* Encode any embedded NUL as 0x0A. */
|
||||
unsunder(line, read);
|
||||
update_history(history, line);
|
||||
} else if (history == &search_history)
|
||||
history = &replace_history;
|
||||
else
|
||||
history = &execute_history;
|
||||
}
|
||||
|
||||
fclose(hisfile);
|
||||
free(line);
|
||||
/* If reading an existing file failed, don't save history when we quit. */
|
||||
if (histories == NULL && errno != ENOENT) {
|
||||
jot_error(N_("Error reading %s: %s"), historyname, strerror(errno));
|
||||
UNSET(HISTORYLOG);
|
||||
}
|
||||
|
||||
/* After reading them in, set the status of the lists to "unchanged". */
|
||||
history_changed = FALSE;
|
||||
if (histories == NULL) {
|
||||
free(historyname);
|
||||
return;
|
||||
}
|
||||
|
||||
free(histname);
|
||||
linestruct **list = &search_history;
|
||||
char *stanza = NULL;
|
||||
size_t dummy = 0;
|
||||
ssize_t read;
|
||||
|
||||
/* Load the three history lists (first search, then replace, then execute)
|
||||
* from oldest entry to newest. Between two lists there is an empty line. */
|
||||
while ((read = getline(&stanza, &dummy, histories)) > 0) {
|
||||
stanza[--read] = '\0';
|
||||
if (read > 0) {
|
||||
recode_NUL_to_LF(stanza, read);
|
||||
update_history(list, stanza, IGNORE_DUPLICATES);
|
||||
} else if (list == &search_history)
|
||||
list = &replace_history;
|
||||
else
|
||||
list = &execute_history;
|
||||
}
|
||||
|
||||
if (fclose(histories) == EOF)
|
||||
jot_error(N_("Error reading %s: %s"), historyname, strerror(errno));
|
||||
|
||||
free(historyname);
|
||||
free(stanza);
|
||||
|
||||
/* Reading in the lists has marked them as changed; undo this side effect. */
|
||||
history_changed = FALSE;
|
||||
}
|
||||
|
||||
/* Write the lines of a history list, starting at head, from oldest to newest,
|
||||
* to the given file. Return TRUE if writing succeeded, and FALSE otherwise. */
|
||||
bool write_list(const linestruct *head, FILE *hisfile)
|
||||
bool write_list(const linestruct *head, FILE *histories)
|
||||
{
|
||||
const linestruct *item;
|
||||
|
||||
for (item = head; item != NULL; item = item->next) {
|
||||
size_t length = strlen(item->data);
|
||||
|
||||
/* Decode 0x0A bytes as embedded NULs. */
|
||||
sunder(item->data);
|
||||
size_t length = recode_LF_to_NUL(item->data);
|
||||
|
||||
if (fwrite(item->data, sizeof(char), length, hisfile) < length)
|
||||
if (fwrite(item->data, 1, length, histories) < length)
|
||||
return FALSE;
|
||||
if (putc('\n', hisfile) == EOF)
|
||||
if (putc('\n', histories) == EOF)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Save the histories for Search and Replace and Execute Command. */
|
||||
/* Save the histories for Search, Replace With, and Execute Command. */
|
||||
void save_history(void)
|
||||
{
|
||||
char *histname;
|
||||
FILE *hisfile;
|
||||
|
||||
/* If the histories are unchanged, don't bother saving them. */
|
||||
if (!history_changed)
|
||||
return;
|
||||
|
||||
histname = concatenate(statedir, SEARCH_HISTORY);
|
||||
hisfile = fopen(histname, "wb");
|
||||
char *historyname = concatenate(statedir, SEARCH_HISTORY);
|
||||
FILE *histories = fopen(historyname, "wb");
|
||||
|
||||
if (hisfile == NULL)
|
||||
fprintf(stderr, _("Error writing %s: %s\n"), histname,
|
||||
strerror(errno));
|
||||
else {
|
||||
/* Don't allow others to read or write the history file. */
|
||||
chmod(histname, S_IRUSR | S_IWUSR);
|
||||
|
||||
if (!write_list(searchtop, hisfile) ||
|
||||
!write_list(replacetop, hisfile) ||
|
||||
!write_list(executetop, hisfile))
|
||||
fprintf(stderr, _("Error writing %s: %s\n"), histname,
|
||||
strerror(errno));
|
||||
|
||||
fclose(hisfile);
|
||||
}
|
||||
|
||||
free(histname);
|
||||
}
|
||||
|
||||
/* Load the recorded cursor positions for files that were edited. */
|
||||
void load_poshistory(void)
|
||||
{
|
||||
FILE *hisfile = fopen(poshistname, "rb");
|
||||
|
||||
if (hisfile == NULL) {
|
||||
if (errno != ENOENT) {
|
||||
/* When reading failed, don't save history when we quit. */
|
||||
UNSET(POSITIONLOG);
|
||||
jot_error(N_("Error reading %s: %s"), poshistname, strerror(errno));
|
||||
}
|
||||
} else {
|
||||
char *line = NULL, *lineptr, *xptr;
|
||||
size_t buf_len = 0;
|
||||
ssize_t read, count = 0;
|
||||
poshiststruct *record_ptr = NULL, *newrecord;
|
||||
|
||||
/* Read and parse each line, and store the extracted data. */
|
||||
while ((read = getline(&line, &buf_len, hisfile)) > 5) {
|
||||
/* Decode NULs as embedded newlines. */
|
||||
unsunder(line, read);
|
||||
|
||||
/* Find where the x index and line number are in the line. */
|
||||
xptr = revstrstr(line, " ", line + read - 3);
|
||||
if (xptr == NULL)
|
||||
continue;
|
||||
lineptr = revstrstr(line, " ", xptr - 2);
|
||||
if (lineptr == NULL)
|
||||
continue;
|
||||
|
||||
/* Now separate the three elements of the line. */
|
||||
*(xptr++) = '\0';
|
||||
*(lineptr++) = '\0';
|
||||
|
||||
/* Create a new position record. */
|
||||
newrecord = (poshiststruct *)nmalloc(sizeof(poshiststruct));
|
||||
newrecord->filename = copy_of(line);
|
||||
newrecord->lineno = atoi(lineptr);
|
||||
newrecord->xno = atoi(xptr);
|
||||
newrecord->next = NULL;
|
||||
|
||||
/* Add the record to the list. */
|
||||
if (position_history == NULL)
|
||||
position_history = newrecord;
|
||||
else
|
||||
record_ptr->next = newrecord;
|
||||
|
||||
record_ptr = newrecord;
|
||||
|
||||
/* Impose a limit, so the file will not grow indefinitely. */
|
||||
if (++count > 200) {
|
||||
poshiststruct *drop_record = position_history;
|
||||
|
||||
position_history = position_history->next;
|
||||
|
||||
free(drop_record->filename);
|
||||
free(drop_record);
|
||||
}
|
||||
}
|
||||
fclose(hisfile);
|
||||
free(line);
|
||||
|
||||
stat(poshistname, &stat_of_positions_file);
|
||||
}
|
||||
}
|
||||
|
||||
/* Save the recorded cursor positions for files that were edited. */
|
||||
void save_poshistory(void)
|
||||
{
|
||||
poshiststruct *posptr;
|
||||
FILE *hisfile = fopen(poshistname, "wb");
|
||||
|
||||
if (hisfile == NULL)
|
||||
fprintf(stderr, _("Error writing %s: %s\n"), poshistname, strerror(errno));
|
||||
else {
|
||||
/* Don't allow others to read or write the history file. */
|
||||
chmod(poshistname, S_IRUSR | S_IWUSR);
|
||||
|
||||
for (posptr = position_history; posptr != NULL; posptr = posptr->next) {
|
||||
char *path_and_place;
|
||||
size_t length;
|
||||
|
||||
/* Assume 20 decimal positions each for line and column number,
|
||||
* plus two spaces, plus the line feed, plus the null byte. */
|
||||
path_and_place = charalloc(strlen(posptr->filename) + 44);
|
||||
sprintf(path_and_place, "%s %zd %zd\n",
|
||||
posptr->filename, posptr->lineno, posptr->xno);
|
||||
length = strlen(path_and_place);
|
||||
|
||||
/* Encode newlines in filenames as NULs. */
|
||||
sunder(path_and_place);
|
||||
/* Restore the terminating newline. */
|
||||
path_and_place[length - 1] = '\n';
|
||||
|
||||
if (fwrite(path_and_place, sizeof(char), length, hisfile) < length)
|
||||
fprintf(stderr, _("Error writing %s: %s\n"),
|
||||
poshistname, strerror(errno));
|
||||
free(path_and_place);
|
||||
}
|
||||
fclose(hisfile);
|
||||
|
||||
stat(poshistname, &stat_of_positions_file);
|
||||
}
|
||||
}
|
||||
|
||||
/* Reload the position history file if it has been modified since last load. */
|
||||
void reload_positions_if_needed(void)
|
||||
{
|
||||
struct stat newstat;
|
||||
|
||||
stat(poshistname, &newstat);
|
||||
|
||||
if (newstat.st_mtime != stat_of_positions_file.st_mtime) {
|
||||
poshiststruct *ptr, *nextone;
|
||||
|
||||
for (ptr = position_history; ptr != NULL; ptr = nextone) {
|
||||
nextone = ptr->next;
|
||||
free(ptr->filename);
|
||||
free(ptr);
|
||||
}
|
||||
position_history = NULL;
|
||||
|
||||
load_poshistory();
|
||||
}
|
||||
}
|
||||
|
||||
/* Update the recorded last file positions, given a filename, a line
|
||||
* and a column. If no entry is found, add a new one at the end. */
|
||||
void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos)
|
||||
{
|
||||
poshiststruct *posptr, *theone, *posprev = NULL;
|
||||
char *fullpath = get_full_path(filename);
|
||||
|
||||
if (fullpath == NULL || *filename == '\0') {
|
||||
free(fullpath);
|
||||
if (histories == NULL) {
|
||||
jot_error(N_("Error writing %s: %s"), historyname, strerror(errno));
|
||||
free(historyname);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't allow others to read or write the history file. */
|
||||
if (chmod(historyname, S_IRUSR | S_IWUSR) < 0)
|
||||
jot_error(N_("Cannot limit permissions on %s: %s"), historyname, strerror(errno));
|
||||
|
||||
if (!write_list(searchtop, histories) || !write_list(replacetop, histories) ||
|
||||
!write_list(executetop, histories))
|
||||
jot_error(N_("Error writing %s: %s"), historyname, strerror(errno));
|
||||
|
||||
if (fclose(histories) == EOF)
|
||||
jot_error(N_("Error writing %s: %s"), historyname, strerror(errno));
|
||||
|
||||
free(historyname);
|
||||
}
|
||||
|
||||
/* Return as a string... the line numbers of the lines with an anchor. */
|
||||
char *stringify_anchors(void)
|
||||
{
|
||||
char *string = copy_of("");
|
||||
#ifndef NANO_TINY
|
||||
char number[24];
|
||||
|
||||
for (linestruct *line = openfile->filetop; line != NULL; line = line->next)
|
||||
if (line->has_anchor) {
|
||||
sprintf(number, "%zi ", line->lineno);
|
||||
string = nrealloc(string, strlen(string) + strlen(number) + 1);
|
||||
strcat(string, number);
|
||||
}
|
||||
#endif
|
||||
return string;
|
||||
}
|
||||
|
||||
/* Set an anchor for each line number in the given string. */
|
||||
void restore_anchors(char *string)
|
||||
{
|
||||
#ifndef NANO_TINY
|
||||
linestruct *line = openfile->filetop;
|
||||
ssize_t number;
|
||||
char *space;
|
||||
|
||||
while (*string) {
|
||||
if ((space = strchr(string, ' ')) == NULL)
|
||||
return;
|
||||
*space = '\0';
|
||||
number = atoi(string);
|
||||
*space = ' ';
|
||||
string = space + 1;
|
||||
|
||||
while (line->lineno < number)
|
||||
if ((line = line->next) == NULL)
|
||||
return;
|
||||
|
||||
line->has_anchor = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Load the recorded cursor positions for files that were opened. */
|
||||
void load_positions_register(void)
|
||||
{
|
||||
FILE *registry = fopen(registername, "rb");
|
||||
|
||||
/* If reading an existing file failed, don't save the register when we quit. */
|
||||
if (registry == NULL && errno != ENOENT) {
|
||||
jot_error(N_("Error reading %s: %s"), registername, strerror(errno));
|
||||
UNSET(POSITIONLOG);
|
||||
}
|
||||
|
||||
if (registry == NULL)
|
||||
return;
|
||||
|
||||
positionstruct *lastitem = NULL;
|
||||
positionstruct *newitem;
|
||||
char *stanza, *lineptr, *columnptr;
|
||||
char *phrase = NULL;
|
||||
struct stat fileinfo;
|
||||
size_t dummy = 0;
|
||||
int count = 0;
|
||||
ssize_t length;
|
||||
|
||||
/* Read and parse each line, and store the extracted data. */
|
||||
while (count++ < 200 && (length = getline(&phrase, &dummy, registry)) > 1) {
|
||||
stanza = strchr(phrase, '/');
|
||||
length -= (stanza ? stanza - phrase : 0);
|
||||
|
||||
/* Decode NULs as embedded newlines. */
|
||||
recode_NUL_to_LF(stanza, length);
|
||||
|
||||
/* Find the spaces before column number and line number. */
|
||||
columnptr = revstrstr(stanza, " ", stanza + length - 3);
|
||||
if (columnptr == NULL)
|
||||
continue;
|
||||
lineptr = revstrstr(stanza, " ", columnptr - 2);
|
||||
if (lineptr == NULL)
|
||||
continue;
|
||||
|
||||
/* Now separate the three elements of the line. */
|
||||
*(columnptr++) = '\0';
|
||||
*(lineptr++) = '\0';
|
||||
|
||||
/* Create a new position record. */
|
||||
newitem = nmalloc(sizeof(positionstruct));
|
||||
newitem->filename = copy_of(stanza);
|
||||
newitem->linenumber = atoi(lineptr);
|
||||
newitem->columnnumber = atoi(columnptr);
|
||||
newitem->anchors = (phrase == stanza) ? NULL : measured_copy(phrase, stanza - phrase);
|
||||
newitem->next = NULL;
|
||||
|
||||
/* Add the record to the list. */
|
||||
if (positions_register == NULL)
|
||||
positions_register = newitem;
|
||||
else
|
||||
lastitem->next = newitem;
|
||||
|
||||
lastitem = newitem;
|
||||
}
|
||||
|
||||
if (fclose(registry) == EOF)
|
||||
jot_error(N_("Error reading %s: %s"), registername, strerror(errno));
|
||||
|
||||
free(phrase);
|
||||
|
||||
if (stat(registername, &fileinfo) == 0)
|
||||
latest_timestamp = fileinfo.st_mtime;
|
||||
}
|
||||
|
||||
/* Save the recorded cursor positions for files that were opened. */
|
||||
void save_positions_register(void)
|
||||
{
|
||||
FILE *registry = fopen(registername, "wb");
|
||||
struct stat fileinfo;
|
||||
positionstruct *item;
|
||||
int count = 0;
|
||||
|
||||
if (registry == NULL) {
|
||||
jot_error(N_("Error writing %s: %s"), registername, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't allow others to read or write the positions-register file. */
|
||||
if (chmod(registername, S_IRUSR | S_IWUSR) < 0)
|
||||
jot_error(N_("Cannot limit permissions on %s: %s"), registername, strerror(errno));
|
||||
|
||||
for (item = positions_register; item != NULL && count++ < 200; item = item->next) {
|
||||
char *path_and_place;
|
||||
size_t length = (item->anchors == NULL) ? 0 : strlen(item->anchors);
|
||||
|
||||
/* First write the string of line numbers with anchors, if any. */
|
||||
if (length && fwrite(item->anchors, 1, length, registry) < length)
|
||||
jot_error(N_("Error writing %s: %s"), registername, strerror(errno));
|
||||
|
||||
/* Assume 20 decimal positions each for line and column number,
|
||||
* plus two spaces, plus the line feed, plus the null byte. */
|
||||
path_and_place = nmalloc(strlen(item->filename) + 44);
|
||||
sprintf(path_and_place, "%s %zd %zd\n",
|
||||
item->filename, item->linenumber, item->columnnumber);
|
||||
|
||||
/* Encode newlines in filenames as NULs. */
|
||||
length = recode_LF_to_NUL(path_and_place);
|
||||
/* Restore the terminating newline. */
|
||||
path_and_place[length - 1] = '\n';
|
||||
|
||||
if (fwrite(path_and_place, 1, length, registry) < length)
|
||||
jot_error(N_("Error writing %s: %s"), registername, strerror(errno));
|
||||
|
||||
free(path_and_place);
|
||||
}
|
||||
|
||||
if (fclose(registry) == EOF)
|
||||
jot_error(N_("Error writing %s: %s"), registername, strerror(errno));
|
||||
|
||||
if (stat(registername, &fileinfo) == 0)
|
||||
latest_timestamp = fileinfo.st_mtime;
|
||||
}
|
||||
|
||||
/* Reload the positions-register file if it has been modified since last load. */
|
||||
void reload_positions_if_needed(void)
|
||||
{
|
||||
positionstruct *item, *nextone;
|
||||
struct stat fileinfo;
|
||||
|
||||
if (stat(registername, &fileinfo) < 0 || fileinfo.st_mtime == latest_timestamp)
|
||||
return;
|
||||
|
||||
for (item = positions_register; item != NULL; item = nextone) {
|
||||
nextone = item->next;
|
||||
free(item->filename);
|
||||
free(item->anchors);
|
||||
free(item);
|
||||
}
|
||||
|
||||
positions_register = NULL;
|
||||
|
||||
load_positions_register();
|
||||
}
|
||||
|
||||
/* Update the recorded last file positions with the current position in the
|
||||
* current buffer. If no existing entry is found, add a new one at the top. */
|
||||
void update_positions_register(void)
|
||||
{
|
||||
char *fullpath = get_full_path(openfile->filename);
|
||||
positionstruct *previous = NULL;
|
||||
positionstruct *item;
|
||||
|
||||
if (fullpath == NULL)
|
||||
return;
|
||||
|
||||
reload_positions_if_needed();
|
||||
|
||||
/* Look for a matching filename in the list. */
|
||||
for (posptr = position_history; posptr != NULL; posptr = posptr->next) {
|
||||
if (!strcmp(posptr->filename, fullpath))
|
||||
for (item = positions_register; item != NULL; item = item->next) {
|
||||
if (!strcmp(item->filename, fullpath))
|
||||
break;
|
||||
posprev = posptr;
|
||||
previous = item;
|
||||
}
|
||||
|
||||
/* Don't record files that have the default cursor position. */
|
||||
if (lineno == 1 && xpos == 1) {
|
||||
if (posptr != NULL) {
|
||||
if (posprev == NULL)
|
||||
position_history = posptr->next;
|
||||
else
|
||||
posprev->next = posptr->next;
|
||||
free(posptr->filename);
|
||||
free(posptr);
|
||||
save_poshistory();
|
||||
}
|
||||
free(fullpath);
|
||||
return;
|
||||
/* If no match was found, make a new node; otherwise, unlink the match. */
|
||||
if (item == NULL) {
|
||||
item = nmalloc(sizeof(positionstruct));
|
||||
item->filename = copy_of(fullpath);
|
||||
item->anchors = NULL;
|
||||
} else if (previous)
|
||||
previous->next = item->next;
|
||||
|
||||
/* Place the found or new node at the beginning, if not already there. */
|
||||
if (item != positions_register) {
|
||||
item->next = positions_register;
|
||||
positions_register = item;
|
||||
}
|
||||
|
||||
theone = posptr;
|
||||
|
||||
/* If we didn't find it, make a new node; otherwise, if we're
|
||||
* not at the end, move the matching one to the end. */
|
||||
if (theone == NULL) {
|
||||
theone = (poshiststruct *)nmalloc(sizeof(poshiststruct));
|
||||
theone->filename = copy_of(fullpath);
|
||||
if (position_history == NULL)
|
||||
position_history = theone;
|
||||
else
|
||||
posprev->next = theone;
|
||||
} else if (posptr->next != NULL) {
|
||||
if (posprev == NULL)
|
||||
position_history = posptr->next;
|
||||
else
|
||||
posprev->next = posptr->next;
|
||||
while (posptr->next != NULL)
|
||||
posptr = posptr->next;
|
||||
posptr->next = theone;
|
||||
}
|
||||
|
||||
/* Store the last cursor position. */
|
||||
theone->lineno = lineno;
|
||||
theone->xno = xpos;
|
||||
theone->next = NULL;
|
||||
/* Record the last cursor position and any anchors. */
|
||||
item->linenumber = openfile->current->lineno;
|
||||
item->columnnumber = xplustabs() + 1;
|
||||
free(item->anchors);
|
||||
item->anchors = stringify_anchors();
|
||||
|
||||
free(fullpath);
|
||||
|
||||
save_poshistory();
|
||||
save_positions_register();
|
||||
}
|
||||
|
||||
/* Check whether the given file matches an existing entry in the recorded
|
||||
* last file positions. If not, return FALSE. If yes, return TRUE and
|
||||
* set line and column to the retrieved values. */
|
||||
bool has_old_position(const char *file, ssize_t *line, ssize_t *column)
|
||||
/* Check whether the current filename matches an entry in the list of
|
||||
* recorded positions. If yes, restore the relevant cursor position. */
|
||||
void restore_cursor_position_if_any(void)
|
||||
{
|
||||
poshiststruct *posptr;
|
||||
char *fullpath = get_full_path(file);
|
||||
char *fullpath = get_full_path(openfile->filename);
|
||||
positionstruct *item;
|
||||
|
||||
if (fullpath == NULL)
|
||||
return FALSE;
|
||||
return;
|
||||
|
||||
reload_positions_if_needed();
|
||||
|
||||
posptr = position_history;
|
||||
while (posptr != NULL && strcmp(posptr->filename, fullpath) != 0)
|
||||
posptr = posptr->next;
|
||||
item = positions_register;
|
||||
while (item && strcmp(item->filename, fullpath) != 0)
|
||||
item = item->next;
|
||||
|
||||
free(fullpath);
|
||||
|
||||
if (posptr == NULL)
|
||||
return FALSE;
|
||||
|
||||
*line = posptr->lineno;
|
||||
*column = posptr->xno;
|
||||
return TRUE;
|
||||
if (item && item->anchors)
|
||||
restore_anchors(item->anchors);
|
||||
if (item)
|
||||
goto_line_and_column(item->linenumber, item->columnnumber, TRUE);
|
||||
}
|
||||
#endif /* ENABLE_HISTORIES */
|
||||
|
||||
407
src/move.c
407
src/move.c
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* move.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2018 Benno Schulenberg *
|
||||
* Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014-2018, 2020, 2024, 2026 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,11 +15,11 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -37,13 +37,22 @@ void to_first_line(void)
|
||||
void to_last_line(void)
|
||||
{
|
||||
openfile->current = openfile->filebot;
|
||||
openfile->current_x = strlen(openfile->filebot->data);
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (openfile->current->folded) {
|
||||
openfile->current = get_start_of_folded_segment(openfile->current);
|
||||
openfile->current_x = 0;
|
||||
} else
|
||||
#endif
|
||||
openfile->current_x = (inhelp) ? 0 : strlen(openfile->filebot->data);
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
/* Set the last line of the screen as the target for the cursor. */
|
||||
openfile->current_y = editwinrows - 1;
|
||||
openfile->cursor_row = editwinrows - 1;
|
||||
|
||||
refresh_needed = TRUE;
|
||||
#ifdef ENABLE_COLOR
|
||||
recook |= perturbed;
|
||||
#endif
|
||||
focusing = FALSE;
|
||||
}
|
||||
|
||||
@@ -80,7 +89,7 @@ size_t proper_x(linestruct *line, size_t *leftedge, bool forward,
|
||||
column / tabsize < (*leftedge + editwincols - 1) / tabsize))) {
|
||||
index++;
|
||||
|
||||
if (shifted != NULL)
|
||||
if (shifted)
|
||||
*shifted = TRUE;
|
||||
}
|
||||
|
||||
@@ -95,8 +104,8 @@ size_t proper_x(linestruct *line, size_t *leftedge, bool forward,
|
||||
* the middle of a tab that crosses a row boundary. */
|
||||
void set_proper_index_and_pww(size_t *leftedge, size_t target, bool forward)
|
||||
{
|
||||
bool shifted = FALSE;
|
||||
size_t was_edge = *leftedge;
|
||||
bool shifted = FALSE;
|
||||
|
||||
openfile->current_x = proper_x(openfile->current, leftedge, forward,
|
||||
actual_last_column(*leftedge, target), &shifted);
|
||||
@@ -109,20 +118,31 @@ void set_proper_index_and_pww(size_t *leftedge, size_t target, bool forward)
|
||||
openfile->placewewant = *leftedge + target;
|
||||
}
|
||||
|
||||
/* Move the cursor position on the current line to the desired column */
|
||||
void move_cursor_to_proper_column(void)
|
||||
{
|
||||
size_t leftedge;
|
||||
size_t target_column;
|
||||
get_edge_and_target(&leftedge, &target_column);
|
||||
set_proper_index_and_pww(&leftedge, target_column, TRUE);
|
||||
}
|
||||
|
||||
/* Move up almost one screenful. */
|
||||
void do_page_up(void)
|
||||
{
|
||||
int mustmove = (editwinrows < 3) ? 1 : editwinrows - 2;
|
||||
size_t leftedge, target_column;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* If we're not in smooth scrolling mode, put the cursor at the
|
||||
* beginning of the top line of the edit window, as Pico does. */
|
||||
if (ISSET(JUMPY_SCROLLING)) {
|
||||
openfile->current = openfile->edittop;
|
||||
leftedge = openfile->firstcolumn;
|
||||
openfile->current_y = 0;
|
||||
openfile->cursor_row = 0;
|
||||
target_column = 0;
|
||||
} else
|
||||
#endif
|
||||
get_edge_and_target(&leftedge, &target_column);
|
||||
|
||||
/* Move up the required number of lines or chunks. If we can't, we're
|
||||
@@ -145,14 +165,16 @@ void do_page_down(void)
|
||||
int mustmove = (editwinrows < 3) ? 1 : editwinrows - 2;
|
||||
size_t leftedge, target_column;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* If we're not in smooth scrolling mode, put the cursor at the
|
||||
* beginning of the top line of the edit window, as Pico does. */
|
||||
if (ISSET(JUMPY_SCROLLING)) {
|
||||
openfile->current = openfile->edittop;
|
||||
leftedge = openfile->firstcolumn;
|
||||
openfile->current_y = 0;
|
||||
openfile->cursor_row = 0;
|
||||
target_column = 0;
|
||||
} else
|
||||
#endif
|
||||
get_edge_and_target(&leftedge, &target_column);
|
||||
|
||||
/* Move down the required number of lines or chunks. If we can't, we're
|
||||
@@ -169,11 +191,68 @@ void do_page_down(void)
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Place the cursor on the first row in the viewport. */
|
||||
void to_top_row(void)
|
||||
{
|
||||
size_t leftedge, offset;
|
||||
|
||||
get_edge_and_target(&leftedge, &offset);
|
||||
|
||||
openfile->current = openfile->edittop;
|
||||
leftedge = openfile->firstcolumn;
|
||||
|
||||
set_proper_index_and_pww(&leftedge, offset, FALSE);
|
||||
|
||||
refresh_needed = (openfile->mark != NULL);
|
||||
}
|
||||
|
||||
/* Place the cursor on the last row in the viewport, when possible. */
|
||||
void to_bottom_row(void)
|
||||
{
|
||||
size_t leftedge, offset;
|
||||
|
||||
get_edge_and_target(&leftedge, &offset);
|
||||
|
||||
openfile->current = openfile->edittop;
|
||||
leftedge = openfile->firstcolumn;
|
||||
|
||||
go_forward_chunks(editwinrows - 1, &openfile->current, &leftedge);
|
||||
set_proper_index_and_pww(&leftedge, offset, TRUE);
|
||||
|
||||
refresh_needed = (openfile->mark != NULL);
|
||||
}
|
||||
|
||||
/* Put the cursor line at the center, then the top, then the bottom. */
|
||||
void do_cycle(void)
|
||||
{
|
||||
if (cycling_aim == 0)
|
||||
adjust_viewport(CENTERING);
|
||||
else {
|
||||
openfile->cursor_row = (cycling_aim == 1) ? 0 : editwinrows - 1;
|
||||
adjust_viewport(STATIONARY);
|
||||
}
|
||||
|
||||
cycling_aim = (cycling_aim + 1) % 3;
|
||||
|
||||
draw_all_subwindows();
|
||||
full_refresh();
|
||||
}
|
||||
|
||||
/* Scroll the line with the cursor to the center of the screen. */
|
||||
void do_center(void)
|
||||
{
|
||||
adjust_viewport(CENTERING);
|
||||
draw_all_subwindows();
|
||||
full_refresh();
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#ifdef ENABLE_JUSTIFY
|
||||
/* Move to the first beginning of a paragraph before the current line. */
|
||||
void do_para_begin(linestruct **line)
|
||||
{
|
||||
if ((*line)->prev != NULL)
|
||||
if ((*line)->prev)
|
||||
*line = (*line)->prev;
|
||||
|
||||
while (!begpar(*line, 0))
|
||||
@@ -183,16 +262,15 @@ void do_para_begin(linestruct **line)
|
||||
/* Move down to the last line of the first found paragraph. */
|
||||
void do_para_end(linestruct **line)
|
||||
{
|
||||
while ((*line)->next != NULL && !inpar(*line))
|
||||
while ((*line)->next && !inpar(*line))
|
||||
*line = (*line)->next;
|
||||
|
||||
while ((*line)->next != NULL && inpar((*line)->next) &&
|
||||
!begpar((*line)->next, 0))
|
||||
while ((*line)->next && inpar((*line)->next) && !begpar((*line)->next, 0))
|
||||
*line = (*line)->next;
|
||||
}
|
||||
|
||||
/* Move up to first start of a paragraph before the current line. */
|
||||
void do_para_begin_void(void)
|
||||
void to_para_begin(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
@@ -203,7 +281,7 @@ void do_para_begin_void(void)
|
||||
}
|
||||
|
||||
/* Move down to just after the first found end of a paragraph. */
|
||||
void do_para_end_void(void)
|
||||
void to_para_end(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
@@ -211,82 +289,123 @@ void do_para_end_void(void)
|
||||
|
||||
/* Step beyond the last line of the paragraph, if possible;
|
||||
* otherwise, move to the end of the line. */
|
||||
if (openfile->current->next != NULL) {
|
||||
if (openfile->current->next) {
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current_x = 0;
|
||||
} else
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
|
||||
edit_redraw(was_current, CENTERING);
|
||||
#ifdef ENABLE_COLOR
|
||||
recook |= perturbed;
|
||||
#endif
|
||||
}
|
||||
#endif /* ENABLE_JUSTIFY */
|
||||
|
||||
/* Move to the preceding block of text. */
|
||||
void do_prev_block(void)
|
||||
void to_prev_block(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
linestruct *line_step = get_prev_visible_line(openfile->current);
|
||||
bool is_text = FALSE, seen_text = FALSE;
|
||||
|
||||
/* Skip backward until first blank line after some nonblank line(s). */
|
||||
while (openfile->current->prev != NULL && (!seen_text || is_text)) {
|
||||
openfile->current = openfile->current->prev;
|
||||
while (line_step && (!seen_text || is_text)) {
|
||||
openfile->current = line_step;
|
||||
line_step = get_prev_visible_line(line_step);
|
||||
#ifdef ENABLE_FOLDING
|
||||
/* Skip over the visibly drawn line of the folded segment */
|
||||
if (openfile->current->folded)
|
||||
continue;
|
||||
#endif
|
||||
is_text = !white_string(openfile->current->data);
|
||||
seen_text = seen_text || is_text;
|
||||
}
|
||||
|
||||
/* Step forward one line again if this one is blank. */
|
||||
if (openfile->current->next != NULL &&
|
||||
white_string(openfile->current->data))
|
||||
openfile->current = openfile->current->next;
|
||||
/* Step forward one line again if we passed text but this line is blank. */
|
||||
line_step = get_next_visible_line(openfile->current);
|
||||
if (seen_text && line_step && white_string(openfile->current->data)) {
|
||||
openfile->current = line_step;
|
||||
line_step = get_next_visible_line(line_step);
|
||||
}
|
||||
|
||||
openfile->current_x = 0;
|
||||
edit_redraw(was_current, CENTERING);
|
||||
}
|
||||
|
||||
/* Move to the next block of text. */
|
||||
void do_next_block(void)
|
||||
void to_next_block(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
linestruct *line_step = get_next_visible_line(openfile->current);
|
||||
bool is_white = white_string(openfile->current->data);
|
||||
bool seen_white = is_white;
|
||||
|
||||
/* Skip forward until first nonblank line after some blank line(s). */
|
||||
while (openfile->current->next != NULL && (!seen_white || is_white)) {
|
||||
openfile->current = openfile->current->next;
|
||||
while (line_step && (!seen_white || is_white)) {
|
||||
openfile->current = line_step;
|
||||
line_step = get_next_visible_line(line_step);
|
||||
#ifdef ENABLE_FOLDING
|
||||
/* Skip over the visibly drawn line of the folded segment */
|
||||
if (openfile->current->folded)
|
||||
continue;
|
||||
#endif
|
||||
is_white = white_string(openfile->current->data);
|
||||
seen_white = seen_white || is_white;
|
||||
}
|
||||
|
||||
openfile->current_x = 0;
|
||||
edit_redraw(was_current, CENTERING);
|
||||
#ifdef ENABLE_COLOR
|
||||
recook |= perturbed;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Move to the previous word. If allow_punct is TRUE, treat punctuation
|
||||
* as part of a word. */
|
||||
void do_prev_word(bool allow_punct)
|
||||
/* Move to the previous word.
|
||||
* When allow_folded is true, will move to previous word even if inside
|
||||
* a folded segment. */
|
||||
void do_prev_word(bool allow_folded)
|
||||
{
|
||||
bool punctuation_as_letters = ISSET(WORD_BOUNDS);
|
||||
bool seen_a_word = FALSE, step_forward = FALSE;
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (!allow_folded && openfile->current->folded) {
|
||||
openfile->current = get_prev_visible_line(openfile->current);
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Move backward until we pass over the start of a word. */
|
||||
while (TRUE) {
|
||||
/* If at the head of a line, move to the end of the preceding one. */
|
||||
if (openfile->current_x == 0) {
|
||||
if (openfile->current->prev == NULL)
|
||||
break;
|
||||
openfile->current = openfile->current->prev;
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (!allow_folded) {
|
||||
openfile->current = get_prev_visible_line(openfile->current);
|
||||
if (openfile->current->folded)
|
||||
openfile->current = openfile->current->prev;
|
||||
} else
|
||||
#endif
|
||||
openfile->current = openfile->current->prev;
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
}
|
||||
|
||||
/* Step back one character. */
|
||||
openfile->current_x = step_left(openfile->current->data,
|
||||
openfile->current_x);
|
||||
openfile->current_x = step_left(openfile->current->data, openfile->current_x);
|
||||
|
||||
if (is_word_mbchar(openfile->current->data + openfile->current_x,
|
||||
allow_punct)) {
|
||||
if (is_word_char(openfile->current->data + openfile->current_x,
|
||||
punctuation_as_letters)) {
|
||||
seen_a_word = TRUE;
|
||||
/* If at the head of a line now, this surely is a word start. */
|
||||
if (openfile->current_x == 0)
|
||||
break;
|
||||
#ifdef ENABLE_UTF8
|
||||
} else if (is_zerowidth(openfile->current->data + openfile->current_x)) {
|
||||
; /* skip */
|
||||
#endif
|
||||
} else if (seen_a_word) {
|
||||
/* This is space now: we've overshot the start of the word. */
|
||||
step_forward = TRUE;
|
||||
@@ -296,22 +415,29 @@ void do_prev_word(bool allow_punct)
|
||||
|
||||
if (step_forward)
|
||||
/* Move one character forward again to sit on the start of the word. */
|
||||
openfile->current_x = step_right(openfile->current->data,
|
||||
openfile->current_x);
|
||||
openfile->current_x = step_right(openfile->current->data, openfile->current_x);
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
}
|
||||
|
||||
/* Move to the next word. If after_ends is TRUE, stop at the ends of words
|
||||
* instead of their beginnings. If allow_punct is TRUE, treat punctuation as
|
||||
* part of a word. Return TRUE if we started on a word, and FALSE otherwise. */
|
||||
bool do_next_word(bool after_ends, bool allow_punct)
|
||||
* instead of at their beginnings. If allow_folded is true, go to next word
|
||||
* even if it's inside a folded segment. Return TRUE if we started on a word. */
|
||||
bool do_next_word(bool after_ends, bool allow_folded)
|
||||
{
|
||||
bool started_on_word = is_word_mbchar(openfile->current->data +
|
||||
openfile->current_x, allow_punct);
|
||||
bool punctuation_as_letters = ISSET(WORD_BOUNDS);
|
||||
bool started_on_word = is_word_char(openfile->current->data +
|
||||
openfile->current_x, punctuation_as_letters);
|
||||
bool seen_space = !started_on_word;
|
||||
#ifndef NANO_TINY
|
||||
bool seen_word = started_on_word;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (!allow_folded & openfile->current->folded) {
|
||||
openfile->current = get_next_visible_line(openfile->current);
|
||||
openfile->current_x = 0;
|
||||
}
|
||||
#endif
|
||||
/* Move forward until we reach the start of a word. */
|
||||
while (TRUE) {
|
||||
/* If at the end of a line, move to the beginning of the next one. */
|
||||
@@ -319,59 +445,78 @@ bool do_next_word(bool after_ends, bool allow_punct)
|
||||
/* When at end of file, stop. */
|
||||
if (openfile->current->next == NULL)
|
||||
break;
|
||||
openfile->current = openfile->current->next;
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (!allow_folded) {
|
||||
openfile->current = get_next_visible_line(openfile->current);
|
||||
if (openfile->current->folded) {
|
||||
/* get_next_visible_line() gives the start of a folded segment,
|
||||
* so skip to the end. */
|
||||
openfile->current = get_end_of_folded_segment(openfile->current);
|
||||
openfile->current = openfile->current->next;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
openfile->current = openfile->current->next;
|
||||
openfile->current_x = 0;
|
||||
seen_space = TRUE;
|
||||
} else {
|
||||
/* Step forward one character. */
|
||||
openfile->current_x = step_right(openfile->current->data,
|
||||
openfile->current_x);
|
||||
openfile->current_x = step_right(openfile->current->data, openfile->current_x);
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (after_ends) {
|
||||
/* If this is a word character, continue; else it's a separator,
|
||||
* and if we've already seen a word, then it's a word end. */
|
||||
if (is_word_mbchar(openfile->current->data + openfile->current_x,
|
||||
allow_punct))
|
||||
if (is_word_char(openfile->current->data + openfile->current_x,
|
||||
punctuation_as_letters))
|
||||
seen_word = TRUE;
|
||||
#ifdef ENABLE_UTF8
|
||||
else if (is_zerowidth(openfile->current->data + openfile->current_x))
|
||||
; /* skip */
|
||||
#endif
|
||||
else if (seen_word)
|
||||
break;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
#ifdef ENABLE_UTF8
|
||||
if (is_zerowidth(openfile->current->data + openfile->current_x))
|
||||
; /* skip */
|
||||
else
|
||||
#endif
|
||||
/* If this is not a word character, then it's a separator; else
|
||||
* if we've already seen a separator, then it's a word start. */
|
||||
if (!is_word_mbchar(openfile->current->data + openfile->current_x,
|
||||
allow_punct))
|
||||
if (!is_word_char(openfile->current->data + openfile->current_x,
|
||||
punctuation_as_letters))
|
||||
seen_space = TRUE;
|
||||
else if (seen_space)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UNFOLD_SEGMENT(openfile->current);
|
||||
|
||||
return started_on_word;
|
||||
}
|
||||
|
||||
/* Move to the previous word in the file, treating punctuation as part of a
|
||||
* word if the WORD_BOUNDS flag is set, and update the screen afterwards. */
|
||||
void do_prev_word_void(void)
|
||||
/* Move to the previous word in the file, and update the screen afterwards. */
|
||||
void to_prev_word(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
do_prev_word(ISSET(WORD_BOUNDS));
|
||||
do_prev_word(DISALLOW_FOLDED);
|
||||
|
||||
edit_redraw(was_current, FLOWING);
|
||||
}
|
||||
|
||||
/* Move to the next word in the file. If the AFTER_ENDS flag is set, stop
|
||||
* at word ends instead of beginnings. If the WORD_BOUNDS flag is set, treat
|
||||
* punctuation as part of a word. Update the screen afterwards. */
|
||||
void do_next_word_void(void)
|
||||
* at word ends instead of beginnings. Update the screen afterwards. */
|
||||
void to_next_word(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
do_next_word(ISSET(AFTER_ENDS), ISSET(WORD_BOUNDS));
|
||||
do_next_word(ISSET(AFTER_ENDS), DISALLOW_FOLDED);
|
||||
|
||||
edit_redraw(was_current, FLOWING);
|
||||
}
|
||||
@@ -386,25 +531,30 @@ void do_home(void)
|
||||
bool moved_off_chunk = TRUE;
|
||||
#ifndef NANO_TINY
|
||||
bool moved = FALSE;
|
||||
size_t leftedge = 0, leftedge_x = 0;
|
||||
size_t leftedge = 0;
|
||||
size_t left_x = 0;
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (openfile->current->folded)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
leftedge = leftedge_for(was_column, openfile->current);
|
||||
leftedge_x = proper_x(openfile->current, &leftedge, FALSE, leftedge,
|
||||
NULL);
|
||||
left_x = proper_x(openfile->current, &leftedge, FALSE, leftedge, NULL);
|
||||
}
|
||||
|
||||
if (ISSET(SMART_HOME)) {
|
||||
size_t indent_x = indent_length(openfile->current->data);
|
||||
|
||||
if (openfile->current->data[indent_x] != '\0') {
|
||||
if (openfile->current->data[indent_x]) {
|
||||
/* If we're exactly on the indent, move fully home. Otherwise,
|
||||
* when not softwrapping or not after the first nonblank chunk,
|
||||
* move to the first nonblank character. */
|
||||
if (openfile->current_x == indent_x) {
|
||||
openfile->current_x = 0;
|
||||
moved = TRUE;
|
||||
} else if (!ISSET(SOFTWRAP) || leftedge_x <= indent_x) {
|
||||
} else if (left_x <= indent_x) {
|
||||
openfile->current_x = indent_x;
|
||||
moved = TRUE;
|
||||
}
|
||||
@@ -414,10 +564,10 @@ void do_home(void)
|
||||
if (!moved && ISSET(SOFTWRAP)) {
|
||||
/* If already at the left edge of the screen, move fully home.
|
||||
* Otherwise, move to the left edge. */
|
||||
if (openfile->current_x == leftedge_x)
|
||||
if (openfile->current_x == left_x)
|
||||
openfile->current_x = 0;
|
||||
else {
|
||||
openfile->current_x = leftedge_x;
|
||||
openfile->current_x = left_x;
|
||||
openfile->placewewant = leftedge;
|
||||
moved_off_chunk = FALSE;
|
||||
}
|
||||
@@ -437,7 +587,7 @@ void do_home(void)
|
||||
}
|
||||
|
||||
/* Move to the end of the current line (or softwrapped chunk).
|
||||
* When softwrapping and alredy at the end of a chunk, go to the
|
||||
* When softwrapping and already at the end of a chunk, go to the
|
||||
* end of the full line. */
|
||||
void do_end(void)
|
||||
{
|
||||
@@ -446,13 +596,19 @@ void do_end(void)
|
||||
size_t line_len = strlen(openfile->current->data);
|
||||
bool moved_off_chunk = TRUE;
|
||||
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (openfile->current->folded)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
bool kickoff = TRUE;
|
||||
bool last_chunk = FALSE;
|
||||
size_t leftedge = leftedge_for(was_column, openfile->current);
|
||||
size_t rightedge = get_softwrap_breakpoint(openfile->current->data,
|
||||
leftedge, &last_chunk);
|
||||
size_t rightedge_x;
|
||||
leftedge, &kickoff, &last_chunk);
|
||||
size_t right_x;
|
||||
|
||||
/* If we're on the last chunk, we're already at the end of the line.
|
||||
* Otherwise, we're one column past the end of the line. Shifting
|
||||
@@ -461,14 +617,14 @@ void do_end(void)
|
||||
if (!last_chunk)
|
||||
rightedge--;
|
||||
|
||||
rightedge_x = actual_x(openfile->current->data, rightedge);
|
||||
right_x = actual_x(openfile->current->data, rightedge);
|
||||
|
||||
/* If already at the right edge of the screen, move fully to
|
||||
* the end of the line. Otherwise, move to the right edge. */
|
||||
if (openfile->current_x == rightedge_x)
|
||||
if (openfile->current_x == right_x)
|
||||
openfile->current_x = line_len;
|
||||
else {
|
||||
openfile->current_x = rightedge_x;
|
||||
openfile->current_x = right_x;
|
||||
openfile->placewewant = rightedge;
|
||||
moved_off_chunk = FALSE;
|
||||
}
|
||||
@@ -501,7 +657,8 @@ void do_up(void)
|
||||
|
||||
set_proper_index_and_pww(&leftedge, target_column, FALSE);
|
||||
|
||||
if (openfile->current_y == 0 && !ISSET(JUMPY_SCROLLING))
|
||||
if (openfile->cursor_row == 0 && !ISSET(JUMPY_SCROLLING) &&
|
||||
(tabsize < editwincols || !ISSET(SOFTWRAP)))
|
||||
edit_scroll(BACKWARD);
|
||||
else
|
||||
edit_redraw(was_current, FLOWING);
|
||||
@@ -524,7 +681,8 @@ void do_down(void)
|
||||
|
||||
set_proper_index_and_pww(&leftedge, target_column, TRUE);
|
||||
|
||||
if (openfile->current_y == editwinrows - 1 && !ISSET(JUMPY_SCROLLING))
|
||||
if (openfile->cursor_row == editwinrows - 1 && !ISSET(JUMPY_SCROLLING) &&
|
||||
(tabsize < editwincols || !ISSET(SOFTWRAP)))
|
||||
edit_scroll(FORWARD);
|
||||
else
|
||||
edit_redraw(was_current, FLOWING);
|
||||
@@ -541,7 +699,7 @@ void do_scroll_up(void)
|
||||
if (openfile->edittop->prev == NULL && openfile->firstcolumn == 0)
|
||||
return;
|
||||
|
||||
if (openfile->current_y == editwinrows - 1)
|
||||
if (openfile->cursor_row == editwinrows - 1)
|
||||
do_up();
|
||||
|
||||
if (editwinrows > 1)
|
||||
@@ -551,29 +709,33 @@ void do_scroll_up(void)
|
||||
/* Scroll down one line or chunk without moving the cursor textwise. */
|
||||
void do_scroll_down(void)
|
||||
{
|
||||
if (openfile->current_y == 0)
|
||||
if (openfile->cursor_row == 0)
|
||||
do_down();
|
||||
|
||||
if (editwinrows > 1 && (openfile->edittop->next != NULL
|
||||
if (editwinrows > 1 && (openfile->edittop->next
|
||||
#ifndef NANO_TINY
|
||||
|| chunk_for(openfile->firstcolumn, openfile->edittop) <
|
||||
number_of_chunks_in(openfile->edittop)
|
||||
|| (ISSET(SOFTWRAP) && (extra_chunks_in(openfile->edittop) >
|
||||
chunk_for(openfile->firstcolumn, openfile->edittop)))
|
||||
#endif
|
||||
))
|
||||
edit_scroll(FORWARD);
|
||||
}
|
||||
#endif
|
||||
#endif /* !NANO_TINY || ENABLE_HELP */
|
||||
|
||||
/* Move left one character. */
|
||||
void do_left(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
if (openfile->current_x > 0)
|
||||
openfile->current_x = step_left(openfile->current->data,
|
||||
openfile->current_x);
|
||||
else if (openfile->current != openfile->filetop) {
|
||||
openfile->current = openfile->current->prev;
|
||||
if (openfile->current_x > 0) {
|
||||
openfile->current_x = step_left(openfile->current->data, openfile->current_x);
|
||||
#ifdef ENABLE_UTF8
|
||||
while (openfile->current_x > 0 &&
|
||||
is_zerowidth(openfile->current->data + openfile->current_x))
|
||||
openfile->current_x = step_left(openfile->current->data, openfile->current_x);
|
||||
#endif
|
||||
} else if (openfile->current != openfile->filetop) {
|
||||
openfile->current = get_prev_visible_line(openfile->current);
|
||||
openfile->current_x = strlen(openfile->current->data);
|
||||
}
|
||||
|
||||
@@ -585,13 +747,82 @@ void do_right(void)
|
||||
{
|
||||
linestruct *was_current = openfile->current;
|
||||
|
||||
if (openfile->current->data[openfile->current_x] != '\0')
|
||||
openfile->current_x = step_right(openfile->current->data,
|
||||
openfile->current_x);
|
||||
else if (openfile->current != openfile->filebot) {
|
||||
openfile->current = openfile->current->next;
|
||||
#ifdef ENABLE_FOLDING
|
||||
if (openfile->current->folded) {
|
||||
openfile->current = get_next_visible_line(openfile->current);
|
||||
if (openfile->current == NULL)
|
||||
openfile->current = was_current;
|
||||
} else
|
||||
#endif
|
||||
if (openfile->current->data[openfile->current_x]) {
|
||||
openfile->current_x = step_right(openfile->current->data, openfile->current_x);
|
||||
#ifdef ENABLE_UTF8
|
||||
while (openfile->current->data[openfile->current_x] &&
|
||||
is_zerowidth(openfile->current->data + openfile->current_x))
|
||||
openfile->current_x = step_right(openfile->current->data, openfile->current_x);
|
||||
#endif
|
||||
} else if (openfile->current != openfile->filebot) {
|
||||
openfile->current = get_next_visible_line(openfile->current);
|
||||
openfile->current_x = 0;
|
||||
}
|
||||
|
||||
edit_redraw(was_current, FLOWING);
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Scroll the viewport horizontally to the left. */
|
||||
void do_scroll_left(void)
|
||||
{
|
||||
size_t frame_x;
|
||||
|
||||
if (ISSET(SOFTWRAP) || ISSET(SOLO_SIDESCROLL)) {
|
||||
/* TRANSLATORS: The %s is the name of an option. */
|
||||
statusline(AHEM, _("Not possible with '%s'"), ISSET(SOFTWRAP) ? "--softwrap" : "--solo");
|
||||
return;
|
||||
}
|
||||
|
||||
openfile->brink -= (openfile->brink < tabsize) ? openfile->brink : (tabsize < 2) ? 2 : tabsize;
|
||||
|
||||
frame_x = actual_x(openfile->current->data, openfile->brink + editwincols - CUSHION - 1);
|
||||
|
||||
if (openfile->current_x > frame_x) {
|
||||
openfile->current_x = frame_x;
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* Scroll the viewport horizontally to the right. */
|
||||
void do_scroll_right(void)
|
||||
{
|
||||
size_t sill = openfile->edittop->lineno + editwinrows;
|
||||
linestruct *line = openfile->current;
|
||||
size_t frame_x;
|
||||
|
||||
if (ISSET(SOFTWRAP) || ISSET(SOLO_SIDESCROLL)) {
|
||||
statusline(AHEM, _("Not possible with '%s'"), ISSET(SOFTWRAP) ? "--softwrap" : "--solo");
|
||||
return;
|
||||
}
|
||||
|
||||
openfile->brink += (tabsize < 2) ? 2 : tabsize;
|
||||
|
||||
/* If the current line does not allow further scrolling, seek
|
||||
* in the viewport an earlier or later line that does allow it. */
|
||||
while (line != openfile->edittop && breadth(line->data) < openfile->brink + CUSHION)
|
||||
line = line->prev;
|
||||
while (line->lineno < sill && breadth(line->data) < openfile->brink + CUSHION && line->next)
|
||||
line = line->next;
|
||||
if (line->lineno < sill && breadth(line->data) >= openfile->brink + CUSHION)
|
||||
openfile->current = line;
|
||||
|
||||
frame_x = actual_x(openfile->current->data, openfile->brink + CUSHION);
|
||||
|
||||
if (openfile->current_x < frame_x) {
|
||||
openfile->current_x = frame_x;
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
2179
src/nano.c
2179
src/nano.c
File diff suppressed because it is too large
Load Diff
1001
src/prompt.c
1001
src/prompt.c
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/**************************************************************************
|
||||
* proto.h -- This file is part of GNU nano. *
|
||||
* prototypes.h -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -14,22 +14,40 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "nano.h"
|
||||
#include "definitions.h"
|
||||
|
||||
/* All external variables. See global.c for their descriptions. */
|
||||
|
||||
#ifndef NANO_TINY
|
||||
extern volatile sig_atomic_t the_window_resized;
|
||||
extern volatile sig_atomic_t resized_for_browser;
|
||||
#endif
|
||||
|
||||
extern bool on_a_vt;
|
||||
extern bool using_utf8;
|
||||
extern bool shifted_metas;
|
||||
|
||||
extern bool meta_key;
|
||||
extern bool shift_held;
|
||||
extern bool mute_modifiers;
|
||||
|
||||
extern bool we_are_running;
|
||||
extern bool more_than_one;
|
||||
extern bool report_size;
|
||||
|
||||
extern bool ran_a_tool;
|
||||
extern char *foretext;
|
||||
|
||||
extern int final_status;
|
||||
|
||||
extern bool inhelp;
|
||||
extern char *title;
|
||||
|
||||
extern bool united_sidescroll;
|
||||
|
||||
extern bool focusing;
|
||||
|
||||
@@ -37,61 +55,56 @@ extern bool as_an_at;
|
||||
|
||||
extern bool control_C_was_pressed;
|
||||
|
||||
extern bool suppress_cursorpos;
|
||||
|
||||
extern bool started_curses;
|
||||
|
||||
extern message_type lastmessage;
|
||||
|
||||
extern linestruct *pletion_line;
|
||||
|
||||
extern bool inhelp;
|
||||
extern char *title;
|
||||
|
||||
extern bool more_than_one;
|
||||
|
||||
extern bool also_the_last;
|
||||
|
||||
extern bool is_shorter;
|
||||
extern char *answer;
|
||||
|
||||
extern char *last_search;
|
||||
extern int didfind;
|
||||
|
||||
extern char *present_path;
|
||||
|
||||
extern unsigned flags[4];
|
||||
|
||||
extern int controlleft, controlright;
|
||||
extern int controlup, controldown;
|
||||
extern int controlhome, controlend;
|
||||
#ifndef NANO_TINY
|
||||
extern int controldelete, controlshiftdelete;
|
||||
extern int shiftleft, shiftright;
|
||||
extern int shiftup, shiftdown;
|
||||
extern int shiftcontrolleft, shiftcontrolright;
|
||||
extern int shiftcontrolup, shiftcontroldown;
|
||||
extern int shiftcontrolhome, shiftcontrolend;
|
||||
extern int altleft, altright;
|
||||
extern int altup, altdown;
|
||||
extern int altdelete;
|
||||
extern int althome, altend;
|
||||
extern int altpageup, altpagedown;
|
||||
extern int altinsert, altdelete;
|
||||
extern int shiftaltleft, shiftaltright;
|
||||
extern int shiftaltup, shiftaltdown;
|
||||
#endif
|
||||
extern int mousefocusin, mousefocusout;
|
||||
|
||||
#ifdef ENABLED_WRAPORJUSTIFY
|
||||
extern ssize_t fill;
|
||||
extern size_t wrap_at;
|
||||
#endif
|
||||
|
||||
extern char *last_search;
|
||||
|
||||
extern char *present_path;
|
||||
|
||||
extern unsigned flags[4];
|
||||
|
||||
extern WINDOW *topwin;
|
||||
extern WINDOW *edit;
|
||||
extern WINDOW *bottomwin;
|
||||
extern WINDOW *midwin;
|
||||
extern WINDOW *footwin;
|
||||
extern int editwinrows;
|
||||
extern int editwincols;
|
||||
extern int margin;
|
||||
extern int sidebar;
|
||||
#ifndef NANO_TINY
|
||||
extern int *bardata;
|
||||
extern ssize_t stripe_column;
|
||||
extern int cycling_aim;
|
||||
#endif
|
||||
|
||||
extern linestruct *cutbuffer;
|
||||
@@ -120,14 +133,10 @@ extern regex_t quotereg;
|
||||
|
||||
extern char *word_chars;
|
||||
|
||||
extern char *answer;
|
||||
|
||||
extern ssize_t tabsize;
|
||||
|
||||
#ifndef NANO_TINY
|
||||
extern char *backup_dir;
|
||||
extern const char *locking_prefix;
|
||||
extern const char *locking_suffix;
|
||||
#endif
|
||||
#ifdef ENABLE_OPERATINGDIR
|
||||
extern char *operating_dir;
|
||||
@@ -141,6 +150,9 @@ extern char *alt_speller;
|
||||
extern syntaxtype *syntaxes;
|
||||
extern char *syntaxstr;
|
||||
extern bool have_palette;
|
||||
extern bool rescind_colors;
|
||||
extern bool perturbed;
|
||||
extern bool recook;
|
||||
#endif
|
||||
|
||||
extern bool refresh_needed;
|
||||
@@ -176,6 +188,12 @@ extern char *statedir;
|
||||
#if defined(ENABLE_NANORC) || defined(ENABLE_HISTORIES)
|
||||
extern char *startup_problem;
|
||||
#endif
|
||||
#ifdef ENABLE_NANORC
|
||||
extern char *custom_nanorc;
|
||||
|
||||
extern char *commandname;
|
||||
extern keystruct *planted_shortcut;
|
||||
#endif
|
||||
|
||||
extern bool spotlighted;
|
||||
extern size_t light_from_col;
|
||||
@@ -183,100 +201,91 @@ extern size_t light_to_col;
|
||||
|
||||
typedef void (*functionptrtype)(void);
|
||||
|
||||
/* Most functions in browser.c. */
|
||||
/* The two needed functions from browser.c. */
|
||||
#ifdef ENABLE_BROWSER
|
||||
char *do_browse_from(const char *inpath);
|
||||
void read_the_list(const char *path, DIR *dir);
|
||||
functionptrtype parse_browser_input(int *kbinput);
|
||||
void browser_refresh(void);
|
||||
void browser_select_dirname(const char *needle);
|
||||
void do_filesearch(bool forwards);
|
||||
void do_fileresearch(bool forwards);
|
||||
char *browse_in(const char *inpath);
|
||||
void to_first_file(void);
|
||||
void to_last_file(void);
|
||||
char *strip_last_component(const char *path);
|
||||
#endif
|
||||
|
||||
/* Most functions in chars.c. */
|
||||
#ifdef ENABLE_UTF8
|
||||
void utf8_init(void);
|
||||
bool using_utf8(void);
|
||||
#endif
|
||||
char *addstrings(char* str1, size_t len1, char* str2, size_t len2);
|
||||
bool is_byte(int c);
|
||||
bool is_alpha_mbchar(const char *c);
|
||||
bool is_blank_mbchar(const char *c);
|
||||
bool is_ascii_cntrl_char(int c);
|
||||
bool is_cntrl_mbchar(const char *c);
|
||||
bool is_word_mbchar(const char *c, bool allow_punct);
|
||||
bool is_alpha_char(const char *c);
|
||||
bool is_blank_char(const char *c);
|
||||
bool is_cntrl_char(const char *c);
|
||||
bool is_word_char(const char *c, bool allow_punct);
|
||||
char control_mbrep(const char *c, bool isdata);
|
||||
#ifdef ENABLE_UTF8
|
||||
int mbwidth(const char *c);
|
||||
int mbtowide(wchar_t *wc, const char *c);
|
||||
bool is_doublewidth(const char *ch);
|
||||
bool is_zerowidth(const char *ch);
|
||||
#endif
|
||||
char *make_mbchar(long chr, int *chr_mb_len);
|
||||
int char_length(const char *pointer);
|
||||
size_t mbstrlen(const char *s);
|
||||
int collect_char(const char *buf, char *chr);
|
||||
size_t mbstrlen(const char *pointer);
|
||||
int collect_char(const char *string, char *thechar);
|
||||
int advance_over(const char *string, size_t *column);
|
||||
size_t step_left(const char *buf, size_t pos);
|
||||
size_t step_right(const char *buf, size_t pos);
|
||||
int mbstrcasecmp(const char *s1, const char *s2);
|
||||
int mbstrncasecmp(const char *s1, const char *s2, size_t n);
|
||||
char *mbstrcasestr(const char *haystack, const char *needle);
|
||||
char *revstrstr(const char *haystack, const char *needle, const char *index);
|
||||
char *mbrevstrcasestr(const char *haystack, const char *needle, const char *index);
|
||||
char *revstrstr(const char *haystack, const char *needle, const char *pointer);
|
||||
char *mbrevstrcasestr(const char *haystack, const char *needle, const char *pointer);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
||||
char *mbstrchr(const char *s, const char *c);
|
||||
const char *mbstrchr(const char *string, const char *chr);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
char *mbstrpbrk(const char *s, const char *accept);
|
||||
char *revstrpbrk(const char *head, const char *accept, const char *index);
|
||||
char *mbrevstrpbrk(const char *head, const char *accept, const char *index);
|
||||
char *mbstrpbrk(const char *string, const char *accept);
|
||||
char *mbrevstrpbrk(const char *head, const char *accept, const char *pointer);
|
||||
#endif
|
||||
#if defined(ENABLE_NANORC) && (!defined(NANO_TINY) || defined(ENABLE_JUSTIFY))
|
||||
bool has_blank_char(const char *s);
|
||||
bool has_blank_char(const char *string);
|
||||
#endif
|
||||
bool white_string(const char *s);
|
||||
#ifdef ENABLE_UTF8
|
||||
bool is_valid_unicode(wchar_t wc);
|
||||
bool white_string(const char *string);
|
||||
#if defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
||||
void strip_leading_blanks_from(char *string);
|
||||
#endif
|
||||
|
||||
/* Most functions in color.c. */
|
||||
#ifdef ENABLE_COLOR
|
||||
void set_colorpairs(void);
|
||||
void color_init(void);
|
||||
void color_update(void);
|
||||
void set_up_multicache(linestruct *line);
|
||||
void set_interface_colorpairs(void);
|
||||
void prepare_palette(void);
|
||||
void find_and_prime_applicable_syntax(void);
|
||||
void check_the_multis(linestruct *line);
|
||||
void precalc_multicolorinfo(void);
|
||||
#endif
|
||||
|
||||
/* Most functions in cut.c. */
|
||||
void expunge(undo_type action);
|
||||
void do_delete(void);
|
||||
void do_backspace(void);
|
||||
#ifndef NANO_TINY
|
||||
void chop_previous_word(void);
|
||||
void chop_next_word(void);
|
||||
void cut_marked(bool *right_side_up);
|
||||
#endif
|
||||
void do_snip(bool copying, bool marked, bool until_eof, bool append);
|
||||
bool is_cuttable(bool test_cliff);
|
||||
void extract_segment(linestruct *top, size_t top_x, linestruct *bot, size_t bot_x);
|
||||
void ingraft_buffer(linestruct *topline);
|
||||
void copy_from_buffer(linestruct *somebuffer);
|
||||
#ifndef NANO_TINY
|
||||
void cut_marked_region(void);
|
||||
#endif
|
||||
void do_snip(bool marked, bool until_eof, bool append);
|
||||
void cut_text(void);
|
||||
#ifndef NANO_TINY
|
||||
void copy_text(void);
|
||||
void cut_till_eof(void);
|
||||
void zap_text(void);
|
||||
void copy_marked_region(void);
|
||||
#endif
|
||||
void copy_text(void);
|
||||
void paste_text(void);
|
||||
|
||||
/* Most functions in files.c. */
|
||||
void make_new_buffer(void);
|
||||
void set_modified(void);
|
||||
bool open_buffer(const char *filename, bool new_buffer);
|
||||
#ifdef ENABLE_SPELLER
|
||||
bool replace_buffer(const char *filename, undo_type action, bool marked,
|
||||
const char *operation);
|
||||
#ifndef NANO_TINY
|
||||
bool delete_lockfile(const char *lockfilename);
|
||||
#endif
|
||||
bool open_buffer(const char *filename, bool new_one);
|
||||
void set_modified(void);
|
||||
void prepare_for_display(void);
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
void mention_name_and_linecount(void);
|
||||
@@ -285,77 +294,69 @@ void switch_to_next_buffer(void);
|
||||
void close_buffer(void);
|
||||
#endif
|
||||
void read_file(FILE *f, int fd, const char *filename, bool undoable);
|
||||
int open_file(const char *filename, bool newfie, FILE **f);
|
||||
int open_file(const char *filename, bool new_one, FILE **f);
|
||||
char *get_next_filename(const char *name, const char *suffix);
|
||||
void do_insertfile_void(void);
|
||||
void do_insertfile(void);
|
||||
#ifndef NANO_TINY
|
||||
void do_execute(void);
|
||||
#endif
|
||||
char *get_full_path(const char *origpath);
|
||||
char *safe_tempfile(FILE **f);
|
||||
char *safe_tempfile(FILE **stream);
|
||||
#ifdef ENABLE_OPERATINGDIR
|
||||
void init_operating_dir(void);
|
||||
bool outside_of_confinement(const char *currpath, bool allow_tabcomp);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
void init_backup_dir(void);
|
||||
int delete_lockfile(const char *lockfilename);
|
||||
int write_lockfile(const char *lockfilename, const char *origfilename, bool modified);
|
||||
#endif
|
||||
int copy_file(FILE *inn, FILE *out, bool close_out);
|
||||
bool write_file(const char *name, FILE *f_open, bool tmp,
|
||||
kind_of_writing_type method, bool fullbuffer);
|
||||
bool write_file(const char *name, FILE *thefile, writing_type method, bool annotate);
|
||||
#ifndef NANO_TINY
|
||||
bool write_marked_file(const char *name, FILE *f_open, bool tmp,
|
||||
kind_of_writing_type method);
|
||||
bool write_region_to_file(const char *name, FILE *stream, writing_type method);
|
||||
#endif
|
||||
int do_writeout(bool exiting, bool withprompt);
|
||||
void do_writeout_void(void);
|
||||
int write_it_out(bool exiting, bool withprompt);
|
||||
void do_writeout(void);
|
||||
void do_savefile(void);
|
||||
char *real_dir_from_tilde(const char *buf);
|
||||
char *expand_leading_tilde(const char *path);
|
||||
#if defined(ENABLE_TABCOMP) || defined(ENABLE_BROWSER)
|
||||
int diralphasort(const void *va, const void *vb);
|
||||
#endif
|
||||
#ifdef ENABLE_TABCOMP
|
||||
char *input_tab(char *buf, bool allow_files, size_t *place,
|
||||
bool *lastwastab, void (*refresh_func)(void), bool *listed);
|
||||
char *input_tab(char *buf, size_t *place, void (*refresh_func)(void), bool *listed);
|
||||
#endif
|
||||
|
||||
/* Some functions in global.c. */
|
||||
const keystruct *first_sc_for(int menu, void (*func)(void));
|
||||
int the_code_for(void (*func)(void), int defaultval);
|
||||
const keystruct *first_sc_for(int menu, void (*function)(void));
|
||||
size_t shown_entries_for(int menu);
|
||||
const keystruct *get_shortcut(int *kbinput);
|
||||
functionptrtype func_from_key(int *kbinput);
|
||||
const keystruct *get_shortcut(const int keycode);
|
||||
functionptrtype func_from_key(const int keycode);
|
||||
#if defined(ENABLE_BROWSER) || defined(ENABLE_HELP)
|
||||
functionptrtype interpret(const int keycode);
|
||||
#endif
|
||||
int keycode_from_string(const char *keystring);
|
||||
void assign_keyinfo(keystruct *s, const char *keystring, const int keycode);
|
||||
void shortcut_init(void);
|
||||
const char *flagtostr(int flag);
|
||||
const char *epithet_of_flag(int flag);
|
||||
|
||||
/* All functions in help.c. */
|
||||
/* Some functions in help.c. */
|
||||
#ifdef ENABLE_HELP
|
||||
void wrap_help_text_into_buffer(void);
|
||||
void help_init(void);
|
||||
functionptrtype parse_help_input(int *kbinput);
|
||||
size_t help_line_len(const char *ptr);
|
||||
#endif
|
||||
void do_help(void);
|
||||
|
||||
/* Most functions in history.c. */
|
||||
#ifdef ENABLE_HISTORIES
|
||||
void history_init(void);
|
||||
void history_reset(const linestruct *h);
|
||||
void update_history(linestruct **h, const char *s);
|
||||
char *get_history_older(linestruct **h);
|
||||
char *get_history_newer(linestruct **h);
|
||||
void get_history_older_void(void);
|
||||
void get_history_newer_void(void);
|
||||
void reset_history_pointer_for(const linestruct *list);
|
||||
void update_history(linestruct **item, const char *text, bool avoid_duplicates);
|
||||
#ifdef ENABLE_TABCOMP
|
||||
char *get_history_completion(linestruct **h, char *s, size_t len);
|
||||
#endif
|
||||
bool have_statedir(void);
|
||||
void load_history(void);
|
||||
void save_history(void);
|
||||
void load_poshistory(void);
|
||||
void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos);
|
||||
bool has_old_position(const char *file, ssize_t *line, ssize_t *column);
|
||||
void load_positions_register(void);
|
||||
void update_positions_register(void);
|
||||
void restore_cursor_position_if_any(void);
|
||||
#endif
|
||||
|
||||
/* Most functions in move.c. */
|
||||
@@ -363,18 +364,24 @@ void to_first_line(void);
|
||||
void to_last_line(void);
|
||||
void do_page_up(void);
|
||||
void do_page_down(void);
|
||||
#ifndef NANO_TINY
|
||||
void to_top_row(void);
|
||||
void to_bottom_row(void);
|
||||
void do_cycle(void);
|
||||
void do_center(void);
|
||||
#endif
|
||||
#ifdef ENABLE_JUSTIFY
|
||||
void do_para_begin(linestruct **line);
|
||||
void do_para_end(linestruct **line);
|
||||
void do_para_begin_void(void);
|
||||
void do_para_end_void(void);
|
||||
void to_para_begin(void);
|
||||
void to_para_end(void);
|
||||
#endif
|
||||
void do_prev_block(void);
|
||||
void do_next_block(void);
|
||||
void do_prev_word(bool allow_punct);
|
||||
bool do_next_word(bool after_ends, bool allow_punct);
|
||||
void do_prev_word_void(void);
|
||||
void do_next_word_void(void);
|
||||
void to_prev_block(void);
|
||||
void to_next_block(void);
|
||||
void do_prev_word(bool allow_folded);
|
||||
bool do_next_word(bool after_ends, bool allow_folded);
|
||||
void to_prev_word(void);
|
||||
void to_next_word(void);
|
||||
void do_home(void);
|
||||
void do_end(void);
|
||||
void do_up(void);
|
||||
@@ -385,48 +392,48 @@ void do_scroll_down(void);
|
||||
#endif
|
||||
void do_left(void);
|
||||
void do_right(void);
|
||||
void move_cursor_to_proper_column(void);
|
||||
#ifndef NANO_TINY
|
||||
void do_scroll_left(void);
|
||||
void do_scroll_right(void);
|
||||
#endif
|
||||
|
||||
/* Most functions in nano.c. */
|
||||
linestruct *make_new_node(linestruct *prevnode);
|
||||
void splice_node(linestruct *afterthis, linestruct *newnode);
|
||||
void unlink_node(linestruct *fileptr);
|
||||
void delete_node(linestruct *fileptr);
|
||||
void unlink_node(linestruct *line);
|
||||
void delete_node(linestruct *line);
|
||||
linestruct *copy_buffer(const linestruct *src);
|
||||
void free_lines(linestruct *src);
|
||||
void renumber_from(linestruct *line);
|
||||
void partition_buffer(linestruct *top, size_t top_x,
|
||||
linestruct *bot, size_t bot_x);
|
||||
void unpartition_buffer(void);
|
||||
void extract(linestruct *top, size_t top_x, linestruct *bot, size_t bot_x);
|
||||
void ingraft_buffer(linestruct *somebuffer);
|
||||
void copy_from_buffer(linestruct *somebuffer);
|
||||
void print_view_warning(void);
|
||||
bool in_restricted_mode(void);
|
||||
#ifndef ENABLE_HELP
|
||||
void say_there_is_no_help(void);
|
||||
#ifndef NANO_TINY
|
||||
void suggest_ctrlT_ctrlZ(void);
|
||||
#endif
|
||||
void finish(void);
|
||||
void die(const char *msg, ...);
|
||||
void emergency_save(const char *die_filename, struct stat *die_stat);
|
||||
void window_init(void);
|
||||
void do_exit(void);
|
||||
void close_and_go(void);
|
||||
void do_exit(void);
|
||||
void die(const char *msg, ...);
|
||||
void window_init(void);
|
||||
void install_handler_for_Ctrl_C(void);
|
||||
void restore_handler_for_Ctrl_C(void);
|
||||
#ifndef NANO_TINY
|
||||
void reconnect_and_store_state(void);
|
||||
RETSIGTYPE handle_hupterm(int signal);
|
||||
#ifndef DEBUG
|
||||
RETSIGTYPE handle_crash(int signal);
|
||||
#endif
|
||||
RETSIGTYPE do_suspend(int signal);
|
||||
RETSIGTYPE do_continue(int signal);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER)
|
||||
void handle_hupterm(int signal);
|
||||
#ifndef DEBUG
|
||||
void handle_crash(int signal);
|
||||
#endif
|
||||
void suspend_nano(int signal);
|
||||
void do_suspend(void);
|
||||
void continue_nano(int signal);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
||||
void block_sigwinch(bool blockit);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
RETSIGTYPE handle_sigwinch(int signal);
|
||||
void handle_sigwinch(int signal);
|
||||
void regenerate_screen(void);
|
||||
void do_toggle(int flag);
|
||||
#endif
|
||||
void disable_kb_interrupt(void);
|
||||
void enable_kb_interrupt(void);
|
||||
@@ -437,31 +444,17 @@ void terminal_init(void);
|
||||
void confirm_margin(void);
|
||||
#endif
|
||||
void unbound_key(int code);
|
||||
bool okay_for_view(const keystruct *shortcut);
|
||||
void do_output(char *output, size_t output_len, bool allow_cntrls);
|
||||
bool changes_something(functionptrtype f);
|
||||
void suck_up_input_and_paste_it(void);
|
||||
void inject(char *burst, size_t count);
|
||||
|
||||
/* Most functions in prompt.c. */
|
||||
void do_statusbar_output(int *the_input, size_t input_len, bool filtering);
|
||||
void do_statusbar_home(void);
|
||||
void do_statusbar_end(void);
|
||||
void do_statusbar_left(void);
|
||||
void do_statusbar_right(void);
|
||||
void do_statusbar_backspace(void);
|
||||
void do_statusbar_delete(void);
|
||||
void do_statusbar_cut_text(void);
|
||||
void do_statusbar_uncut_text(void);
|
||||
#ifndef NANO_TINY
|
||||
void do_statusbar_prev_word(void);
|
||||
void do_statusbar_next_word(void);
|
||||
#endif
|
||||
void do_statusbar_verbatim_input(void);
|
||||
size_t get_statusbar_page_start(size_t start_col, size_t column);
|
||||
size_t get_statusbar_page_start(size_t base, size_t column);
|
||||
void put_cursor_at_end_of_answer(void);
|
||||
void add_or_remove_pipe_symbol_from_answer(void);
|
||||
int do_prompt(bool allow_tabs, bool allow_files,
|
||||
int menu, const char *curranswer, linestruct **history_list,
|
||||
int do_prompt(int menu, const char *provided, linestruct **history_list,
|
||||
void (*refresh_func)(void), const char *msg, ...);
|
||||
int do_yesno_prompt(bool all, const char *msg);
|
||||
int ask_user(bool withall, const char *question);
|
||||
|
||||
/* Most functions in rcfile.c. */
|
||||
#if defined(ENABLE_NANORC) || defined(ENABLE_HISTORIES)
|
||||
@@ -469,6 +462,7 @@ void display_rcfile_errors(void);
|
||||
void jot_error(const char *msg, ...);
|
||||
#endif
|
||||
#ifdef ENABLE_NANORC
|
||||
keystruct *strtosc(const char *input);
|
||||
#ifdef ENABLE_COLOR
|
||||
void parse_one_include(char *file, syntaxtype *syntax);
|
||||
void grab_and_store(const char *kind, char *ptr, regexlisttype **storage);
|
||||
@@ -483,7 +477,6 @@ bool regexp_init(const char *regexp);
|
||||
void tidy_up_after_search(void);
|
||||
int findnextstr(const char *needle, bool whole_word_only, int modus,
|
||||
size_t *match_len, bool skipone, const linestruct *begin, size_t begin_x);
|
||||
void do_search(void);
|
||||
void do_search_forward(void);
|
||||
void do_search_backward(void);
|
||||
void do_findprevious(void);
|
||||
@@ -493,13 +486,23 @@ void go_looking(void);
|
||||
ssize_t do_replace_loop(const char *needle, bool whole_word_only,
|
||||
const linestruct *real_current, size_t *real_current_x);
|
||||
void do_replace(void);
|
||||
void ask_for_replacement(void);
|
||||
void ask_for_and_do_replacements(void);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER)
|
||||
void goto_line_posx(ssize_t line, size_t pos_x);
|
||||
void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
|
||||
bool interactive);
|
||||
void do_gotolinecolumn_void(void);
|
||||
#endif
|
||||
void do_gotolinecolumn(void);
|
||||
void ask_for_line_and_column(char *provided);
|
||||
void goto_line_and_column(ssize_t line, ssize_t column, bool hugfloor);
|
||||
#ifndef NANO_TINY
|
||||
size_t get_matchbrackets_halfway(void);
|
||||
int find_matching_bracket_pos(linestruct **line, size_t *xpos);
|
||||
bool find_terminus_of_bracketed_region(linestruct **line, size_t *xpos, size_t bracket_half, bool reverse);
|
||||
bool find_bracketed_region(linestruct *in_region,
|
||||
linestruct **top, linestruct **bot);
|
||||
void do_find_bracket(void);
|
||||
void put_or_lift_anchor(void);
|
||||
void to_prev_anchor(void);
|
||||
void to_next_anchor(void);
|
||||
#endif
|
||||
|
||||
/* Most functions in text.c. */
|
||||
@@ -518,54 +521,53 @@ void do_undo(void);
|
||||
void do_redo(void);
|
||||
void do_enter(void);
|
||||
#ifndef NANO_TINY
|
||||
RETSIGTYPE cancel_command(int signal);
|
||||
bool execute_command(const char *command);
|
||||
void discard_until(const undostruct *thisitem, openfilestruct *thefile, bool keep);
|
||||
void discard_until(const undostruct *thisitem);
|
||||
void add_undo(undo_type action, const char *message);
|
||||
void update_multiline_undo(ssize_t lineno, char *indentation);
|
||||
void update_undo(undo_type action);
|
||||
#endif /* !NANO_TINY */
|
||||
#ifdef ENABLE_WRAPPING
|
||||
bool do_wrap(void);
|
||||
void do_wrap(void);
|
||||
#endif
|
||||
#if defined(ENABLE_HELP) || defined(ENABLED_WRAPORJUSTIFY)
|
||||
ssize_t break_line(const char *line, ssize_t goal, bool snap_at_nl);
|
||||
ssize_t break_line(const char *textstart, ssize_t goal, bool snap_at_nl);
|
||||
#endif
|
||||
#if !defined(NANO_TINY) || defined(ENABLED_WRAPORJUSTIFY)
|
||||
size_t indent_length(const char *line);
|
||||
#endif
|
||||
#ifdef ENABLE_JUSTIFY
|
||||
size_t quote_length(const char *line);
|
||||
bool begpar(const linestruct *const foo, int depth);
|
||||
bool inpar(const linestruct *const foo);
|
||||
void do_justify(bool full_justify);
|
||||
void do_justify_void(void);
|
||||
bool begpar(const linestruct *const line, int depth);
|
||||
bool inpar(const linestruct *const line);
|
||||
void do_justify(void);
|
||||
void do_full_justify(void);
|
||||
#endif
|
||||
#ifdef ENABLE_SPELLER
|
||||
void do_spell(void);
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
#ifdef ENABLE_LINTER
|
||||
void do_linter(void);
|
||||
#endif
|
||||
#ifdef ENABLE_FORMATTER
|
||||
void do_formatter(void);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
void do_wordlinechar_count(void);
|
||||
void count_lines_words_and_characters(void);
|
||||
#endif
|
||||
void do_verbatim_input(void);
|
||||
#ifdef ENABLE_WORDCOMPLETION
|
||||
void complete_a_word(void);
|
||||
#endif
|
||||
|
||||
/* All functions in utils.c. */
|
||||
void get_homedir(void);
|
||||
const char *tail(const char *path);
|
||||
char *concatenate(const char *path, const char *name);
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
int digits(ssize_t n);
|
||||
#endif
|
||||
bool parse_num(const char *str, ssize_t *val);
|
||||
bool parse_num(const char *str, ssize_t *result);
|
||||
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column);
|
||||
void unsunder(char *string, size_t length);
|
||||
void sunder(char *string);
|
||||
void recode_NUL_to_LF(char *string, size_t length);
|
||||
size_t recode_LF_to_NUL(char *string);
|
||||
#if !defined(ENABLE_TINY) || defined(ENABLE_TABCOMP) || defined(ENABLE_BROWSER)
|
||||
void free_chararray(char **array, size_t len);
|
||||
#endif
|
||||
@@ -576,66 +578,67 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *start);
|
||||
void *nmalloc(size_t howmuch);
|
||||
void *nrealloc(void *ptr, size_t howmuch);
|
||||
char *measured_copy(const char *src, size_t n);
|
||||
char *mallocstrcpy(char *dest, const char *src);
|
||||
char *measured_copy(const char *string, size_t count);
|
||||
char *copy_of(const char *string);
|
||||
char *free_and_assign(char *dest, char *src);
|
||||
size_t get_page_start(size_t column);
|
||||
size_t xplustabs(void);
|
||||
size_t actual_x(const char *text, size_t column);
|
||||
size_t wideness(const char *text, size_t maxlen);
|
||||
size_t wideness(const char *text, size_t count);
|
||||
size_t breadth(const char *text);
|
||||
size_t xplustabs(void);
|
||||
void new_magicline(void);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_HELP)
|
||||
void remove_magicline(void);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
void get_region(const linestruct **top, size_t *top_x,
|
||||
const linestruct **bot, size_t *bot_x, bool *right_side_up);
|
||||
void get_range(const linestruct **top, const linestruct **bot);
|
||||
bool mark_is_before_cursor(void);
|
||||
void get_region(linestruct **top, size_t *top_x, linestruct **bot, size_t *bot_x);
|
||||
void get_range(linestruct **top, linestruct **bot);
|
||||
#endif
|
||||
size_t get_totsize(const linestruct *begin, const linestruct *end);
|
||||
#ifndef NANO_TINY
|
||||
linestruct *line_from_number(ssize_t lineno);
|
||||
size_t number_of_characters_in(const linestruct *begin, const linestruct *end);
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER)
|
||||
linestruct *line_from_number(ssize_t number);
|
||||
#endif
|
||||
|
||||
/* Most functions in winio.c. */
|
||||
linestruct *get_next_visible_line(linestruct *line);
|
||||
linestruct *get_prev_visible_line(linestruct *line);
|
||||
#ifndef NANO_TINY
|
||||
void record_macro(void);
|
||||
void run_macro(void);
|
||||
size_t get_key_buffer_len(void);
|
||||
#endif
|
||||
size_t waiting_keycodes(void);
|
||||
void put_back(int keycode);
|
||||
void unget_kbinput(int kbinput, bool metakey);
|
||||
#ifdef ENABLE_NANORC
|
||||
void implant(const char *string);
|
||||
#endif
|
||||
int get_input(WINDOW *win);
|
||||
int get_kbinput(WINDOW *win, bool showcursor);
|
||||
int parse_kbinput(WINDOW *win);
|
||||
int arrow_from_abcd(int kbinput);
|
||||
int parse_escape_sequence(WINDOW *win, int kbinput);
|
||||
int get_byte_kbinput(int kbinput);
|
||||
int get_control_kbinput(int kbinput);
|
||||
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
||||
int *parse_verbatim_kbinput(WINDOW *win, size_t *count);
|
||||
char *get_verbatim_kbinput(WINDOW *win, size_t *count);
|
||||
#ifdef ENABLE_MOUSE
|
||||
int get_mouseinput(int *mouse_row, int *mouse_col, bool allow_shortcuts);
|
||||
int get_mouseinput(int *mouse_y, int *mouse_x);
|
||||
#endif
|
||||
void blank_edit(void);
|
||||
void blank_statusbar(void);
|
||||
void wipe_statusbar(void);
|
||||
void blank_bottombars(void);
|
||||
void check_statusblank(void);
|
||||
void blank_it_when_expired(void);
|
||||
void set_blankdelay_to_one(void);
|
||||
char *display_string(const char *buf, size_t column, size_t span,
|
||||
bool isdata, bool isprompt);
|
||||
void titlebar(const char *path);
|
||||
void minibar(void);
|
||||
void statusline(message_type importance, const char *msg, ...);
|
||||
void statusbar(const char *msg);
|
||||
void warn_and_shortly_pause(const char *msg);
|
||||
void warn_and_briefly_pause(const char *msg);
|
||||
void bottombars(int menu);
|
||||
void post_one_key(const char *keystroke, const char *tag, int width);
|
||||
void place_the_cursor(void);
|
||||
int update_line(linestruct *fileptr, size_t index);
|
||||
int update_line_at(linestruct *line, size_t index, int row);
|
||||
int update_line(linestruct *line, size_t index);
|
||||
#ifndef NANO_TINY
|
||||
int update_softwrapped_line(linestruct *fileptr);
|
||||
int update_softwrapped_line(linestruct *line);
|
||||
#endif
|
||||
bool line_needs_update(const size_t old_column, const size_t new_column);
|
||||
int go_back_chunks(int nrows, linestruct **line, size_t *leftedge);
|
||||
@@ -643,29 +646,25 @@ int go_forward_chunks(int nrows, linestruct **line, size_t *leftedge);
|
||||
bool less_than_a_screenful(size_t was_lineno, size_t was_leftedge);
|
||||
void edit_scroll(bool direction);
|
||||
#ifndef NANO_TINY
|
||||
size_t get_softwrap_breakpoint(const char *text, size_t leftedge,
|
||||
bool *end_of_line);
|
||||
size_t get_softwrap_breakpoint(const char *linedata, size_t leftedge,
|
||||
bool *kickoff, bool *end_of_line);
|
||||
size_t get_chunk_and_edge(size_t column, linestruct *line, size_t *leftedge);
|
||||
size_t chunk_for(size_t column, linestruct *line);
|
||||
size_t leftedge_for(size_t column, linestruct *line);
|
||||
size_t number_of_chunks_in(linestruct *line);
|
||||
size_t extra_chunks_in(linestruct *line);
|
||||
void ensure_firstcolumn_is_aligned(void);
|
||||
#endif
|
||||
size_t actual_last_column(size_t leftedge, size_t column);
|
||||
void edit_redraw(linestruct *old_current, update_type manner);
|
||||
void edit_refresh(void);
|
||||
void adjust_viewport(update_type location);
|
||||
void total_redraw(void);
|
||||
void total_refresh(void);
|
||||
void do_cursorpos(bool force);
|
||||
void do_cursorpos_void(void);
|
||||
void adjust_viewport(update_type manner);
|
||||
void full_refresh(void);
|
||||
void draw_all_subwindows(void);
|
||||
void report_cursor_position(void);
|
||||
void spotlight(size_t from_col, size_t to_col);
|
||||
#ifndef NANO_TINY
|
||||
void spotlight_softwrapped(size_t from_col, size_t to_col);
|
||||
#endif
|
||||
void do_suspend_void(void);
|
||||
void disable_waiting(void);
|
||||
void enable_waiting(void);
|
||||
#ifdef ENABLE_EXTRA
|
||||
void do_credits(void);
|
||||
#endif
|
||||
@@ -674,19 +673,23 @@ void do_credits(void);
|
||||
void case_sens_void(void);
|
||||
void regexp_void(void);
|
||||
void backwards_void(void);
|
||||
#ifdef ENABLE_HISTORIES
|
||||
void get_older_item(void);
|
||||
void get_newer_item(void);
|
||||
#endif
|
||||
void flip_replace(void);
|
||||
void flip_goto(void);
|
||||
#ifdef ENABLE_BROWSER
|
||||
void to_files_void(void);
|
||||
void goto_dir_void(void);
|
||||
void to_files(void);
|
||||
void goto_dir(void);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
void do_toggle_void(void);
|
||||
void dos_format_void(void);
|
||||
void mac_format_void(void);
|
||||
void append_void(void);
|
||||
void prepend_void(void);
|
||||
void backup_file_void(void);
|
||||
void do_nothing(void);
|
||||
void do_toggle(void);
|
||||
void dos_format(void);
|
||||
void append_it(void);
|
||||
void prepend_it(void);
|
||||
void back_it_up(void);
|
||||
void flip_execute(void);
|
||||
void flip_pipe(void);
|
||||
void flip_convert(void);
|
||||
@@ -696,3 +699,12 @@ void flip_newbuffer(void);
|
||||
#endif
|
||||
void discard_buffer(void);
|
||||
void do_cancel(void);
|
||||
|
||||
/* Most functions in folding.c. */
|
||||
#ifdef ENABLE_FOLDING
|
||||
void do_fold_segment(void);
|
||||
void unfold_folded_segment(linestruct *line);
|
||||
linestruct *get_start_of_folded_segment(linestruct* line);
|
||||
linestruct *get_end_of_folded_segment(linestruct* line);
|
||||
int get_folded_segment_length(linestruct *line);
|
||||
#endif
|
||||
974
src/rcfile.c
974
src/rcfile.c
File diff suppressed because it is too large
Load Diff
929
src/search.c
929
src/search.c
File diff suppressed because it is too large
Load Diff
2549
src/text.c
2549
src/text.c
File diff suppressed because it is too large
Load Diff
258
src/utils.c
258
src/utils.c
@@ -1,8 +1,8 @@
|
||||
/**************************************************************************
|
||||
* utils.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999-2011, 2013-2019 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016-2017 Benno Schulenberg *
|
||||
* Copyright (C) 1999-2011, 2013-2026 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2016, 2017, 2019, 2020, 2026 Benno Schulenberg *
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
@@ -15,11 +15,11 @@
|
||||
* See the GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/. *
|
||||
* along with this program. If not, see https://gnu.org/licenses/. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "proto.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_PWD_H
|
||||
@@ -28,27 +28,25 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Return the user's home directory. We use $HOME, and if that fails,
|
||||
* we fall back on the home directory of the effective user ID. */
|
||||
/* Set global variable `homedir` to the user's home directory. First try
|
||||
* $HOME, otherwise consult the password database for the current UID. */
|
||||
void get_homedir(void)
|
||||
{
|
||||
if (homedir == NULL) {
|
||||
const char *homenv = getenv("HOME");
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
/* When HOME isn't set, or when we're root, get the home directory
|
||||
* from the password file instead. */
|
||||
if (homenv == NULL || geteuid() == 0) {
|
||||
/* When $HOME is unset, or when we're root, try the database. */
|
||||
if (homenv == NULL || geteuid() == ROOT_UID) {
|
||||
const struct passwd *userage = getpwuid(geteuid());
|
||||
|
||||
if (userage != NULL)
|
||||
if (userage)
|
||||
homenv = userage->pw_dir;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Only set homedir if some home directory could be determined,
|
||||
* otherwise keep homedir NULL. */
|
||||
if (homenv != NULL && *homenv != '\0')
|
||||
/* Only set `homedir` if a home directory could be determined. */
|
||||
if (homenv && *homenv)
|
||||
homedir = copy_of(homenv);
|
||||
}
|
||||
}
|
||||
@@ -61,14 +59,14 @@ const char *tail(const char *path)
|
||||
if (slash == NULL)
|
||||
return path;
|
||||
else
|
||||
return ++slash;
|
||||
return slash + 1;
|
||||
}
|
||||
|
||||
/* Return a copy of the two given strings, welded together. */
|
||||
char *concatenate(const char *path, const char *name)
|
||||
{
|
||||
size_t pathlen = strlen(path);
|
||||
char *joined = charalloc(pathlen + strlen(name) + 1);
|
||||
char *joined = nmalloc(pathlen + strlen(name) + 1);
|
||||
|
||||
strcpy(joined, path);
|
||||
strcpy(joined + pathlen, name);
|
||||
@@ -76,7 +74,6 @@ char *concatenate(const char *path, const char *name)
|
||||
return joined;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_LINENUMBERS
|
||||
/* Return the number of digits that the given integer n takes up. */
|
||||
int digits(ssize_t n)
|
||||
{
|
||||
@@ -106,21 +103,20 @@ int digits(ssize_t n)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Read an integer from str. If it parses okay, store it in *result
|
||||
* and return TRUE; otherwise, return FALSE. */
|
||||
bool parse_num(const char *str, ssize_t *result)
|
||||
/* Read an integer from the given string. If it parses okay,
|
||||
* store it in *result and return TRUE; otherwise, return FALSE. */
|
||||
bool parse_num(const char *string, ssize_t *result)
|
||||
{
|
||||
char *first_error;
|
||||
ssize_t value;
|
||||
char *excess;
|
||||
|
||||
/* The manual page for strtol() says this is required. */
|
||||
/* Clear the error number so that we can check it afterward. */
|
||||
errno = 0;
|
||||
|
||||
value = (ssize_t)strtol(str, &first_error, 10);
|
||||
value = (ssize_t)strtol(string, &excess, 10);
|
||||
|
||||
if (errno == ERANGE || *str == '\0' || *first_error != '\0')
|
||||
if (errno == ERANGE || *string == '\0' || *excess)
|
||||
return FALSE;
|
||||
|
||||
*result = value;
|
||||
@@ -128,29 +124,30 @@ bool parse_num(const char *str, ssize_t *result)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Read two numbers, separated by a comma, from str, and store them in
|
||||
* *line and *column. Return FALSE on error, and TRUE otherwise. */
|
||||
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
||||
/* Read one number (or two numbers separated by comma, period, or colon)
|
||||
* from the given string and store the number(s) in *line (and *column).
|
||||
* Return FALSE on a failed parsing, and TRUE otherwise. */
|
||||
bool parse_line_column(const char *string, ssize_t *line, ssize_t *column)
|
||||
{
|
||||
bool retval;
|
||||
char *firstpart;
|
||||
const char *comma;
|
||||
char *firstpart;
|
||||
bool retval;
|
||||
|
||||
while (*str == ' ')
|
||||
str++;
|
||||
while (*string == ' ')
|
||||
string++;
|
||||
|
||||
comma = strpbrk(str, "m,. /;");
|
||||
comma = strpbrk(string, ",.:");
|
||||
|
||||
if (comma == NULL)
|
||||
return parse_num(str, line);
|
||||
return parse_num(string, line);
|
||||
|
||||
retval = parse_num(comma + 1, column);
|
||||
|
||||
if (comma == str)
|
||||
if (comma == string)
|
||||
return retval;
|
||||
|
||||
firstpart = copy_of(str);
|
||||
firstpart[comma - str] = '\0';
|
||||
firstpart = copy_of(string);
|
||||
firstpart[comma - string] = '\0';
|
||||
|
||||
retval = parse_num(firstpart, line) && retval;
|
||||
|
||||
@@ -160,7 +157,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
||||
}
|
||||
|
||||
/* In the given string, recode each embedded NUL as a newline. */
|
||||
void unsunder(char *string, size_t length)
|
||||
void recode_NUL_to_LF(char *string, size_t length)
|
||||
{
|
||||
while (length > 0) {
|
||||
if (*string == '\0')
|
||||
@@ -170,14 +167,19 @@ void unsunder(char *string, size_t length)
|
||||
}
|
||||
}
|
||||
|
||||
/* In the given string, recode each embedded newline as a NUL. */
|
||||
void sunder(char *string)
|
||||
/* In the given string, recode each embedded newline as a NUL,
|
||||
* and return the number of bytes in the string. */
|
||||
size_t recode_LF_to_NUL(char *string)
|
||||
{
|
||||
while (*string != '\0') {
|
||||
char *beginning = string;
|
||||
|
||||
while (*string) {
|
||||
if (*string == '\n')
|
||||
*string = '\0';
|
||||
string++;
|
||||
}
|
||||
|
||||
return (string - beginning);
|
||||
}
|
||||
|
||||
#if !defined(ENABLE_TINY) || defined(ENABLE_TABCOMP) || defined(ENABLE_BROWSER)
|
||||
@@ -195,22 +197,15 @@ void free_chararray(char **array, size_t len)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SPELLER
|
||||
/* Is the word starting at the given position in buf and of the given length
|
||||
* a separate word? That is: is it not part of a longer word?*/
|
||||
bool is_separate_word(size_t position, size_t length, const char *buf)
|
||||
/* Is the word starting at the given position in `text` and of the given
|
||||
* length a separate word? That is: is it not part of a longer word? */
|
||||
bool is_separate_word(size_t position, size_t length, const char *text)
|
||||
{
|
||||
char before[MAXCHARLEN], after[MAXCHARLEN];
|
||||
size_t word_end = position + length;
|
||||
const char *before = text + step_left(text, position);
|
||||
const char *after = text + position + length;
|
||||
|
||||
/* Get the characters before and after the word, if any. */
|
||||
collect_char(buf + step_left(buf, position), before);
|
||||
collect_char(buf + word_end, after);
|
||||
|
||||
/* If the word starts at the beginning of the line OR the character before
|
||||
* the word isn't a letter, and if the word ends at the end of the line OR
|
||||
* the character after the word isn't a letter, we have a whole word. */
|
||||
return ((position == 0 || !is_alpha_mbchar(before)) &&
|
||||
(buf[word_end] == '\0' || !is_alpha_mbchar(after)));
|
||||
return ((position == 0 || !is_alpha_char(before)) &&
|
||||
(*after == '\0' || !is_alpha_char(after)));
|
||||
}
|
||||
#endif /* ENABLE_SPELLER */
|
||||
|
||||
@@ -219,8 +214,7 @@ bool is_separate_word(size_t position, size_t length, const char *buf)
|
||||
* than the given start; otherwise, we find the first match starting no earlier
|
||||
* than start. If we are doing a regexp search, and we find a match, we fill
|
||||
* in the global variable regmatches with at most 9 subexpression matches. */
|
||||
const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *start)
|
||||
const char *strstrwrapper(const char *haystack, const char *needle, const char *start)
|
||||
{
|
||||
if (ISSET(USE_REGEXP)) {
|
||||
if (ISSET(BACKWARDS_SEARCH)) {
|
||||
@@ -250,16 +244,14 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
next_rung = step_right(haystack, last_find);
|
||||
regmatches[0].rm_so = next_rung;
|
||||
regmatches[0].rm_eo = far_end;
|
||||
if (regexec(&search_regexp, haystack, 1, regmatches,
|
||||
REG_STARTEND) != 0)
|
||||
if (regexec(&search_regexp, haystack, 1, regmatches, REG_STARTEND) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Find the last match again, to get possible submatches. */
|
||||
regmatches[0].rm_so = floor;
|
||||
regmatches[0].rm_eo = far_end;
|
||||
if (regexec(&search_regexp, haystack, 10, regmatches,
|
||||
REG_STARTEND) != 0)
|
||||
if (regexec(&search_regexp, haystack, 10, regmatches, REG_STARTEND) != 0)
|
||||
return NULL;
|
||||
|
||||
return haystack + regmatches[0].rm_so;
|
||||
@@ -268,8 +260,7 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
/* Do a forward regex search from the starting point. */
|
||||
regmatches[0].rm_so = start - haystack;
|
||||
regmatches[0].rm_eo = strlen(haystack);
|
||||
if (regexec(&search_regexp, haystack, 10, regmatches,
|
||||
REG_STARTEND) != 0)
|
||||
if (regexec(&search_regexp, haystack, 10, regmatches, REG_STARTEND) != 0)
|
||||
return NULL;
|
||||
else
|
||||
return haystack + regmatches[0].rm_so;
|
||||
@@ -288,28 +279,26 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
return mbstrcasestr(start, needle);
|
||||
}
|
||||
|
||||
/* This is a wrapper for the malloc() function that properly handles
|
||||
* things when we run out of memory. */
|
||||
/* Allocate the given amount of memory and return a pointer to it. */
|
||||
void *nmalloc(size_t howmuch)
|
||||
{
|
||||
void *r = malloc(howmuch);
|
||||
void *section = malloc(howmuch);
|
||||
|
||||
if (r == NULL && howmuch != 0)
|
||||
if (section == NULL)
|
||||
die(_("Nano is out of memory!\n"));
|
||||
|
||||
return r;
|
||||
return section;
|
||||
}
|
||||
|
||||
/* This is a wrapper for the realloc() function that properly handles
|
||||
* things when we run out of memory. */
|
||||
void *nrealloc(void *ptr, size_t howmuch)
|
||||
/* Reallocate the given section of memory to have the given size. */
|
||||
void *nrealloc(void *section, size_t howmuch)
|
||||
{
|
||||
void *r = realloc(ptr, howmuch);
|
||||
section = realloc(section, howmuch);
|
||||
|
||||
if (r == NULL && howmuch != 0)
|
||||
if (section == NULL)
|
||||
die(_("Nano is out of memory!\n"));
|
||||
|
||||
return r;
|
||||
return section;
|
||||
}
|
||||
|
||||
/* Return an appropriately reallocated dest string holding a copy of src.
|
||||
@@ -318,18 +307,20 @@ char *mallocstrcpy(char *dest, const char *src)
|
||||
{
|
||||
size_t count = strlen(src) + 1;
|
||||
|
||||
dest = charealloc(dest, count);
|
||||
dest = nrealloc(dest, count);
|
||||
strncpy(dest, src, count);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
/* Return an allocated copy of the first count characters of the given string. */
|
||||
/* Return an allocated copy of the first count characters
|
||||
* of the given string, and NUL-terminate the copy. */
|
||||
char *measured_copy(const char *string, size_t count)
|
||||
{
|
||||
char *thecopy = charalloc(count);
|
||||
char *thecopy = nmalloc(count + 1);
|
||||
|
||||
strncpy(thecopy, string, count);
|
||||
memcpy(thecopy, string, count);
|
||||
thecopy[count] = '\0';
|
||||
|
||||
return thecopy;
|
||||
}
|
||||
@@ -337,7 +328,7 @@ char *measured_copy(const char *string, size_t count)
|
||||
/* Return an allocated copy of the given string. */
|
||||
char *copy_of(const char *string)
|
||||
{
|
||||
return measured_copy(string, strlen(string) + 1);
|
||||
return measured_copy(string, strlen(string));
|
||||
}
|
||||
|
||||
/* Free the string at dest and return the string at src. */
|
||||
@@ -347,14 +338,28 @@ char *free_and_assign(char *dest, char *src)
|
||||
return src;
|
||||
}
|
||||
|
||||
/* When not in softwrap mode, nano scrolls horizontally within a line in
|
||||
* chunks (a bit smaller than the chunks used in softwrapping). Return the
|
||||
* column number of the first character displayed in the edit window when the
|
||||
* cursor is at the given column. Note that (0 <= column -
|
||||
* get_page_start(column) < COLS). */
|
||||
/* When not softwrapping, nano scrolls the current line horizontally by
|
||||
* chunks ("pages"). Return the column number of the first character
|
||||
* displayed in the edit window when the cursor is at the given column. */
|
||||
size_t get_page_start(size_t column)
|
||||
{
|
||||
if (column + 2 < editwincols || ISSET(SOFTWRAP) || column == 0)
|
||||
#ifndef NANO_TINY
|
||||
if (united_sidescroll) {
|
||||
if (column < CUSHION)
|
||||
return 0;
|
||||
else if (column < openfile->brink + CUSHION) {
|
||||
if (ISSET(JUMPY_SCROLLING))
|
||||
return (column > editwincols / 2) ? column - editwincols / 2 : 0;
|
||||
else
|
||||
return column - CUSHION;
|
||||
} else if (column > openfile->brink + editwincols - CUSHION - 1)
|
||||
return column - editwincols + (ISSET(JUMPY_SCROLLING) ? editwincols / 2 : CUSHION) + 1;
|
||||
else
|
||||
return openfile->brink;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (column == 0 || column + 2 < editwincols || ISSET(SOFTWRAP))
|
||||
return 0;
|
||||
else if (editwincols > 8)
|
||||
return column - 6 - (column - 6) % (editwincols - 8);
|
||||
@@ -362,15 +367,8 @@ size_t get_page_start(size_t column)
|
||||
return column - (editwincols - 2);
|
||||
}
|
||||
|
||||
/* Return the placewewant associated with current_x, i.e. the zero-based
|
||||
* column position of the cursor. */
|
||||
size_t xplustabs(void)
|
||||
{
|
||||
return wideness(openfile->current->data, openfile->current_x);
|
||||
}
|
||||
|
||||
/* Return the index in text of the character that (when displayed) will
|
||||
* not overshoot the given column. */
|
||||
/* Return the index in the given text of the character that (when displayed)
|
||||
* will not overshoot the given column. */
|
||||
size_t actual_x(const char *text, size_t column)
|
||||
{
|
||||
const char *start = text;
|
||||
@@ -378,7 +376,7 @@ size_t actual_x(const char *text, size_t column)
|
||||
size_t width = 0;
|
||||
/* The current accumulated span, in columns. */
|
||||
|
||||
while (*text != '\0') {
|
||||
while (*text) {
|
||||
int charlen = advance_over(text, &width);
|
||||
|
||||
if (width > column)
|
||||
@@ -390,22 +388,21 @@ size_t actual_x(const char *text, size_t column)
|
||||
return (text - start);
|
||||
}
|
||||
|
||||
/* A strnlen() with tabs and multicolumn characters factored in:
|
||||
* how many columns wide are the first maxlen bytes of text? */
|
||||
size_t wideness(const char *text, size_t maxlen)
|
||||
/* Return the number of columns that the first count bytes of text occupy. */
|
||||
size_t wideness(const char *text, size_t count)
|
||||
{
|
||||
size_t width = 0;
|
||||
|
||||
if (maxlen == 0)
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
while (*text != '\0') {
|
||||
while (*text) {
|
||||
size_t charlen = advance_over(text, &width);
|
||||
|
||||
if (maxlen <= charlen)
|
||||
if (count <= charlen)
|
||||
break;
|
||||
|
||||
maxlen -= charlen;
|
||||
count -= charlen;
|
||||
text += charlen;
|
||||
}
|
||||
|
||||
@@ -417,12 +414,18 @@ size_t breadth(const char *text)
|
||||
{
|
||||
size_t span = 0;
|
||||
|
||||
while (*text != '\0')
|
||||
while (*text)
|
||||
text += advance_over(text, &span);
|
||||
|
||||
return span;
|
||||
}
|
||||
|
||||
/* Return the (zero-based) column position of the cursor. */
|
||||
size_t xplustabs(void)
|
||||
{
|
||||
return wideness(openfile->current->data, openfile->current_x);
|
||||
}
|
||||
|
||||
/* Append a new magic line to the end of the buffer. */
|
||||
void new_magicline(void)
|
||||
{
|
||||
@@ -437,8 +440,9 @@ void new_magicline(void)
|
||||
* it isn't the only line in the file. */
|
||||
void remove_magicline(void)
|
||||
{
|
||||
if (openfile->filebot->data[0] == '\0' &&
|
||||
openfile->filebot != openfile->filetop) {
|
||||
if (openfile->filebot->data[0] == '\0' && openfile->filebot != openfile->filetop) {
|
||||
if (openfile->current == openfile->filebot)
|
||||
openfile->current = openfile->current->prev;
|
||||
openfile->filebot = openfile->filebot->prev;
|
||||
delete_node(openfile->filebot->next);
|
||||
openfile->filebot->next = NULL;
|
||||
@@ -448,35 +452,35 @@ void remove_magicline(void)
|
||||
#endif
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Return in (top, top_x) and (bot, bot_x) the start and end "coordinates"
|
||||
* of the marked region. If right_side_up isn't NULL, set it to TRUE when
|
||||
* the mark is at the top of the marked region, and to FALSE otherwise. */
|
||||
void get_region(const linestruct **top, size_t *top_x,
|
||||
const linestruct **bot, size_t *bot_x, bool *right_side_up)
|
||||
/* Return TRUE when the mark is before or at the cursor, and FALSE otherwise. */
|
||||
bool mark_is_before_cursor(void)
|
||||
{
|
||||
if (openfile->mark->lineno < openfile->current->lineno ||
|
||||
(openfile->mark == openfile->current &&
|
||||
openfile->mark_x < openfile->current_x)) {
|
||||
return (openfile->mark->lineno < openfile->current->lineno ||
|
||||
(openfile->mark == openfile->current &&
|
||||
openfile->mark_x <= openfile->current_x));
|
||||
}
|
||||
|
||||
/* Return in (top, top_x) and (bot, bot_x) the start and end "coordinates"
|
||||
* of the marked region. */
|
||||
void get_region(linestruct **top, size_t *top_x, linestruct **bot, size_t *bot_x)
|
||||
{
|
||||
if (mark_is_before_cursor()) {
|
||||
*top = openfile->mark;
|
||||
*top_x = openfile->mark_x;
|
||||
*bot = openfile->current;
|
||||
*bot_x = openfile->current_x;
|
||||
if (right_side_up != NULL)
|
||||
*right_side_up = TRUE;
|
||||
} else {
|
||||
*bot = openfile->mark;
|
||||
*bot_x = openfile->mark_x;
|
||||
*top = openfile->current;
|
||||
*top_x = openfile->current_x;
|
||||
if (right_side_up != NULL)
|
||||
*right_side_up = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the set of lines to work on -- either just the current line, or the
|
||||
* first to last lines of the marked region. When the cursor (or mark) is
|
||||
* at the start of the last line of the region, exclude that line. */
|
||||
void get_range(const linestruct **top, const linestruct **bot)
|
||||
void get_range(linestruct **top, linestruct **bot)
|
||||
{
|
||||
if (!openfile->mark) {
|
||||
*top = openfile->current;
|
||||
@@ -484,7 +488,7 @@ void get_range(const linestruct **top, const linestruct **bot)
|
||||
} else {
|
||||
size_t top_x, bot_x;
|
||||
|
||||
get_region(top, &top_x, bot, &bot_x, NULL);
|
||||
get_region(top, &top_x, bot, &bot_x);
|
||||
|
||||
if (bot_x == 0 && *bot != *top && !also_the_last)
|
||||
*bot = (*bot)->prev;
|
||||
@@ -492,7 +496,9 @@ void get_range(const linestruct **top, const linestruct **bot)
|
||||
also_the_last = TRUE;
|
||||
}
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined (ENABLE_LINTER) || defined (ENABLE_FORMATTER)
|
||||
/* Return a pointer to the line that has the given line number. */
|
||||
linestruct *line_from_number(ssize_t number)
|
||||
{
|
||||
@@ -507,22 +513,18 @@ linestruct *line_from_number(ssize_t number)
|
||||
|
||||
return line;
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
#endif
|
||||
|
||||
/* Count the number of characters from begin to end, and return it. */
|
||||
size_t get_totsize(const linestruct *begin, const linestruct *end)
|
||||
size_t number_of_characters_in(const linestruct *begin, const linestruct *end)
|
||||
{
|
||||
const linestruct *line;
|
||||
size_t totsize = 0;
|
||||
size_t count = 0;
|
||||
|
||||
/* Sum the number of characters (plus a newline) in each line. */
|
||||
for (line = begin; line != end->next; line = line->next)
|
||||
totsize += mbstrlen(line->data) + 1;
|
||||
count += mbstrlen(line->data) + 1;
|
||||
|
||||
/* The last line of a file doesn't have a newline -- otherwise it
|
||||
* wouldn't be the last line -- so subtract 1 when at EOF. */
|
||||
if (line == NULL)
|
||||
totsize--;
|
||||
|
||||
return totsize;
|
||||
/* Do not count the final newline. */
|
||||
return (count - 1);
|
||||
}
|
||||
|
||||
4421
src/winio.c
4421
src/winio.c
File diff suppressed because it is too large
Load Diff
@@ -5,11 +5,8 @@ pkgdata_DATA = asm.nanorc \
|
||||
cmake.nanorc \
|
||||
c.nanorc \
|
||||
css.nanorc \
|
||||
debian.nanorc \
|
||||
default.nanorc \
|
||||
elisp.nanorc \
|
||||
fortran.nanorc \
|
||||
gentoo.nanorc \
|
||||
email.nanorc \
|
||||
go.nanorc \
|
||||
groff.nanorc \
|
||||
guile.nanorc \
|
||||
@@ -20,8 +17,7 @@ pkgdata_DATA = asm.nanorc \
|
||||
lua.nanorc \
|
||||
makefile.nanorc \
|
||||
man.nanorc \
|
||||
mgp.nanorc \
|
||||
mutt.nanorc \
|
||||
markdown.nanorc \
|
||||
nanohelp.nanorc \
|
||||
nanorc.nanorc \
|
||||
nftables.nanorc \
|
||||
@@ -31,16 +27,22 @@ pkgdata_DATA = asm.nanorc \
|
||||
perl.nanorc \
|
||||
php.nanorc \
|
||||
po.nanorc \
|
||||
postgresql.nanorc \
|
||||
pov.nanorc \
|
||||
python.nanorc \
|
||||
ruby.nanorc \
|
||||
rust.nanorc \
|
||||
sh.nanorc \
|
||||
spec.nanorc \
|
||||
sql.nanorc \
|
||||
tcl.nanorc \
|
||||
tex.nanorc \
|
||||
texinfo.nanorc \
|
||||
xml.nanorc
|
||||
xml.nanorc \
|
||||
yaml.nanorc
|
||||
|
||||
EXTRA_DIST = $(pkgdata_DATA)
|
||||
nobase_pkgdata_DATA = \
|
||||
extra/ada.nanorc \
|
||||
extra/fortran.nanorc \
|
||||
extra/haskell.nanorc \
|
||||
extra/povray.nanorc \
|
||||
extra/spec.nanorc
|
||||
|
||||
EXTRA_DIST = $(pkgdata_DATA) $(nobase_pkgdata_DATA)
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
## Here is an example for assembler.
|
||||
## Syntax highlighting for assembler.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax asm "\.(S|s|asm)$"
|
||||
magic "assembler source"
|
||||
comment "//"
|
||||
|
||||
color red "\<[A-Z_]{2,}\>"
|
||||
color brightgreen "\.(data|subsection|text)"
|
||||
color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
|
||||
color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
|
||||
color brightred "^[[:space:]]*[.0-9A-Za-z_]*:"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||
color red "\<[[:alpha:]_]{2,}\>"
|
||||
color brightgreen "\.(data|subsection|text)\>"
|
||||
color green "\.(align|file|globl|global|hidden|section|size|type|weak)\>"
|
||||
color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)\>"
|
||||
color brightred "^[[:blank:]]*[[:alnum:]_.]*:"
|
||||
color brightcyan "^[[:blank:]]*#[[:blank:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)\>"
|
||||
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
# Multiline strings. This regex is VERY resource intensive,
|
||||
# and sometimes colours things that shouldn't be coloured.
|
||||
###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
# Strings and names of included files.
|
||||
color brightyellow ""([^"\]|\\.)*"|<[^= ]*>"
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
|
||||
@@ -1,32 +1,35 @@
|
||||
## Here is an example for Autoconf.
|
||||
## Syntax highlighting for Autoconf.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax autoconf "\.(ac|m4)$"
|
||||
comment "#"
|
||||
|
||||
# Keywords:
|
||||
color yellow "\<(if|test|then|elif|else|fi|for|in|do|done)\>"
|
||||
color yellow "(=|!=|&&|\|\|)"
|
||||
color yellow "\<(if|test|then|elif|else|fi|case|esac|ifelse|for|in|do|done)\>"
|
||||
color yellow "=|!=|&&|\|\|"
|
||||
|
||||
# Macros:
|
||||
color cyan "\<[[:upper:]_[:digit:]]+\>"
|
||||
color cyan "\<[[:upper:][:digit:]_]+\>"
|
||||
|
||||
# Version numbers:
|
||||
color red "\<[-_.0-9]+\>"
|
||||
|
||||
# Strings:
|
||||
color red "\"[^"]*\"" "\'[^']*\'"
|
||||
color red ""[^"]*"|'[^']*'"
|
||||
|
||||
# Backticks:
|
||||
color green "`[^`]*`"
|
||||
|
||||
# Error lines:
|
||||
color brightred "^[[:space:]]*\*\*\*.*"
|
||||
color brightred "^[[:blank:]]*\*\*\*.*"
|
||||
|
||||
# Brackets:
|
||||
color magenta "\[|\]|\(|\)"
|
||||
|
||||
# Comments:
|
||||
color blue "^[[:blank:]]*#.*" "\<dnl.*"
|
||||
color blue "^[[:blank:]]*#.*|\<dnl.*"
|
||||
|
||||
# Trailing whitespace:
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
## Here is an example for awk.
|
||||
## Syntax highlighting for AWK scripts.
|
||||
|
||||
## Original author: Donnie Berkholz
|
||||
|
||||
syntax awk "\.awk$"
|
||||
header "^#!.*awk"
|
||||
@@ -6,15 +8,15 @@ magic "awk script"
|
||||
comment "#"
|
||||
|
||||
# Records.
|
||||
color brightred "\$[0-9A-Za-z_!@#$*?-]+"
|
||||
color brightred "\$[[:alnum:]_!@#$*?-]+"
|
||||
# Awk-set variables.
|
||||
color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
|
||||
color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
|
||||
color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
|
||||
# Function declarations and special patterns.
|
||||
color brightgreen "\<(function|extension|BEGIN|END)\>"
|
||||
# Operators.
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)"
|
||||
# Operators and brackets/braces/slashes/parentheses.
|
||||
color green "[][!%&()*+/:;<=>?\^{|}~-]"
|
||||
# Flow control.
|
||||
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
|
||||
color brightyellow "\<(break|continue|return)\>"
|
||||
@@ -29,9 +31,11 @@ color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
|
||||
color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
|
||||
|
||||
# Strings.
|
||||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
|
||||
color brightyellow ""([^"\]|\\.)*""
|
||||
# Escape sequences.
|
||||
color brick "\\([abfnrtv\/"]|[0-7]{1,3}|x[[:xdigit:]]{1,2}|u[[:xdigit:]]{1,8})"
|
||||
# Comments.
|
||||
color brightblue "(^|[[:space:]])#.*$"
|
||||
color brightblue "(^|[[:blank:]])#.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,39 +1,46 @@
|
||||
## Here is an example for C/C++.
|
||||
## Syntax highlighting for C and C++ files.
|
||||
|
||||
syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$"
|
||||
header "-\*-.*\<C(\+\+)?((;|\s).*)?-\*-"
|
||||
header "-\*-.*\<C(\+\+)?((;|[[:blank:]]).*)?-\*-"
|
||||
magic "^(C|C\+\+) (source|program)"
|
||||
comment "//"
|
||||
|
||||
# Constants.
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color brightred "\<[[:upper:]_][[:upper:][:digit:]_]*\>"
|
||||
# Labels.
|
||||
color brightmagenta "^[[:space:]]*[A-Z_a-z]+:[[:space:]]*$"
|
||||
color brightmagenta "^[[:blank:]]*[[:alpha:]_][[:alnum:]_]*:[[:blank:]]*$"
|
||||
color normal ":[[:blank:]]*$"
|
||||
|
||||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<([[:lower:]][[:lower:]_]*|(u_?)?int(8|16|32|64))_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|override|using|mutable|volatile|register|explicit)\>"
|
||||
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
# Types and related keywords.
|
||||
color green "\<(bool|char|double|enum|float|int|short|(un)?signed|struct|union|void|((u_?)?int(8|16|32|64)|[[:lower:]][[:lower:]_]*)_t)\>"
|
||||
color green "\<(align(as|of)|auto|const(eval|expr|init)?|extern|inline|register|restrict|sizeof|static(_assert)?|thread_local|typedef|typeof(_unqual)?|volatile)\>"
|
||||
color green "\<(_(Align(as|of)|Atomic|BitInt|Bool|Complex|Decimal(32|64|128)|Generic|Imaginary|Noreturn|Static_assert|Thread_local))\>"
|
||||
color green "\<(class|explicit|final|friend|mutable|namespace|override|private|protected|public|template|this|typename|using|virtual)\>"
|
||||
color green "\<(char(8|16|32)_t|wchar_t|(const|dynamic|reinterpret|static)_cast|decltype|export|import|module|noexcept|requires|typeid)\>"
|
||||
|
||||
# Flow control.
|
||||
color brightyellow "\<(if|else|for|while|do|switch|case|default)\>"
|
||||
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color magenta "\<(goto|continue|break|return)\>"
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
color magenta "\<(break|continue|goto|(co_)?return)\>"
|
||||
|
||||
# Single-quoted stuff (characters, backslash escapes, hex and octal byte codes).
|
||||
color brightmagenta "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'"
|
||||
|
||||
# Hexadecimal, binary, and boolean values.
|
||||
color pink "\<(0[Xx][[:xdigit:]]['[:xdigit:]]*|0[Bb][01]['01]*|true|false|nullptr)\>"
|
||||
|
||||
# GCC builtins.
|
||||
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
# Strings. In general you will want your strings and comments to come last,
|
||||
# because highlighting rules are applied in the order they are read in.
|
||||
color brightyellow ""([^"]|\\")*"" "#[[:space:]]*include[[:space:]]+<[^[:blank:]=]*>"
|
||||
# Multiline strings. This regex is VERY resource intensive,
|
||||
# and sometimes colours things that shouldn't be coloured.
|
||||
###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
# Strings and names of included files.
|
||||
color brightyellow ""([^"]|\\")*"|#[[:blank:]]*include[[:blank:]]*<[^>]+>"
|
||||
|
||||
# Preprocessor directives.
|
||||
color brightcyan start="^[[:space:]]*#[[:space:]]*(if(n?def)?|elif|warning|error|pragma)\>" end="(\`|[^\\])$"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|else|endif|include(_next)?|undef)\>"
|
||||
color brightcyan start="^[[:blank:]]*#[[:blank:]]*((el)?if(n?def)?|error|pragma|warning)\>" end="(\`|[^\])$"
|
||||
color brightcyan "^[[:blank:]]*#[[:blank:]]*((define|else|embed|endif|include(_next)?|line|undef)\>|$)"
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue "//[^"]*$|(^|[[:blank:]])//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Reminders.
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
## Colouring for Changelogs.
|
||||
## Syntax highlighting for Changelogs.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax changelog "Change[Ll]og[^/]*$"
|
||||
|
||||
# Author lines.
|
||||
color green "^(19|20).*"
|
||||
# Dates.
|
||||
color red "^(19|20)[0-9-]{8}"
|
||||
color red "^(19|20)[[:digit:]-]{8}"
|
||||
# Email addresses.
|
||||
color yellow "<[^>]*@[^>]*>"
|
||||
|
||||
# Command-line options.
|
||||
color cyan "[[:space:]]-[a-zA-Z\$]" "--[8a-z-]+"
|
||||
color cyan "[[:blank:]]-[[:alpha:]$]|--[[:lower:]8-]+"
|
||||
# Bug and patch numbers.
|
||||
color cyan "(BZ|bug|patch) #[0-9]+" "PR [[:alnum:]]+/[0-9]+"
|
||||
color cyan "(BZ|bug|patch) #[[:digit:]]+|PR [[:alnum:]]+/[[:digit:]]+"
|
||||
# Probable constants, for variety.
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color brightred "\<[[:upper:]_][[:upper:][:digit:]_]+\>"
|
||||
# Key sequences.
|
||||
color brightblue "\^[A-Z^\]" "\<M-." "\<F1?[0-9]" "(\^|M-)Space"
|
||||
color brightblue "\^[[:upper:]\^_]|\<M-.|\<F1?[[:digit:]]|(\^|M-)Space"
|
||||
|
||||
# Changed files.
|
||||
color magenta start="^( | {8})\* " end="(:( |$)|^$)"
|
||||
|
||||
# Release markers.
|
||||
color brightblue "^(GNU )?nano[- ][0-9]\.[0-9]\.[^ ]+"
|
||||
color brightblue "^(GNU )?nano[- ][[:digit:]]\.[[:digit:]]\.[^ ]+"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
## Syntax highlighting for CMake files.
|
||||
|
||||
## Original author: Felipe Bugno
|
||||
|
||||
syntax cmake "(CMakeLists\.txt|\.cmake)$"
|
||||
comment "#"
|
||||
|
||||
color green "^[[:space:]]*[0-9A-Za-z_]+"
|
||||
icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
|
||||
color green "^[[:blank:]]*[[:alnum:]_]+"
|
||||
icolor brightyellow "^[[:blank:]]*(include|include_directories|include_external_msproject)\>"
|
||||
|
||||
icolor brightgreen "^[[:space:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
|
||||
color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:space:]]"
|
||||
color brightgreen "[[:space:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:space:]]"
|
||||
icolor brightgreen "^[[:blank:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
|
||||
color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:blank:]]"
|
||||
color brightgreen "[[:blank:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:blank:]]"
|
||||
|
||||
icolor brightred "^[[:space:]]*((end)?(function|macro)|return)"
|
||||
icolor brightred "^[[:blank:]]*((end)?(function|macro)|return)"
|
||||
|
||||
icolor cyan start="\$(ENV)?\{" end="\}"
|
||||
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
|
||||
|
||||
color brightblue "(^|[[:space:]])#.*"
|
||||
# Comments.
|
||||
color brightblue "(^|[[:blank:]])#.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
## Here is an example for CSS files.
|
||||
## Syntax highlighting for CSS files.
|
||||
|
||||
## Original author: Simon Rupf
|
||||
|
||||
syntax css "\.css$"
|
||||
comment "/*|*/"
|
||||
|
||||
color brightred "."
|
||||
color brightyellow start="\{" end="\}"
|
||||
color brightwhite start=":" end="([;^\{]|$)"
|
||||
color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
|
||||
color brightblue start="\/\*" end="\\*/"
|
||||
color green ";|:|\{|\}"
|
||||
# First make everything red:
|
||||
color brightred "."
|
||||
# Then everything between braces yellow:
|
||||
color brightyellow start="\{" end="\}"
|
||||
# Then everything after a colon white:
|
||||
color brightwhite start=":" end="([;^{]|$)"
|
||||
|
||||
# Pseudo-classes:
|
||||
color brightcyan ":(active|checked|focus|hover|link|visited|after|before)\>"
|
||||
|
||||
# Comments:
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Syntactic characters:
|
||||
color green ";|:|\{|\}"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
## Here is an example for apt's sources.list.
|
||||
|
||||
syntax sources.list "sources\.list(\.d/.*\.list)?(~|\.old|\.save)?$"
|
||||
comment "#"
|
||||
|
||||
# Coloring the deb lines, working from tail to head. First the
|
||||
# components -- well, everything, and thus also the components.
|
||||
color brightmagenta "^deb.*"
|
||||
# Distribution -- well, everything, except the components.
|
||||
color brightred "^deb(-src)?\s+.*((ftp|https?|rsh|ssh|copy|file|spacewalk|tor):/\S+|cdrom:\[.+\]/)\s+\S+"
|
||||
# URIs.
|
||||
color brightgreen "^deb(-src)?\s+.*(ftp|https?|rsh|ssh|copy|file|spacewalk|tor):/\S+"
|
||||
# CDroms.
|
||||
color brightgreen "^deb(-src)?\s+.*cdrom:\[.+\]/"
|
||||
# Options.
|
||||
color brightcyan "^deb(-src)?\s+\[.+\]\s+"
|
||||
# And finally the initial deb tag.
|
||||
color yellow "^deb(-src)?"
|
||||
|
||||
# Comments.
|
||||
color brightblue "#.*"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user