Mirror of the Vim source from https://github.com/vim/vim
Revision | 3ffdc64af1e53617586ad0cf14e039cb6f1cad34 (tree) |
---|---|
Time | 2005-07-31 07:45:36 |
Author | vimboss |
Commiter | vimboss |
updated for version 7.0120
@@ -1,4 +1,4 @@ | ||
1 | -*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 29 | |
1 | +*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 30 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -53,7 +53,6 @@ | ||
53 | 53 | the screen. |
54 | 54 | - mblen(NULL, 0) also in Vim 6.3? |
55 | 55 | |
56 | -Implement printf("blah %d: %s", nr, str)? Use vim_snprintf code. | |
57 | 56 | |
58 | 57 | PLANNED FOR VERSION 7.0: |
59 | 58 |
@@ -69,9 +68,10 @@ | ||
69 | 68 | First cleanup the Insert-mode completion. |
70 | 69 | |
71 | 70 | UI: |
72 | - - Use 'wildmenu' kind of thing. | |
73 | - - Put the list of choices right under the place where they would be | |
74 | - inserted. | |
71 | + - At first: use 'wildmenu' kind of thing. | |
72 | + - Nicer: Display the list of choices right under the place where they | |
73 | + would be inserted in a kind of meny (use scrollbar when there are many | |
74 | + alternatives). | |
75 | 75 | |
76 | 76 | Completion logic: |
77 | 77 | Use 'coupler' option to list items that connect words. For C: ".,->". |
@@ -1628,7 +1628,6 @@ | ||
1628 | 1628 | mapname({idx}, mode) return the name of the idx'th mapping. |
1629 | 1629 | Patch by Ilya Sher, 2004 Mar 4. |
1630 | 1630 | Return a list instead. |
1631 | - printf(format, arg, ..) How to prevent a crash??? | |
1632 | 1631 | char2hex() convert char string to hex string. |
1633 | 1632 | attributes() return file protection flags "drwxrwxrwx" |
1634 | 1633 | filecopy(from, to) Copy a file |
@@ -1405,7 +1405,8 @@ | ||
1405 | 1405 | } |
1406 | 1406 | |
1407 | 1407 | /* |
1408 | - * Call some vimL function and return the result as a string | |
1408 | + * Call vimL function "func" and return the result as a string. | |
1409 | + * Returns NULL when calling the function fails. | |
1409 | 1410 | * Uses argv[argc] for the function arguments. |
1410 | 1411 | */ |
1411 | 1412 | void * |
@@ -1416,20 +1417,43 @@ | ||
1416 | 1417 | int safe; /* use the sandbox */ |
1417 | 1418 | { |
1418 | 1419 | typval_T rettv; |
1419 | - char_u *retval = NULL; | |
1420 | + char_u *retval; | |
1420 | 1421 | |
1421 | 1422 | if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL) |
1422 | 1423 | return NULL; |
1423 | 1424 | |
1424 | 1425 | retval = vim_strsave(get_tv_string(&rettv)); |
1425 | - | |
1426 | 1426 | clear_tv(&rettv); |
1427 | - | |
1428 | 1427 | return retval; |
1429 | 1428 | } |
1430 | 1429 | |
1431 | -/* | |
1432 | - * Call some vimL function and return the result as a list | |
1430 | +#if defined(FEAT_COMPL_FUNC) || defined(PROTO) | |
1431 | +/* | |
1432 | + * Call vimL function "func" and return the result as a number. | |
1433 | + * Returns -1 when calling the function fails. | |
1434 | + * Uses argv[argc] for the function arguments. | |
1435 | + */ | |
1436 | + long | |
1437 | +call_func_retnr(func, argc, argv, safe) | |
1438 | + char_u *func; | |
1439 | + int argc; | |
1440 | + char_u **argv; | |
1441 | + int safe; /* use the sandbox */ | |
1442 | +{ | |
1443 | + typval_T rettv; | |
1444 | + long retval; | |
1445 | + | |
1446 | + if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL) | |
1447 | + return -1; | |
1448 | + | |
1449 | + retval = get_tv_number_chk(&rettv, NULL); | |
1450 | + clear_tv(&rettv); | |
1451 | + return retval; | |
1452 | +} | |
1453 | +#endif | |
1454 | + | |
1455 | +/* | |
1456 | + * Call vimL function "func" and return the result as a list | |
1433 | 1457 | * Uses argv[argc] for the function arguments. |
1434 | 1458 | */ |
1435 | 1459 | void * |